From 05d0b58e61672203e5d7c86a4df89f6379950221 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Wed, 7 Jan 2026 17:17:10 -0600 Subject: [PATCH 1/2] Fail if maturin produces a PyPI incompatible wheel --- .github/workflows/build-binaries.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index ec54fd058..65a9fd4d5 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -84,7 +84,7 @@ jobs: uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4 with: target: x86_64 - args: --release --locked --out dist + args: --release --locked --out dist --compatibility pypi - name: "Upload wheels" uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: @@ -126,7 +126,7 @@ jobs: uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4 with: target: aarch64 - args: --release --locked --out dist + args: --release --locked --out dist --compatibility pypi - name: "Test wheel - aarch64" run: | pip install dist/"${PACKAGE_NAME}"-*.whl --force-reinstall @@ -182,7 +182,7 @@ jobs: uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4 with: target: ${{ matrix.platform.target }} - args: --release --locked --out dist + args: --release --locked --out dist --compatibility pypi env: # aarch64 build fails, see https://github.com/PyO3/maturin/issues/2110 XWIN_VERSION: 16 @@ -237,7 +237,7 @@ jobs: with: target: ${{ matrix.target }} manylinux: auto - args: --release --locked --out dist + args: --release --locked --out dist --compatibility pypi - name: "Test wheel" if: ${{ startsWith(matrix.target, 'x86_64') }} run: | @@ -296,6 +296,9 @@ jobs: maturin_docker_options: -e JEMALLOC_SYS_WITH_LG_PAGE=16 - target: arm-unknown-linux-musleabihf arch: arm + # This target produces a `linux_armv6l` wheel which PyPI accepts, + # but maturin's `--compatibility pypi` flag doesn't recognize it. + skip_pypi_validation: true steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 @@ -313,7 +316,7 @@ jobs: target: ${{ matrix.platform.target }} manylinux: auto docker-options: ${{ matrix.platform.maturin_docker_options }} - args: --release --locked --out dist + args: --release --locked --out dist ${{ !matrix.platform.skip_pypi_validation && '--compatibility pypi' || '' }} - uses: uraimo/run-on-arch-action@d94c13912ea685de38fccc1109385b83fd79427d # v3.0.1 if: ${{ matrix.platform.arch != 'ppc64' && matrix.platform.arch != 'ppc64le'}} name: Test wheel From 50073dd13cb2e6151898729c74fa7bff513452bb Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Wed, 7 Jan 2026 20:26:49 -0600 Subject: [PATCH 2/2] Update .github/workflows/build-binaries.yml --- .github/workflows/build-binaries.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 65a9fd4d5..2ec78acf5 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -297,7 +297,7 @@ jobs: - target: arm-unknown-linux-musleabihf arch: arm # This target produces a `linux_armv6l` wheel which PyPI accepts, - # but maturin's `--compatibility pypi` flag doesn't recognize it. + # but maturin's `--compatibility pypi` flag rejects. skip_pypi_validation: true steps: