cibuildwheel¶
Python wheels are great. Building them across Mac, Linux, Windows, on multiple versions of Python, is not.
cibuildwheel
is here to help. cibuildwheel
runs on your CI server - currently it supports GitHub Actions, Azure Pipelines, Travis CI, AppVeyor, CircleCI, and GitLab CI - and it builds and tests your wheels across all of your platforms.
What does it do?¶
macOS Intel | macOS Apple Silicon | Windows 64bit | Windows 32bit | Windows Arm64 | manylinux musllinux x86_64 |
manylinux musllinux i686 |
manylinux musllinux aarch64 |
manylinux musllinux ppc64le |
manylinux musllinux s390x |
musllinux armv7l | Pyodide | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
CPythonΒ 3.6 | β | N/A | β | β | N/A | β | β | β | β | β | β | N/A |
CPythonΒ 3.7 | β | N/A | β | β | N/A | β | β | β | β | β | β | N/A |
CPythonΒ 3.8 | β | β | β | β | N/A | β | β | β | β | β | β | N/A |
CPythonΒ 3.9 | β | β | β | β | β Β² | β | β | β | β | β | β | N/A |
CPythonΒ 3.10 | β | β | β | β | β Β² | β | β | β | β | β | β | N/A |
CPythonΒ 3.11 | β | β | β | β | β Β² | β | β | β | β | β | β | N/A |
CPythonΒ 3.12 | β | β | β | β | β Β² | β | β | β | β | β | β | β β΄ |
CPythonΒ 3.13Β³ | β | β | β | β | β Β² | β | β | β | β | β | β | N/A |
PyPyΒ 3.7 v7.3 | β | N/A | β | N/A | N/A | β ΒΉ | β ΒΉ | β ΒΉ | N/A | N/A | N/A | N/A |
PyPyΒ 3.8 v7.3 | β | β | β | N/A | N/A | β ΒΉ | β ΒΉ | β ΒΉ | N/A | N/A | N/A | N/A |
PyPyΒ 3.9 v7.3 | β | β | β | N/A | N/A | β ΒΉ | β ΒΉ | β ΒΉ | N/A | N/A | N/A | N/A |
PyPyΒ 3.10 v7.3 | β | β | β | N/A | N/A | β ΒΉ | β ΒΉ | β ΒΉ | N/A | N/A | N/A | N/A |
ΒΉ PyPy is only supported for manylinux wheels.
Β² Windows arm64 support is experimental.
Β³ Free-threaded mode requires opt-in using CIBW_FREE_THREADED_SUPPORT
.
β΄ Experimental, not yet supported on PyPI, but can be used directly in web deployment. Use --platform pyodide
to build.
- Builds manylinux, musllinux, macOS 10.9+ (10.13+ for Python 3.12+), and Windows wheels for CPython and PyPy
- Works on GitHub Actions, Azure Pipelines, Travis CI, AppVeyor, CircleCI, GitLab CI, and Cirrus CI
- Bundles shared library dependencies on Linux and macOS through auditwheel and delocate
- Runs your library's tests against the wheel-installed version of your library
See the cibuildwheel 1 documentation if you need to build unsupported versions of Python, such as Python 2.
Usage¶
cibuildwheel
runs inside a CI service. Supported platforms depend on which service you're using:
Linux | macOS | Windows | Linux ARM | macOS ARM | Windows ARM | |
---|---|---|---|---|---|---|
GitHub Actions | β | β | β | β ΒΉ | β | β Β² |
Azure Pipelines | β | β | β | β | β Β² | |
Travis CI | β | β | β | |||
AppVeyor | β | β | β | β | β Β² | |
CircleCI | β | β | β | β | ||
Gitlab CI | β | β | β | β ΒΉ | β | |
Cirrus CI | β | β | β | β | β |
ΒΉ Requires emulation, distributed separately. Other services may also support Linux ARM through emulation or third-party build hosts, but these are not tested in our CI.
Β² Uses cross-compilation. It is not possible to test arm64
on this CI platform.
To get started, head over to the setup guide.
How it works¶
This diagram summarises the steps that cibuildwheel takes on each platform to build your package's wheels.
This isn't exhaustive, for a full list of the things cibuildwheel can do, check the options page.