Cibuildwheel missing wheels - Python Help - Discussions on Python.org
Cibuildwheel missing wheels Python Help replabrobin (Robin Becker) February 12, 2025, 11:50am 1 I am trying once more to get github to build some C limited ABI extensions. I had a lot of problems caused by various deprecated github actions eg uses: actions/upload-artifact@v4 caused a lot of grief. So I looked for some assistance and found this example GitHub - joerick/python-abi3-package-sample: An example Python package that builds ABI3-compatible wheels .
I forked this for playing about GitHub - MrBitBucket/ci-spam: An example Python package that builds ABI3-compatible wheels After make some small changes to .github/workflows/cibuildwheel.yml it looks like name: Build on: [push] jobs: build_wheels: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-14] steps: - uses: actions/checkout@v4 - name: Set up QEMU if: runner.os == 'Linux' uses: docker/setup-qemu-action@v3 with: platforms: all - name: Build wheels uses: pypa/cibuildwheel@v2.22.0 env: CIBW_BUILD: cp313-* - uses: actions/upload-artifact@v4 with: name: "${{ github.event.repository.name }}-${{ matrix.os }}-${{ strategy.job-index }}" path: ./wheelhouse/*.whl I managed to make this simple build 10 extensions spam-0.1.0-cp36-abi3-macosx_10_13_x86_64.whl spam-0.1.0-cp36-abi3-macosx_11_0_arm64.whl spam-0.1.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl spam-0.1.0-cp36-abi3-musllinux_1_2_aarch64.whl spam-0.1.0-cp36-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl spam-0.1.0-cp36-abi3-musllinux_1_2_i686.whl spam-0.1.0-cp36-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl spam-0.1.0-cp36-abi3-musllinux_1_2_x86_64.whl spam-0.1.0-cp36-abi3-win32.whl spam-0.1.0-cp36-abi3-win_amd64.whl Reading Options - cibuildwheel I was expecting to get others eg ppc64le s390x armv7l wheels.
I suppose I lack some cibuildwheel environment setting. Anyone know of how to force those builds or a better example? da-woods (Da Woods) February 12, 2025, 12:25pm 2 Is it Random segfault for QEMU builds in GitHub Actions · Issue #2257 · pypa/cibuildwheel · GitHub ? replabrobin (Robin Becker) February 12, 2025, 1:10pm 3 I tried using the recommended patch ci(fix): use tonistiigi/binfmt:qemu-v8.1.5 image for qemu · pypa/cibuildwheel@4538497 · GitHub but didn’t get any more wheels.
I looked in the logs and did not any obvious segfaults etc etc. oscarbenjamin (Oscar Benjamin) February 12, 2025, 1:19pm 4 The list of wheels you get is what I would expect given the os matrix. I think that you would need to run cibuildwheel under qemu for e.g. ppc64le etc to get those wheels. I haven’t used setup-qemu-action before but I am assuming that it just installs qemu and then you need to do something else to actually run commands under qemu emulation. replabrobin (Robin Becker) February 12, 2025, 3:18pm 5 I think you are right, but I don’t know of a suitable example to follow.
Looking at the logs I see that the setup-qemu-action reports Extracting available platforms linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/loong64,linux/arm/v7,linux/arm/v6 I think I need this CIBW_ARCHS_LINUX: ${{ runner.arch == 'X64' && 'auto ppc64le s390x' || 'auto armv7l' }} in the cibuild action environment. I thought that would be handled automatically with the CIBW_BUILD wild card cp313*. replabrobin (Robin Becker) February 12, 2025, 3:46pm 6 Yes I see more builds using CIBW_ARCHS_LINUX