Skip to content

Commit 0ade21d

Browse files
jeongseok-metameta-codesync[bot]
authored andcommitted
Fix PyPI publishing: Add missing auditwheel repair step for Linux wheels (#738)
Summary: PyPI was rejecting Linux wheels with [error](https://github.com/facebookresearch/momentum/actions/runs/18853730732/job/53797928855): `Binary wheel 'pymomentum_cpu-0.1.81.post0-cp312-cp312-linux_x86_64.whl' has an unsupported platform tag 'linux_x86_64'.` PyPI requires Linux wheels to use `manylinux` tags (e.g., `manylinux_2_17_x86_64`) instead of generic `linux_x86_64` for cross-distribution compatibility. The `build_pypi_repair` task was already defined in `pixi.toml` since PR #725, but the CI workflow never called it. This wasn't caught because: * CI builds wheels successfully without publishing (no PyPI validation) * First actual PyPI publish attempt revealed the issue Added `build_pypi_repair` step to CI workflow after building wheels on Linux: * Runs `auditwheel repair` to convert `linux_x86_64` → `manylinux_*` tags * Removes original wheel after repair * Skipped on macOS (not needed) ## Checklist: - [ ] Adheres to the [style guidelines](https://facebookresearch.github.io/momentum/docs/developer_guide/style_guide) - [ ] Codebase formatted by running `pixi run lint` Pull Request resolved: #738 Test Plan: Next PyPI publish should succeed with properly tagged `manylinux` wheels. Reviewed By: nickyhe-gemini Differential Revision: D85597200 Pulled By: jeongseok-meta fbshipit-source-id: 10eb68baa893f5e5d31ddab61f8d55deb39df71d
1 parent 5fc976b commit 0ade21d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/publish_to_pypi.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ jobs:
9898
if: steps.should_run.outputs.run == 'true'
9999
run: pixi run -e ${{ matrix.pixi-environment }} build_pypi_wheel
100100

101+
- name: Repair CPU wheel (Linux only)
102+
if: steps.should_run.outputs.run == 'true' && matrix.os == 'ubuntu-latest'
103+
run: pixi run -e ${{ matrix.pixi-environment }} build_pypi_repair
104+
101105
- name: Upload wheel artifacts
102106
if: steps.should_run.outputs.run == 'true'
103107
uses: actions/upload-artifact@v4
@@ -200,6 +204,10 @@ jobs:
200204
if: steps.should_run.outputs.run == 'true'
201205
run: pixi run -e ${{ matrix.pixi-environment }} build_pypi_wheel
202206

207+
- name: Repair GPU wheel (Linux only)
208+
if: steps.should_run.outputs.run == 'true' && matrix.os == 'ubuntu-latest'
209+
run: pixi run -e ${{ matrix.pixi-environment }} build_pypi_repair
210+
203211
- name: Upload wheel artifacts
204212
if: steps.should_run.outputs.run == 'true'
205213
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)