From 4a79413fe6d6fd88b4317bcf0e80252292fd34f5 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Sat, 27 Jan 2024 11:09:41 +0000 Subject: [PATCH 01/15] Remove the Cirrus CI badge from readme It frequently gives false negatives because of limited compute credits --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 615c3114..33a515e0 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,6 @@ cibuildwheel [![Appveyor status](https://ci.appveyor.com/api/projects/status/gt3vwl88yt0y3hur/branch/main?svg=true)](https://ci.appveyor.com/project/joerick/cibuildwheel/branch/main) [![CircleCI Status](https://img.shields.io/circleci/build/gh/pypa/cibuildwheel/main?logo=circleci)](https://circleci.com/gh/pypa/cibuildwheel) [![Azure Status](https://dev.azure.com/joerick0429/cibuildwheel/_apis/build/status/pypa.cibuildwheel?branchName=main)](https://dev.azure.com/joerick0429/cibuildwheel/_build/latest?definitionId=4&branchName=main) -[![Cirrus CI Status](https://img.shields.io/cirrus/github/pypa/cibuildwheel/main?logo=cirrusci)](https://cirrus-ci.com/github/pypa/cibuildwheel) [Documentation](https://cibuildwheel.readthedocs.org) From 34b049f1389fd9cfef5de1d1781ec67759770eea Mon Sep 17 00:00:00 2001 From: "cibuildwheel-bot[bot]" <83877280+cibuildwheel-bot[bot]@users.noreply.github.com> Date: Sat, 27 Jan 2024 23:09:53 -0500 Subject: [PATCH 02/15] [Bot] Update dependencies (#1737) Update dependencies Co-authored-by: cibuildwheel-bot[bot] <83877280+cibuildwheel-bot[bot]@users.noreply.github.com> --- .../resources/pinned_docker_images.cfg | 48 +++++++++---------- docs/working-examples.md | 8 ++-- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/cibuildwheel/resources/pinned_docker_images.cfg b/cibuildwheel/resources/pinned_docker_images.cfg index 04dab759..fe79c254 100644 --- a/cibuildwheel/resources/pinned_docker_images.cfg +++ b/cibuildwheel/resources/pinned_docker_images.cfg @@ -1,54 +1,54 @@ [x86_64] manylinux1 = quay.io/pypa/manylinux1_x86_64:2023-12-10-cee9633 manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177 -manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2024-01-08-eb135ed +manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2024-01-23-12ffabc manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-12-26-0d38463 -manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2024-01-08-eb135ed -musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2024-01-08-eb135ed -musllinux_1_2 = quay.io/pypa/musllinux_1_2_x86_64:2024-01-08-eb135ed +manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2024-01-23-12ffabc +musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2024-01-23-12ffabc +musllinux_1_2 = quay.io/pypa/musllinux_1_2_x86_64:2024-01-23-12ffabc [i686] manylinux1 = quay.io/pypa/manylinux1_i686:2023-12-10-cee9633 manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177 -manylinux2014 = quay.io/pypa/manylinux2014_i686:2024-01-08-eb135ed +manylinux2014 = quay.io/pypa/manylinux2014_i686:2024-01-23-12ffabc manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-12-26-0d38463 -musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2024-01-08-eb135ed -musllinux_1_2 = quay.io/pypa/musllinux_1_2_i686:2024-01-08-eb135ed +musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2024-01-23-12ffabc +musllinux_1_2 = quay.io/pypa/musllinux_1_2_i686:2024-01-23-12ffabc [pypy_x86_64] manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177 -manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2024-01-08-eb135ed +manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2024-01-23-12ffabc manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-12-26-0d38463 -manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2024-01-08-eb135ed +manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2024-01-23-12ffabc [pypy_i686] manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177 -manylinux2014 = quay.io/pypa/manylinux2014_i686:2024-01-08-eb135ed +manylinux2014 = quay.io/pypa/manylinux2014_i686:2024-01-23-12ffabc manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-12-26-0d38463 [aarch64] -manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2024-01-08-eb135ed +manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2024-01-23-12ffabc manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-12-26-0d38463 -manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2024-01-08-eb135ed -musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2024-01-08-eb135ed -musllinux_1_2 = quay.io/pypa/musllinux_1_2_aarch64:2024-01-08-eb135ed +manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2024-01-23-12ffabc +musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2024-01-23-12ffabc +musllinux_1_2 = quay.io/pypa/musllinux_1_2_aarch64:2024-01-23-12ffabc [ppc64le] -manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2024-01-08-eb135ed +manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2024-01-23-12ffabc manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2022-12-26-0d38463 -manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2024-01-08-eb135ed -musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2024-01-08-eb135ed -musllinux_1_2 = quay.io/pypa/musllinux_1_2_ppc64le:2024-01-08-eb135ed +manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2024-01-23-12ffabc +musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2024-01-23-12ffabc +musllinux_1_2 = quay.io/pypa/musllinux_1_2_ppc64le:2024-01-23-12ffabc [s390x] -manylinux2014 = quay.io/pypa/manylinux2014_s390x:2024-01-08-eb135ed +manylinux2014 = quay.io/pypa/manylinux2014_s390x:2024-01-23-12ffabc manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2022-12-26-0d38463 -manylinux_2_28 = quay.io/pypa/manylinux_2_28_s390x:2024-01-08-eb135ed -musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2024-01-08-eb135ed -musllinux_1_2 = quay.io/pypa/musllinux_1_2_s390x:2024-01-08-eb135ed +manylinux_2_28 = quay.io/pypa/manylinux_2_28_s390x:2024-01-23-12ffabc +musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2024-01-23-12ffabc +musllinux_1_2 = quay.io/pypa/musllinux_1_2_s390x:2024-01-23-12ffabc [pypy_aarch64] -manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2024-01-08-eb135ed +manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2024-01-23-12ffabc manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-12-26-0d38463 -manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2024-01-08-eb135ed +manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2024-01-23-12ffabc diff --git a/docs/working-examples.md b/docs/working-examples.md index 3f5d8f63..99326894 100644 --- a/docs/working-examples.md +++ b/docs/working-examples.md @@ -86,15 +86,15 @@ title: Working examples | [iminuit][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Jupyter-friendly Python interface for C++ MINUIT2 | | [Tokenizer][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Fast and customizable text tokenization library with BPE and SentencePiece support | | [PyGLM][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Fast OpenGL Mathematics (GLM) for Python | -| [TgCrypto][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes a Windows Travis build. | | [pillow-heif][] | ![github icon][] ![cirrusci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Bindings to libheif library with third party dependencies. Fully automated CI for tests and publishing including Apple Silicon builds. | +| [TgCrypto][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes a Windows Travis build. | | [iDynTree][] | ![github icon][] | ![linux icon][] | Uses manylinux_2_24 | | [bx-python][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | A library that includes Cython extensions. | | [boost-histogram][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Supports full range of wheels, including PyPy and alternate archs. | | [Python-WebRTC][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | a Python extension that provides bindings to WebRTC M92 | | [pybase64][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Fast Base64 encoding/decoding in Python | -| [fathon][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | python package for DFA (Detrended Fluctuation Analysis) and related algorithms | | [power-grid-model][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Python/C++ library for distribution power system analysis | +| [fathon][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | python package for DFA (Detrended Fluctuation Analysis) and related algorithms | | [Arbor][] | ![github icon][] | ![apple icon][] ![linux icon][] | Arbor is a multi-compartment neuron simulation library; compatible with next-generation accelerators; best-practices applied to research software; focused on community-driven development. Includes a [small script](https://github.com/arbor-sim/arbor/blob/master/scripts/patchwheel.py) patching `rpath` in bundled libraries. | | [Imagecodecs (fork)][] | ![azurepipelines icon][] | ![apple icon][] ![linux icon][] | Over 20 external dependencies in compiled libraries, custom docker image, `libomp`, `openblas` and `install_name_tool` for macOS. | | [pybind11 scikit_build_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | An example combining scikit-build and pybind11 | @@ -193,15 +193,15 @@ title: Working examples [iminuit]: https://github.com/scikit-hep/iminuit [Tokenizer]: https://github.com/OpenNMT/Tokenizer [PyGLM]: https://github.com/Zuzu-Typ/PyGLM -[TgCrypto]: https://github.com/pyrogram/tgcrypto [pillow-heif]: https://github.com/bigcat88/pillow_heif +[TgCrypto]: https://github.com/pyrogram/tgcrypto [iDynTree]: https://github.com/robotology/idyntree [bx-python]: https://github.com/bxlab/bx-python [boost-histogram]: https://github.com/scikit-hep/boost-histogram [Python-WebRTC]: https://github.com/MarshalX/python-webrtc [pybase64]: https://github.com/mayeut/pybase64 -[fathon]: https://github.com/stfbnc/fathon [power-grid-model]: https://github.com/alliander-opensource/power-grid-model +[fathon]: https://github.com/stfbnc/fathon [Arbor]: https://github.com/arbor-sim/arbor [Imagecodecs (fork)]: https://github.com/czaki/imagecodecs_build [pybind11 scikit_build_example]: https://github.com/pybind/scikit_build_example From 0b04ab1040366101259658b355777e4ff2d16f83 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Sun, 28 Jan 2024 17:21:43 +0000 Subject: [PATCH 03/15] Bump version: v2.16.4 --- README.md | 15 +++++++-------- cibuildwheel/__init__.py | 2 +- docs/changelog.md | 6 ++++++ docs/faq.md | 6 +++--- docs/setup.md | 4 ++-- examples/appveyor-minimal.yml | 2 +- examples/azure-pipelines-minimal.yml | 6 +++--- examples/circleci-minimal.yml | 6 +++--- examples/cirrus-ci-intel-mac.yml | 2 +- examples/cirrus-ci-minimal.yml | 2 +- examples/github-apple-silicon.yml | 2 +- examples/github-deploy.yml | 2 +- examples/github-minimal.yml | 2 +- examples/github-with-qemu.yml | 2 +- examples/gitlab-minimal.yml | 4 ++-- examples/gitlab-with-qemu.yml | 2 +- examples/travis-ci-deploy.yml | 2 +- examples/travis-ci-minimal.yml | 2 +- examples/travis-ci-test-and-deploy.yml | 4 ++-- setup.cfg | 2 +- 20 files changed, 40 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 33a515e0..6d2b6d24 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ jobs: - uses: actions/setup-python@v3 - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.16.3 + run: python -m pip install cibuildwheel==2.16.4 - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse @@ -213,6 +213,12 @@ Changelog +### v2.16.4 + +_28 January 2024_ + +- πŸ›  Update manylinux pins to upgrade from a problematic PyPy version. (#1737) + ### v2.16.3 _26 January 2024_ @@ -251,13 +257,6 @@ _18 September 2023_ - πŸ› `--only` can now select prerelease-pythons (#1564) - πŸ“š Docs & examples updates (#1582, #1593, #1598, #1615) -### v2.15.0 - -_8 August 2023_ - -- 🌟 CPython 3.12 wheels are now built by default - without the CIBW_PRERELEASE_PYTHONS flag. It's time to build and upload these wheels to PyPI! This release includes CPython 3.12.0rc1, which is guaranteed to be ABI compatible with the final release. (#1565) -- ✨ Adds musllinux_1_2 support - this allows packagers to build for musl-based Linux distributions on a more recent Alpine image, and a newer musl libc. (#1561) - --- diff --git a/cibuildwheel/__init__.py b/cibuildwheel/__init__.py index 2965f7be..20173d4e 100644 --- a/cibuildwheel/__init__.py +++ b/cibuildwheel/__init__.py @@ -1,3 +1,3 @@ from __future__ import annotations -__version__ = "2.16.3" +__version__ = "2.16.4" diff --git a/docs/changelog.md b/docs/changelog.md index c62815f4..fea56081 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -4,6 +4,12 @@ title: Changelog # Changelog +### v2.16.4 + +_28 January 2024_ + +- πŸ›  Update manylinux pins to upgrade from a problematic PyPy version. (#1737) + ### v2.16.3 _26 January 2024_ diff --git a/docs/faq.md b/docs/faq.md index d33fabb8..3a5bf090 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -159,7 +159,7 @@ There are two suggested methods for keeping cibuildwheel up to date that instead If you use GitHub Actions for builds, you can use cibuildwheel as an action: ```yaml -uses: pypa/cibuildwheel@v2.16.3 +uses: pypa/cibuildwheel@v2.16.4 ``` This is a composite step that just runs cibuildwheel using pipx. You can set command-line options as `with:` parameters, and use `env:` as normal. @@ -181,7 +181,7 @@ The second option, and the only one that supports other CI systems, is using a ` ```bash # requirements-cibw.txt -cibuildwheel==2.16.3 +cibuildwheel==2.16.4 ``` Then your install step would have `python -m pip install -r requirements-cibw.txt` in it. Your `.github/dependabot.yml` file could look like this: @@ -324,7 +324,7 @@ Solutions to this vary, but the simplest is to use pipx: # most runners have pipx preinstalled, but in case you don't python3 -m pip install pipx -pipx run cibuildwheel==2.16.3 --output-dir wheelhouse +pipx run cibuildwheel==2.16.4 --output-dir wheelhouse pipx run twine upload wheelhouse/*.whl ``` diff --git a/docs/setup.md b/docs/setup.md index a4697bfd..9356d78b 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -184,7 +184,7 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/ - uses: actions/checkout@v4 - name: Build wheels - run: pipx run cibuildwheel==2.16.3 + run: pipx run cibuildwheel==2.16.4 - uses: actions/upload-artifact@v4 with: @@ -220,7 +220,7 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/ - uses: actions/setup-python@v3 - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.16.3 + run: python -m pip install cibuildwheel==2.16.4 - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse diff --git a/examples/appveyor-minimal.yml b/examples/appveyor-minimal.yml index 84cbcca7..bc78a806 100644 --- a/examples/appveyor-minimal.yml +++ b/examples/appveyor-minimal.yml @@ -12,7 +12,7 @@ stack: python 3.7 init: - cmd: set PATH=C:\Python37;C:\Python37\Scripts;%PATH% -install: python -m pip install cibuildwheel==2.16.3 +install: python -m pip install cibuildwheel==2.16.4 build_script: python -m cibuildwheel --output-dir wheelhouse diff --git a/examples/azure-pipelines-minimal.yml b/examples/azure-pipelines-minimal.yml index 2ebf4da2..4aed1ac5 100644 --- a/examples/azure-pipelines-minimal.yml +++ b/examples/azure-pipelines-minimal.yml @@ -6,7 +6,7 @@ jobs: - bash: | set -o errexit python3 -m pip install --upgrade pip - pip3 install cibuildwheel==2.16.3 + pip3 install cibuildwheel==2.16.4 displayName: Install dependencies - bash: cibuildwheel --output-dir wheelhouse . displayName: Build wheels @@ -20,7 +20,7 @@ jobs: - bash: | set -o errexit python3 -m pip install --upgrade pip - python3 -m pip install cibuildwheel==2.16.3 + python3 -m pip install cibuildwheel==2.16.4 displayName: Install dependencies - bash: cibuildwheel --output-dir wheelhouse . displayName: Build wheels @@ -34,7 +34,7 @@ jobs: - bash: | set -o errexit python -m pip install --upgrade pip - pip install cibuildwheel==2.16.3 + pip install cibuildwheel==2.16.4 displayName: Install dependencies - bash: cibuildwheel --output-dir wheelhouse . displayName: Build wheels diff --git a/examples/circleci-minimal.yml b/examples/circleci-minimal.yml index e381af0d..a9d9691a 100644 --- a/examples/circleci-minimal.yml +++ b/examples/circleci-minimal.yml @@ -11,7 +11,7 @@ jobs: - run: name: Build the Linux wheels. command: | - pip3 install --user cibuildwheel==2.16.3 + pip3 install --user cibuildwheel==2.16.4 cibuildwheel --output-dir wheelhouse - store_artifacts: path: wheelhouse/ @@ -28,7 +28,7 @@ jobs: - run: name: Build the Linux aarch64 wheels. command: | - python3 -m pip install --user cibuildwheel==2.16.3 + python3 -m pip install --user cibuildwheel==2.16.4 python3 -m cibuildwheel --output-dir wheelhouse - store_artifacts: path: wheelhouse/ @@ -42,7 +42,7 @@ jobs: - run: name: Build the OS X wheels. command: | - pip3 install cibuildwheel==2.16.3 + pip3 install cibuildwheel==2.16.4 cibuildwheel --output-dir wheelhouse - store_artifacts: path: wheelhouse/ diff --git a/examples/cirrus-ci-intel-mac.yml b/examples/cirrus-ci-intel-mac.yml index 9c3e0fef..f4b1f556 100644 --- a/examples/cirrus-ci-intel-mac.yml +++ b/examples/cirrus-ci-intel-mac.yml @@ -1,6 +1,6 @@ build_and_store_wheels: &BUILD_AND_STORE_WHEELS install_cibuildwheel_script: - - python -m pip install cibuildwheel==2.16.3 + - python -m pip install cibuildwheel==2.16.4 run_cibuildwheel_script: - cibuildwheel wheels_artifacts: diff --git a/examples/cirrus-ci-minimal.yml b/examples/cirrus-ci-minimal.yml index b7481fb1..e49a1366 100644 --- a/examples/cirrus-ci-minimal.yml +++ b/examples/cirrus-ci-minimal.yml @@ -1,6 +1,6 @@ build_and_store_wheels: &BUILD_AND_STORE_WHEELS install_cibuildwheel_script: - - python -m pip install cibuildwheel==2.16.3 + - python -m pip install cibuildwheel==2.16.4 run_cibuildwheel_script: - cibuildwheel wheels_artifacts: diff --git a/examples/github-apple-silicon.yml b/examples/github-apple-silicon.yml index dfcf09c3..e4967f4c 100644 --- a/examples/github-apple-silicon.yml +++ b/examples/github-apple-silicon.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v4 - name: Build wheels - uses: pypa/cibuildwheel@v2.16.3 + uses: pypa/cibuildwheel@v2.16.4 env: CIBW_ARCHS_MACOS: x86_64 arm64 diff --git a/examples/github-deploy.yml b/examples/github-deploy.yml index 79068cc3..a89a8570 100644 --- a/examples/github-deploy.yml +++ b/examples/github-deploy.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v4 - name: Build wheels - uses: pypa/cibuildwheel@v2.16.3 + uses: pypa/cibuildwheel@v2.16.4 - uses: actions/upload-artifact@v4 with: diff --git a/examples/github-minimal.yml b/examples/github-minimal.yml index c2f9ce7e..a718d0f4 100644 --- a/examples/github-minimal.yml +++ b/examples/github-minimal.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v4 - name: Build wheels - uses: pypa/cibuildwheel@v2.16.3 + uses: pypa/cibuildwheel@v2.16.4 # env: # CIBW_SOME_OPTION: value # ... diff --git a/examples/github-with-qemu.yml b/examples/github-with-qemu.yml index cb3e328e..c85f13aa 100644 --- a/examples/github-with-qemu.yml +++ b/examples/github-with-qemu.yml @@ -20,7 +20,7 @@ jobs: platforms: all - name: Build wheels - uses: pypa/cibuildwheel@v2.16.3 + uses: pypa/cibuildwheel@v2.16.4 env: # configure cibuildwheel to build native archs ('auto'), and some # emulated ones diff --git a/examples/gitlab-minimal.yml b/examples/gitlab-minimal.yml index 5a6e8867..34776f69 100644 --- a/examples/gitlab-minimal.yml +++ b/examples/gitlab-minimal.yml @@ -12,7 +12,7 @@ linux: DOCKER_TLS_CERTDIR: "" script: - curl -sSL https://get.docker.com/ | sh - - python -m pip install cibuildwheel==2.16.3 + - python -m pip install cibuildwheel==2.16.4 - cibuildwheel --output-dir wheelhouse artifacts: paths: @@ -23,7 +23,7 @@ windows: before_script: - choco install python -y --version 3.8.6 - choco install git.install -y - - py -m pip install cibuildwheel==2.16.3 + - py -m pip install cibuildwheel==2.16.4 script: - py -m cibuildwheel --output-dir wheelhouse --platform windows artifacts: diff --git a/examples/gitlab-with-qemu.yml b/examples/gitlab-with-qemu.yml index 99667df0..f928c2c2 100644 --- a/examples/gitlab-with-qemu.yml +++ b/examples/gitlab-with-qemu.yml @@ -14,7 +14,7 @@ linux: - curl -sSL https://get.docker.com/ | sh # Warning: This is extremely slow, be careful with how many wheels you build - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - - python -m pip install cibuildwheel==2.16.3 + - python -m pip install cibuildwheel==2.16.4 # Assuming your CI runner's default architecture is x86_64... - cibuildwheel --output-dir wheelhouse --platform linux --archs aarch64 artifacts: diff --git a/examples/travis-ci-deploy.yml b/examples/travis-ci-deploy.yml index 570ada64..f69bf67a 100644 --- a/examples/travis-ci-deploy.yml +++ b/examples/travis-ci-deploy.yml @@ -20,7 +20,7 @@ jobs: - ln -s /c/Python38/python.exe /c/Python38/python3.exe install: - - python3 -m pip install cibuildwheel==2.16.3 + - python3 -m pip install cibuildwheel==2.16.4 script: # build the wheels, put them into './dist' diff --git a/examples/travis-ci-minimal.yml b/examples/travis-ci-minimal.yml index 74577af8..922fdb23 100644 --- a/examples/travis-ci-minimal.yml +++ b/examples/travis-ci-minimal.yml @@ -26,7 +26,7 @@ jobs: - ln -s /c/Python38/python.exe /c/Python38/python3.exe install: - - python3 -m pip install cibuildwheel==2.16.3 + - python3 -m pip install cibuildwheel==2.16.4 script: # build the wheels, put them into './wheelhouse' diff --git a/examples/travis-ci-test-and-deploy.yml b/examples/travis-ci-test-and-deploy.yml index ead3585a..a46a12b0 100644 --- a/examples/travis-ci-test-and-deploy.yml +++ b/examples/travis-ci-test-and-deploy.yml @@ -54,7 +54,7 @@ jobs: - stage: deploy name: Build and deploy Linux wheels services: docker - install: python3 -m pip install cibuildwheel==2.16.3 twine + install: python3 -m pip install cibuildwheel==2.16.4 twine script: python3 -m cibuildwheel --output-dir wheelhouse after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl # Deploy on windows @@ -62,7 +62,7 @@ jobs: name: Build and deploy Windows wheels os: windows language: shell - install: python3 -m pip install cibuildwheel==2.16.3 twine + install: python3 -m pip install cibuildwheel==2.16.4 twine script: python3 -m cibuildwheel --output-dir wheelhouse after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl diff --git a/setup.cfg b/setup.cfg index 8f9a4456..b3503bfc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = cibuildwheel -version = 2.16.3 +version = 2.16.4 description = Build Python wheels on CI with minimal configuration. long_description = file: README.md long_description_content_type = text/markdown From 7154e181e67814e7b124c2fa5ced94af4e28c6df Mon Sep 17 00:00:00 2001 From: "cibuildwheel-bot[bot]" <83877280+cibuildwheel-bot[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 09:40:23 -0500 Subject: [PATCH 04/15] [Bot] Update dependencies (#1738) Update dependencies Co-authored-by: cibuildwheel-bot[bot] <83877280+cibuildwheel-bot[bot]@users.noreply.github.com> --- cibuildwheel/resources/pinned_docker_images.cfg | 4 ++-- docs/working-examples.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cibuildwheel/resources/pinned_docker_images.cfg b/cibuildwheel/resources/pinned_docker_images.cfg index fe79c254..0178b6d7 100644 --- a/cibuildwheel/resources/pinned_docker_images.cfg +++ b/cibuildwheel/resources/pinned_docker_images.cfg @@ -1,5 +1,5 @@ [x86_64] -manylinux1 = quay.io/pypa/manylinux1_x86_64:2023-12-10-cee9633 +manylinux1 = quay.io/pypa/manylinux1_x86_64:2024-01-28-7b6687a manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177 manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2024-01-23-12ffabc manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-12-26-0d38463 @@ -8,7 +8,7 @@ musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2024-01-23-12ffabc musllinux_1_2 = quay.io/pypa/musllinux_1_2_x86_64:2024-01-23-12ffabc [i686] -manylinux1 = quay.io/pypa/manylinux1_i686:2023-12-10-cee9633 +manylinux1 = quay.io/pypa/manylinux1_i686:2024-01-28-7b6687a manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177 manylinux2014 = quay.io/pypa/manylinux2014_i686:2024-01-23-12ffabc manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-12-26-0d38463 diff --git a/docs/working-examples.md b/docs/working-examples.md index 99326894..8d08d932 100644 --- a/docs/working-examples.md +++ b/docs/working-examples.md @@ -88,8 +88,8 @@ title: Working examples | [PyGLM][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Fast OpenGL Mathematics (GLM) for Python | | [pillow-heif][] | ![github icon][] ![cirrusci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Bindings to libheif library with third party dependencies. Fully automated CI for tests and publishing including Apple Silicon builds. | | [TgCrypto][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes a Windows Travis build. | -| [iDynTree][] | ![github icon][] | ![linux icon][] | Uses manylinux_2_24 | | [bx-python][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | A library that includes Cython extensions. | +| [iDynTree][] | ![github icon][] | ![linux icon][] | Uses manylinux_2_24 | | [boost-histogram][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Supports full range of wheels, including PyPy and alternate archs. | | [Python-WebRTC][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | a Python extension that provides bindings to WebRTC M92 | | [pybase64][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Fast Base64 encoding/decoding in Python | @@ -195,8 +195,8 @@ title: Working examples [PyGLM]: https://github.com/Zuzu-Typ/PyGLM [pillow-heif]: https://github.com/bigcat88/pillow_heif [TgCrypto]: https://github.com/pyrogram/tgcrypto -[iDynTree]: https://github.com/robotology/idyntree [bx-python]: https://github.com/bxlab/bx-python +[iDynTree]: https://github.com/robotology/idyntree [boost-histogram]: https://github.com/scikit-hep/boost-histogram [Python-WebRTC]: https://github.com/MarshalX/python-webrtc [pybase64]: https://github.com/mayeut/pybase64 From d7db575b96a96a226a1209ef5fe01766702e6083 Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Mon, 29 Jan 2024 21:05:26 +0100 Subject: [PATCH 05/15] docs: add keyvi as an example that combines cibuildwheel with the ccache action to speedup runtime. (#1735) * add keyvi to working-examples.md Adding keyvi as example, it combines cibuildwheel with the ccache action to speedup runtime. * Update projects.yml * Update working-examples.md revert changes in auto-generated file * Update working-examples.md --- docs/data/projects.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/data/projects.yml b/docs/data/projects.yml index d73ae1cb..df0e85e4 100644 --- a/docs/data/projects.yml +++ b/docs/data/projects.yml @@ -638,3 +638,10 @@ os: [windows, linux, apple] pypi: werpy notes: An ultra-fast python package using optimized dynamic programming to compute the Word Error Rate (WER). + +- name: keyvi + gh: KeyviDev/keyvi + ci: [github] + os: [linux, apple] + pypi: keyvi + notes: FST based key value index highly optimized for size and lookup performance, utilizes ccache action for improved runtime From 07bd78c4e6a1244d2aaf9008a7349e81b296045d Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 29 Jan 2024 15:39:04 -0500 Subject: [PATCH 06/15] chore: check schemas Signed-off-by: Henry Schreiner --- .pre-commit-config.yaml | 17 ++++++++++++++++ docs/data/projects.schema.json | 37 ++++++++++++++++++++++++++++++++++ docs/data/projects.yml | 4 ++-- 3 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 docs/data/projects.schema.json diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b1ad5bc4..4c00c750 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -79,3 +79,20 @@ repos: - id: codespell args: ["-L", "sur", "-w"] exclude: ^docs/working-examples\.md$ # Autogenerated + + +- repo: https://github.com/python-jsonschema/check-jsonschema + rev: 0.27.0 + hooks: + - id: check-dependabot + - id: check-github-actions + - id: check-github-workflows + - id: check-gitlab-ci + - id: check-readthedocs + - id: check-travis + - id: check-jsonschema + name: Check projects + args: [--schemafile, docs/data/projects.schema.json] + files: '^docs/data/projects.yml$' + - id: check-metaschema + files: '^docs/data/projects.schema.json$' diff --git a/docs/data/projects.schema.json b/docs/data/projects.schema.json new file mode 100644 index 00000000..ba12ccb9 --- /dev/null +++ b/docs/data/projects.schema.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://github.com/pypa/cibuildwheel/blob/main/cibuildwheel/docs/data/projects.schema.json", + "type": "array", + "description": "The projects file for cibuildwheel", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { "type": "string" }, + "gh": { "type": "string", "pattern": "[^/]*/[^/]*" }, + "stars": { "$ref": "#/items/properties/gh" }, + "pypi": { "type": "string" }, + "notes": { "type": "string" }, + "ci": { + "type": "array", + "items": { + "enum": [ + "github", + "travisci", + "appveyor", + "circleci", + "gitlab", + "cirrusci", + "azurepipelines" + ] + } + }, + "ci_config": { "type": "string" }, + "os": { + "type": "array", + "items": { "enum": ["windows", "apple", "linux"] } + } + }, + "required": ["name", "gh", "ci", "os"] + } +} diff --git a/docs/data/projects.yml b/docs/data/projects.yml index df0e85e4..6dc23b87 100644 --- a/docs/data/projects.yml +++ b/docs/data/projects.yml @@ -603,13 +603,13 @@ gh: tensorchord/envd ci: [github] os: [apple, linux, windows] - note: A machine learning development environment build tool + notes: A machine learning development environment build tool - name: mosec gh: mosecorg/mosec ci: [github] os: [linux, apple] - note: A machine learning model serving framework powered by Rust + notes: A machine learning model serving framework powered by Rust - name: ril gh: Cryptex-github/ril-py From c753cd282d1e150e2d3f7534a3e25004d6c2cf5f Mon Sep 17 00:00:00 2001 From: Jordan Borean Date: Tue, 30 Jan 2024 09:17:04 +1000 Subject: [PATCH 07/15] Add support for PowerShell 7.4 in GHA Fixes compatibility with PowerShell 7.3 on Windows through GitHub Actions when one of the options for cibuildwheel is empty. --- action.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/action.yml b/action.yml index ab07817d..b71ede7a 100644 --- a/action.yml +++ b/action.yml @@ -46,7 +46,13 @@ runs: if: runner.os != 'Windows' # Windows needs powershell to interact nicely with Meson + # $PSNativeCommandArgumentPassing was introduced in pwsh 7.3 and the + # legacy behaviour is needed for backwards compatibility with how this + # was called in the past. - run: > + if ($PSNativeCommandArgumentPassing) { + $PSNativeCommandArgumentPassing = 'Legacy' + }; pipx run --python "${{ steps.python.outputs.python-path }}" --spec "${{ github.action_path }}" From 5b0b4583a81316a2675721d619aeec29a9d8d147 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 30 Jan 2024 18:00:26 -0500 Subject: [PATCH 08/15] fix: download pipx for action, allow support for M1 (#1743) * fix: download pipx for action, allow support for M1 Signed-off-by: Henry Schreiner * Update action.yml * Don't use the quotes on Powershell for command path * Use & to invoke a command with a string argument --------- Signed-off-by: Henry Schreiner Co-authored-by: Joe Rickerby --- action.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index b71ede7a..77b360c4 100644 --- a/action.yml +++ b/action.yml @@ -31,10 +31,14 @@ runs: python-version: "3.8 - 3.12" update-environment: false + # macos-14 (M1) may be missing pipx (due to it not having CPython) + - run: | + "${{ steps.python.outputs.python-path }}" -m pip install pipx + shell: bash + # Redirecting stderr to stdout to fix interleaving issue in Actions. - run: > - pipx run - --python '${{ steps.python.outputs.python-path }}' + "${{ steps.python.outputs.python-path }}" -m pipx run --spec '${{ github.action_path }}' cibuildwheel "${{ inputs.package-dir }}" @@ -53,8 +57,7 @@ runs: if ($PSNativeCommandArgumentPassing) { $PSNativeCommandArgumentPassing = 'Legacy' }; - pipx run - --python "${{ steps.python.outputs.python-path }}" + & "${{ steps.python.outputs.python-path }}" -m pipx run --spec "${{ github.action_path }}" cibuildwheel "${{ inputs.package-dir }}" From ce3fb7832089eb3e723a0a99cab7f3eaccf074fd Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Tue, 30 Jan 2024 23:14:28 +0000 Subject: [PATCH 09/15] Bump version: v2.16.5 --- README.md | 21 ++++++++------------- cibuildwheel/__init__.py | 2 +- docs/changelog.md | 7 +++++++ docs/faq.md | 6 +++--- docs/setup.md | 4 ++-- examples/appveyor-minimal.yml | 2 +- examples/azure-pipelines-minimal.yml | 6 +++--- examples/circleci-minimal.yml | 6 +++--- examples/cirrus-ci-intel-mac.yml | 2 +- examples/cirrus-ci-minimal.yml | 2 +- examples/github-apple-silicon.yml | 2 +- examples/github-deploy.yml | 2 +- examples/github-minimal.yml | 2 +- examples/github-with-qemu.yml | 2 +- examples/gitlab-minimal.yml | 4 ++-- examples/gitlab-with-qemu.yml | 2 +- examples/travis-ci-deploy.yml | 2 +- examples/travis-ci-minimal.yml | 2 +- examples/travis-ci-test-and-deploy.yml | 4 ++-- setup.cfg | 2 +- 20 files changed, 42 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 6d2b6d24..69532aaf 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ jobs: - uses: actions/setup-python@v3 - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.16.4 + run: python -m pip install cibuildwheel==2.16.5 - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse @@ -213,6 +213,13 @@ Changelog +### v2.16.5 + +_30 January 2024_ + +- πŸ› Fix an incompatibility with the GitHub Action and new GitHub Runner images for Windows that bundle Powershell 7.3+ (#1741) +- πŸ›  Preliminary support for new `macos-14` arm64 runners (#1743) + ### v2.16.4 _28 January 2024_ @@ -245,18 +252,6 @@ _26 September 2023_ - πŸ›  Updates the prerelease CPython 3.12 version to 3.12.0rc3 (#1625) - πŸ›  Only calls `linux32` in containers when necessary (#1599) -### v2.16.0 - -_18 September 2023_ - -- ✨ Add the ability to pass additional flags to a build frontend through the [CIBW_BUILD_FRONTEND](https://cibuildwheel.readthedocs.io/en/stable/options/#build-frontend) option (#1588). -- ✨ The environment variable SOURCE_DATE_EPOCH is now automatically passed through to container Linux builds (useful for [reproducible builds](https://reproducible-builds.org/docs/source-date-epoch/)!) (#1589) -- πŸ›  Updates the prerelease CPython 3.12 version to 3.12.0rc2 (#1604) -- πŸ› Fix `requires_python` auto-detection from setup.py when the call to `setup()` is within an `if __name__ == "__main__"` block (#1613) -- πŸ› Fix a bug that prevented building Linux wheels in Docker on a Windows host (#1573) -- πŸ› `--only` can now select prerelease-pythons (#1564) -- πŸ“š Docs & examples updates (#1582, #1593, #1598, #1615) - --- diff --git a/cibuildwheel/__init__.py b/cibuildwheel/__init__.py index 20173d4e..2bf43dda 100644 --- a/cibuildwheel/__init__.py +++ b/cibuildwheel/__init__.py @@ -1,3 +1,3 @@ from __future__ import annotations -__version__ = "2.16.4" +__version__ = "2.16.5" diff --git a/docs/changelog.md b/docs/changelog.md index fea56081..e961c813 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -4,6 +4,13 @@ title: Changelog # Changelog +### v2.16.5 + +_30 January 2024_ + +- πŸ› Fix an incompatibility with the GitHub Action and new GitHub Runner images for Windows that bundle Powershell 7.3+ (#1741) +- πŸ›  Preliminary support for new `macos-14` arm64 runners (#1743) + ### v2.16.4 _28 January 2024_ diff --git a/docs/faq.md b/docs/faq.md index 3a5bf090..82fc0859 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -159,7 +159,7 @@ There are two suggested methods for keeping cibuildwheel up to date that instead If you use GitHub Actions for builds, you can use cibuildwheel as an action: ```yaml -uses: pypa/cibuildwheel@v2.16.4 +uses: pypa/cibuildwheel@v2.16.5 ``` This is a composite step that just runs cibuildwheel using pipx. You can set command-line options as `with:` parameters, and use `env:` as normal. @@ -181,7 +181,7 @@ The second option, and the only one that supports other CI systems, is using a ` ```bash # requirements-cibw.txt -cibuildwheel==2.16.4 +cibuildwheel==2.16.5 ``` Then your install step would have `python -m pip install -r requirements-cibw.txt` in it. Your `.github/dependabot.yml` file could look like this: @@ -324,7 +324,7 @@ Solutions to this vary, but the simplest is to use pipx: # most runners have pipx preinstalled, but in case you don't python3 -m pip install pipx -pipx run cibuildwheel==2.16.4 --output-dir wheelhouse +pipx run cibuildwheel==2.16.5 --output-dir wheelhouse pipx run twine upload wheelhouse/*.whl ``` diff --git a/docs/setup.md b/docs/setup.md index 9356d78b..6f6f13f9 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -184,7 +184,7 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/ - uses: actions/checkout@v4 - name: Build wheels - run: pipx run cibuildwheel==2.16.4 + run: pipx run cibuildwheel==2.16.5 - uses: actions/upload-artifact@v4 with: @@ -220,7 +220,7 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/ - uses: actions/setup-python@v3 - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.16.4 + run: python -m pip install cibuildwheel==2.16.5 - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse diff --git a/examples/appveyor-minimal.yml b/examples/appveyor-minimal.yml index bc78a806..e08782e4 100644 --- a/examples/appveyor-minimal.yml +++ b/examples/appveyor-minimal.yml @@ -12,7 +12,7 @@ stack: python 3.7 init: - cmd: set PATH=C:\Python37;C:\Python37\Scripts;%PATH% -install: python -m pip install cibuildwheel==2.16.4 +install: python -m pip install cibuildwheel==2.16.5 build_script: python -m cibuildwheel --output-dir wheelhouse diff --git a/examples/azure-pipelines-minimal.yml b/examples/azure-pipelines-minimal.yml index 4aed1ac5..43324b3f 100644 --- a/examples/azure-pipelines-minimal.yml +++ b/examples/azure-pipelines-minimal.yml @@ -6,7 +6,7 @@ jobs: - bash: | set -o errexit python3 -m pip install --upgrade pip - pip3 install cibuildwheel==2.16.4 + pip3 install cibuildwheel==2.16.5 displayName: Install dependencies - bash: cibuildwheel --output-dir wheelhouse . displayName: Build wheels @@ -20,7 +20,7 @@ jobs: - bash: | set -o errexit python3 -m pip install --upgrade pip - python3 -m pip install cibuildwheel==2.16.4 + python3 -m pip install cibuildwheel==2.16.5 displayName: Install dependencies - bash: cibuildwheel --output-dir wheelhouse . displayName: Build wheels @@ -34,7 +34,7 @@ jobs: - bash: | set -o errexit python -m pip install --upgrade pip - pip install cibuildwheel==2.16.4 + pip install cibuildwheel==2.16.5 displayName: Install dependencies - bash: cibuildwheel --output-dir wheelhouse . displayName: Build wheels diff --git a/examples/circleci-minimal.yml b/examples/circleci-minimal.yml index a9d9691a..e55ae110 100644 --- a/examples/circleci-minimal.yml +++ b/examples/circleci-minimal.yml @@ -11,7 +11,7 @@ jobs: - run: name: Build the Linux wheels. command: | - pip3 install --user cibuildwheel==2.16.4 + pip3 install --user cibuildwheel==2.16.5 cibuildwheel --output-dir wheelhouse - store_artifacts: path: wheelhouse/ @@ -28,7 +28,7 @@ jobs: - run: name: Build the Linux aarch64 wheels. command: | - python3 -m pip install --user cibuildwheel==2.16.4 + python3 -m pip install --user cibuildwheel==2.16.5 python3 -m cibuildwheel --output-dir wheelhouse - store_artifacts: path: wheelhouse/ @@ -42,7 +42,7 @@ jobs: - run: name: Build the OS X wheels. command: | - pip3 install cibuildwheel==2.16.4 + pip3 install cibuildwheel==2.16.5 cibuildwheel --output-dir wheelhouse - store_artifacts: path: wheelhouse/ diff --git a/examples/cirrus-ci-intel-mac.yml b/examples/cirrus-ci-intel-mac.yml index f4b1f556..c510808e 100644 --- a/examples/cirrus-ci-intel-mac.yml +++ b/examples/cirrus-ci-intel-mac.yml @@ -1,6 +1,6 @@ build_and_store_wheels: &BUILD_AND_STORE_WHEELS install_cibuildwheel_script: - - python -m pip install cibuildwheel==2.16.4 + - python -m pip install cibuildwheel==2.16.5 run_cibuildwheel_script: - cibuildwheel wheels_artifacts: diff --git a/examples/cirrus-ci-minimal.yml b/examples/cirrus-ci-minimal.yml index e49a1366..53ef414b 100644 --- a/examples/cirrus-ci-minimal.yml +++ b/examples/cirrus-ci-minimal.yml @@ -1,6 +1,6 @@ build_and_store_wheels: &BUILD_AND_STORE_WHEELS install_cibuildwheel_script: - - python -m pip install cibuildwheel==2.16.4 + - python -m pip install cibuildwheel==2.16.5 run_cibuildwheel_script: - cibuildwheel wheels_artifacts: diff --git a/examples/github-apple-silicon.yml b/examples/github-apple-silicon.yml index e4967f4c..87a8421f 100644 --- a/examples/github-apple-silicon.yml +++ b/examples/github-apple-silicon.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v4 - name: Build wheels - uses: pypa/cibuildwheel@v2.16.4 + uses: pypa/cibuildwheel@v2.16.5 env: CIBW_ARCHS_MACOS: x86_64 arm64 diff --git a/examples/github-deploy.yml b/examples/github-deploy.yml index a89a8570..57e4c871 100644 --- a/examples/github-deploy.yml +++ b/examples/github-deploy.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v4 - name: Build wheels - uses: pypa/cibuildwheel@v2.16.4 + uses: pypa/cibuildwheel@v2.16.5 - uses: actions/upload-artifact@v4 with: diff --git a/examples/github-minimal.yml b/examples/github-minimal.yml index a718d0f4..de3e5ee2 100644 --- a/examples/github-minimal.yml +++ b/examples/github-minimal.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v4 - name: Build wheels - uses: pypa/cibuildwheel@v2.16.4 + uses: pypa/cibuildwheel@v2.16.5 # env: # CIBW_SOME_OPTION: value # ... diff --git a/examples/github-with-qemu.yml b/examples/github-with-qemu.yml index c85f13aa..e218f32e 100644 --- a/examples/github-with-qemu.yml +++ b/examples/github-with-qemu.yml @@ -20,7 +20,7 @@ jobs: platforms: all - name: Build wheels - uses: pypa/cibuildwheel@v2.16.4 + uses: pypa/cibuildwheel@v2.16.5 env: # configure cibuildwheel to build native archs ('auto'), and some # emulated ones diff --git a/examples/gitlab-minimal.yml b/examples/gitlab-minimal.yml index 34776f69..cc06c37f 100644 --- a/examples/gitlab-minimal.yml +++ b/examples/gitlab-minimal.yml @@ -12,7 +12,7 @@ linux: DOCKER_TLS_CERTDIR: "" script: - curl -sSL https://get.docker.com/ | sh - - python -m pip install cibuildwheel==2.16.4 + - python -m pip install cibuildwheel==2.16.5 - cibuildwheel --output-dir wheelhouse artifacts: paths: @@ -23,7 +23,7 @@ windows: before_script: - choco install python -y --version 3.8.6 - choco install git.install -y - - py -m pip install cibuildwheel==2.16.4 + - py -m pip install cibuildwheel==2.16.5 script: - py -m cibuildwheel --output-dir wheelhouse --platform windows artifacts: diff --git a/examples/gitlab-with-qemu.yml b/examples/gitlab-with-qemu.yml index f928c2c2..1211631e 100644 --- a/examples/gitlab-with-qemu.yml +++ b/examples/gitlab-with-qemu.yml @@ -14,7 +14,7 @@ linux: - curl -sSL https://get.docker.com/ | sh # Warning: This is extremely slow, be careful with how many wheels you build - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - - python -m pip install cibuildwheel==2.16.4 + - python -m pip install cibuildwheel==2.16.5 # Assuming your CI runner's default architecture is x86_64... - cibuildwheel --output-dir wheelhouse --platform linux --archs aarch64 artifacts: diff --git a/examples/travis-ci-deploy.yml b/examples/travis-ci-deploy.yml index f69bf67a..ccd0aab3 100644 --- a/examples/travis-ci-deploy.yml +++ b/examples/travis-ci-deploy.yml @@ -20,7 +20,7 @@ jobs: - ln -s /c/Python38/python.exe /c/Python38/python3.exe install: - - python3 -m pip install cibuildwheel==2.16.4 + - python3 -m pip install cibuildwheel==2.16.5 script: # build the wheels, put them into './dist' diff --git a/examples/travis-ci-minimal.yml b/examples/travis-ci-minimal.yml index 922fdb23..ec5add51 100644 --- a/examples/travis-ci-minimal.yml +++ b/examples/travis-ci-minimal.yml @@ -26,7 +26,7 @@ jobs: - ln -s /c/Python38/python.exe /c/Python38/python3.exe install: - - python3 -m pip install cibuildwheel==2.16.4 + - python3 -m pip install cibuildwheel==2.16.5 script: # build the wheels, put them into './wheelhouse' diff --git a/examples/travis-ci-test-and-deploy.yml b/examples/travis-ci-test-and-deploy.yml index a46a12b0..21f44bf1 100644 --- a/examples/travis-ci-test-and-deploy.yml +++ b/examples/travis-ci-test-and-deploy.yml @@ -54,7 +54,7 @@ jobs: - stage: deploy name: Build and deploy Linux wheels services: docker - install: python3 -m pip install cibuildwheel==2.16.4 twine + install: python3 -m pip install cibuildwheel==2.16.5 twine script: python3 -m cibuildwheel --output-dir wheelhouse after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl # Deploy on windows @@ -62,7 +62,7 @@ jobs: name: Build and deploy Windows wheels os: windows language: shell - install: python3 -m pip install cibuildwheel==2.16.4 twine + install: python3 -m pip install cibuildwheel==2.16.5 twine script: python3 -m cibuildwheel --output-dir wheelhouse after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl diff --git a/setup.cfg b/setup.cfg index b3503bfc..828c5890 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = cibuildwheel -version = 2.16.4 +version = 2.16.5 description = Build Python wheels on CI with minimal configuration. long_description = file: README.md long_description_content_type = text/markdown From a78facb861c2169ad7b47a4aa1b1dae0d1c75d3a Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Thu, 1 Feb 2024 00:33:33 -0500 Subject: [PATCH 10/15] test macos_x86-64 and arm64 in different venv dir --- cibuildwheel/macos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index bf2290f3..14b219e5 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -543,7 +543,7 @@ def build(options: Options, tmp_path: Path) -> None: # there are no dependencies that were pulled in at build time. call("pip", "install", "virtualenv", *dependency_constraint_flags, env=env) - venv_dir = identifier_tmp_dir / "venv-test" + venv_dir = identifier_tmp_dir / f"venv-test-{testing_arch}" arch_prefix = [] if testing_arch != machine_arch: From d635c0eee6d313880907470ede26bb15209798da Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Fri, 2 Feb 2024 17:51:54 +0000 Subject: [PATCH 11/15] Add integration test --- test/test_macos_archs.py | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/test/test_macos_archs.py b/test/test_macos_archs.py index 4d03dfc5..80945351 100644 --- a/test/test_macos_archs.py +++ b/test/test_macos_archs.py @@ -135,7 +135,7 @@ def test_deployment_target_warning_is_firing(tmp_path, capfd): @pytest.mark.parametrize("skip_arm64_test", [False, True]) -def test_universal2_testing(tmp_path, capfd, skip_arm64_test): +def test_universal2_testing_on_x86_64(tmp_path, capfd, skip_arm64_test): if utils.platform != "macos": pytest.skip("this test is only relevant to macos") if get_xcode_version() < (12, 2): @@ -173,6 +173,35 @@ def test_universal2_testing(tmp_path, capfd, skip_arm64_test): assert set(actual_wheels) == set(expected_wheels) +def test_universal2_testing_on_arm64(tmp_path, capfd): + # cibuildwheel should test the universal2 wheel on both x86_64 and arm64, when run on arm64 + if utils.platform != "macos": + pytest.skip("this test is only relevant to macos") + if platform.machine() != "arm64": + pytest.skip("this test only works on arm64") + + project_dir = tmp_path / "project" + basic_project.generate(project_dir) + + actual_wheels = utils.cibuildwheel_run( + project_dir, + add_env={ + "CIBW_BUILD": "cp39-*", + "CIBW_ARCHS": "universal2", + # check that a native dependency is correctly installed, once per each testing arch + "CIBW_TEST_REQUIRES": "numpy", + "CIBW_TEST_COMMAND": '''python -c "import numpy, platform; print(f'running tests on {platform.machine()} with numpy {numpy.__version__}')"''', + }, + ) + + captured = capfd.readouterr() + assert "running tests on arm64" in captured.out + assert "running tests on x86_64" in captured.out + + expected_wheels = [w for w in ALL_MACOS_WHEELS if "cp39" in w and "universal2" in w] + assert set(actual_wheels) == set(expected_wheels) + + def test_cp38_arm64_testing(tmp_path, capfd): if utils.platform != "macos": pytest.skip("this test is only relevant to macos") From c7a653d6a9cf205f01b594bac0b8377ec6b683b5 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 2 Feb 2024 21:02:42 -0500 Subject: [PATCH 12/15] chore: minor touchups to pyproject (#1751) --- pyproject.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 64726c49..ca0f39d9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ log_cli_level = "info" [tool.mypy] -python_version = 3.8 +python_version = "3.8" files = [ "cibuildwheel/*.py", "test/**/*.py", @@ -24,7 +24,6 @@ files = [ "noxfile.py", ] warn_unused_configs = true -show_error_codes = true warn_redundant_casts = true no_implicit_reexport = true @@ -163,3 +162,6 @@ flake8-unused-arguments.ignore-variadic-names = true [tool.ruff.lint.per-file-ignores] "unit_test/*" = ["PLC1901"] "cibuildwheel/_compat/**.py" = ["TID251"] + +[tool.repo-review] +ignore = ["PC170", "PP303"] From abd05a65bafa73864cec0bb8f4853747b10fc2c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 13:29:35 +0000 Subject: [PATCH 13/15] chore(deps): bump the actions group with 1 update Bumps the actions group with 1 update: [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request). Updates `peter-evans/create-pull-request` from 5 to 6 - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v5...v6) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] --- .github/workflows/update-dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index cad08a00..85f56be2 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -44,7 +44,7 @@ jobs: - name: Create Pull Request if: github.ref == 'refs/heads/main' && github.repository == 'pypa/cibuildwheel' - uses: peter-evans/create-pull-request@v5 + uses: peter-evans/create-pull-request@v6 with: commit-message: Update dependencies title: '[Bot] Update dependencies' From dfca0ce96a3cda406ce47dbc6fbc76622829f6ec Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 18:23:05 +0000 Subject: [PATCH 14/15] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.1.14 β†’ v0.2.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.14...v0.2.0) - [github.com/python-jsonschema/check-jsonschema: 0.27.0 β†’ 0.27.4](https://github.com/python-jsonschema/check-jsonschema/compare/0.27.0...0.27.4) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4c00c750..01caae9b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.14 + rev: v0.2.0 hooks: - id: ruff args: ["--fix", "--show-fixes"] @@ -82,7 +82,7 @@ repos: - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.27.0 + rev: 0.27.4 hooks: - id: check-dependabot - id: check-github-actions From 81b0a578df5f32edbd87392d8629117da4a024fe Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Sat, 10 Feb 2024 09:55:38 +0100 Subject: [PATCH 15/15] chore(CI): test on GHA macOS-14 runner (#1700) * chore(CI): test on GHA macOS-14 runner * update error message for skipped arm64 tests * Update docs, README and examples --------- Co-authored-by: Henry Schreiner Co-authored-by: Joe Rickerby Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com> --- .github/workflows/test.yml | 2 +- README.md | 29 ++++++++++------------- cibuildwheel/macos.py | 15 ++++++------ docs/extra.css | 2 +- docs/faq.md | 39 +++++++++---------------------- docs/options.md | 4 ++-- docs/setup.md | 6 +++-- examples/github-apple-silicon.yml | 20 ---------------- examples/github-deploy.yml | 3 ++- examples/github-minimal.yml | 3 ++- examples/github-with-qemu.yml | 2 +- test/test_macos_archs.py | 6 ++--- 12 files changed, 46 insertions(+), 85 deletions(-) delete mode 100644 examples/github-apple-silicon.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 04b39847..21c77520 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,7 +38,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04, windows-latest, macos-11] + os: [ubuntu-20.04, windows-latest, macos-13, macos-14] python_version: ['3.12'] include: - os: ubuntu-22.04 diff --git a/README.md b/README.md index 69532aaf..493b0792 100644 --- a/README.md +++ b/README.md @@ -27,20 +27,17 @@ What does it do? | CPythonΒ 3.6 | βœ… | N/A | βœ… | βœ… | N/A | βœ… | βœ… | βœ… | βœ… | βœ… | | CPythonΒ 3.7 | βœ… | N/A | βœ… | βœ… | N/A | βœ… | βœ… | βœ… | βœ… | βœ… | | CPythonΒ 3.8 | βœ… | βœ… | βœ… | βœ… | N/A | βœ… | βœ… | βœ… | βœ… | βœ… | -| CPythonΒ 3.9 | βœ… | βœ… | βœ… | βœ… | βœ…Β² | βœ…Β³ | βœ… | βœ… | βœ… | βœ… | +| CPythonΒ 3.9 | βœ… | βœ… | βœ… | βœ… | βœ…Β² | βœ… | βœ… | βœ… | βœ… | βœ… | | CPythonΒ 3.10 | βœ… | βœ… | βœ… | βœ… | βœ…Β² | βœ… | βœ… | βœ… | βœ… | βœ… | | CPythonΒ 3.11 | βœ… | βœ… | βœ… | βœ… | βœ…Β² | βœ… | βœ… | βœ… | βœ… | βœ… | -| CPythonΒ 3.12⁡ | βœ… | βœ… | βœ… | βœ… | βœ…Β² | βœ… | βœ… | βœ… | βœ… | βœ… | +| CPythonΒ 3.12 | βœ… | βœ… | βœ… | βœ… | βœ…Β² | βœ… | βœ… | βœ… | βœ… | βœ… | | PyPyΒ 3.7 v7.3 | βœ… | N/A | βœ… | N/A | N/A | βœ…ΒΉ | βœ…ΒΉ | βœ…ΒΉ | N/A | N/A | -| PyPyΒ 3.8 v7.3 | βœ… | βœ…β΄ | βœ… | N/A | N/A | βœ…ΒΉ | βœ…ΒΉ | βœ…ΒΉ | N/A | N/A | -| PyPyΒ 3.9 v7.3 | βœ… | βœ…β΄ | βœ… | N/A | N/A | βœ…ΒΉ | βœ…ΒΉ | βœ…ΒΉ | N/A | N/A | -| PyPyΒ 3.10 v7.3 | βœ… | βœ…β΄ | βœ… | N/A | N/A | βœ…ΒΉ | βœ…ΒΉ | βœ…ΒΉ | N/A | N/A | +| PyPyΒ 3.8 v7.3 | βœ… | βœ… | βœ… | N/A | N/A | βœ…ΒΉ | βœ…ΒΉ | βœ…ΒΉ | N/A | N/A | +| PyPyΒ 3.9 v7.3 | βœ… | βœ… | βœ… | N/A | N/A | βœ…ΒΉ | βœ…ΒΉ | βœ…ΒΉ | N/A | N/A | +| PyPyΒ 3.10 v7.3 | βœ… | βœ… | βœ… | N/A | N/A | βœ…ΒΉ | βœ…ΒΉ | βœ…ΒΉ | N/A | N/A | ΒΉ PyPy is only supported for manylinux wheels.
Β² Windows arm64 support is experimental.
-Β³ Alpine 3.14 and very briefly 3.15's default python3 [was not able to load](https://github.com/pypa/cibuildwheel/issues/934) musllinux wheels. This has been fixed; please upgrade the python package if using Alpine from before the fix.
-⁴ Cross-compilation not supported with PyPy - to build these wheels you need to run cibuildwheel on an Apple Silicon machine.
-⁡ CPython 3.12 is built by default using Python RCs, starting with cibuildwheel 2.15.
- Builds manylinux, musllinux, macOS 10.9+, and Windows wheels for CPython and PyPy - Works on GitHub Actions, Azure Pipelines, Travis CI, AppVeyor, CircleCI, GitLab CI, and Cirrus CI @@ -56,18 +53,16 @@ Usage | | Linux | macOS | Windows | Linux ARM | macOS ARM | Windows ARM | |-----------------|-------|-------|---------|-----------|-----------|-------------| -| GitHub Actions | βœ… | βœ… | βœ… | βœ…ΒΉ | βœ…Β² | βœ…β΄ | -| Azure Pipelines | βœ… | βœ… | βœ… | | βœ…Β² | βœ…β΄ | +| GitHub Actions | βœ… | βœ… | βœ… | βœ…ΒΉ | βœ… | βœ…Β² | +| Azure Pipelines | βœ… | βœ… | βœ… | | βœ… | βœ…Β² | | Travis CI | βœ… | | βœ… | βœ… | | | -| AppVeyor | βœ… | βœ… | βœ… | | βœ…Β² | βœ…β΄ | -| CircleCI | βœ… | βœ… | | βœ… | βœ…Β² | | +| AppVeyor | βœ… | βœ… | βœ… | | βœ… | βœ…Β² | +| CircleCI | βœ… | βœ… | | βœ… | βœ… | | | Gitlab CI | βœ… | | βœ… | βœ…ΒΉ | | | -| Cirrus CI | βœ… | βœ…Β³ | βœ… | βœ… | βœ… | | +| Cirrus CI | βœ… | βœ… | βœ… | βœ… | βœ… | | ΒΉ [Requires emulation](https://cibuildwheel.readthedocs.io/en/stable/faq/#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](https://cibuildwheel.readthedocs.io/en/stable/faq/#universal2). It is not possible to test `arm64` and the `arm64` part of a `universal2` wheel on this CI platform.
-Β³ [Uses cross-compilation](https://cibuildwheel.readthedocs.io/en/stable/faq/#universal2). Thanks to Rosetta 2 emulation, it is possible to test `x86_64` and both parts of a `universal2` wheel on this CI platform.
-⁴ [Uses cross-compilation](https://cibuildwheel.readthedocs.io/en/stable/faq/#windows-arm64). It is not possible to test `arm64` on this CI platform. +² [Uses cross-compilation](https://cibuildwheel.readthedocs.io/en/stable/faq/#windows-arm64). It is not possible to test `arm64` on this CI platform. @@ -87,7 +82,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04, windows-2019, macOS-11] + os: [ubuntu-latest, windows-latest, macos-13, macos-14] steps: - uses: actions/checkout@v4 diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index 14b219e5..a6eb2969 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -488,9 +488,8 @@ def build(options: Options, tmp_path: Path) -> None: unwrap( """ While arm64 wheels can be built on x86_64, they cannot be - tested. The ability to test the arm64 wheels will be added in a - future release of cibuildwheel, once Apple Silicon CI runners - are widely available. To silence this warning, set + tested. Consider building arm64 wheels natively, if your CI + provider offers this. To silence this warning, set `CIBW_TEST_SKIP: "*-macosx_arm64"`. """ ) @@ -500,11 +499,11 @@ def build(options: Options, tmp_path: Path) -> None: unwrap( """ While universal2 wheels can be built on x86_64, the arm64 part - of them cannot currently be tested. The ability to test the - arm64 part of a universal2 wheel will be added in a future - release of cibuildwheel, once Apple Silicon CI runners are - widely available. To silence this warning, set - `CIBW_TEST_SKIP: "*-macosx_universal2:arm64"`. + of the wheel cannot be tested on x86_64. Consider building + universal2 wheels on an arm64 runner, if your CI provider offers + this. Notably, an arm64 runner can also test the x86_64 part of + the wheel, through Rosetta emulation. To silence this warning, + set `CIBW_TEST_SKIP: "*-macosx_universal2:arm64"`. """ ) ) diff --git a/docs/extra.css b/docs/extra.css index 232ca2c7..403a4ffd 100644 --- a/docs/extra.css +++ b/docs/extra.css @@ -255,7 +255,7 @@ h1, h2, h3, h4, h5, h6 { border: none; color: inherit; background-color: #f0f1f1; - font-size: 100%; + font-size: 80%; } diff --git a/docs/faq.md b/docs/faq.md index 82fc0859..807ff2b2 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -20,11 +20,11 @@ Linux wheels are built in [`manylinux`/`musllinux` containers](https://github.co ### Building macOS wheels for Apple Silicon {: #apple-silicon} -`cibuildwheel` supports cross-compiling `universal2` and `arm64` wheels on `x86_64` runners. +`cibuildwheel` supports both native builds and cross-compiling between `arm64` (Apple Silicon) and `x86_64` (Intel) architectures, including the cross-compatible `universal2` format. #### Overview of Mac architectures -With the introduction of Apple Silicon, you now have several choices for wheels for Python 3.8+: +You have several choices for wheels for Python 3.8+: ##### `x86_64` @@ -68,43 +68,26 @@ Opinions vary on which of arch-specific or `universal2` wheels are best - some p See [GitHub issue 1333](https://github.com/pypa/cibuildwheel/issues/1333) for more discussion. -#### How to cross-compile +#### How? -With the exception of Cirrus CI, macOS CI runners are still Intel-based, and Apple Silicon wheels are not built by default on Intel runners. However, cross-compilation can be enabled by adding extra archs to the [`CIBW_ARCHS_MACOS` option](options.md#archs) - e.g. `x86_64 arm64`. Cross-compilation is provided by the Xcode toolchain. +It's easiest to build `x86_64` wheels on `x86_64` runners, and `arm64` wheels on `arm64` runners. -!!! important - When cross-compiling on Intel, it is not possible to test `arm64` and the `arm64` part of a `universal2` wheel. +On GitHub Actions, `macos-14` runners are `arm64`, and `macos-13` runners are `x86_64`. So all you need to do is ensure both are in your build matrix. - `cibuildwheel` will raise a warning to notify you of this - these warnings be be silenced by skipping testing on these platforms: `CIBW_TEST_SKIP: "*_arm64 *_universal2:arm64"`. +#### Cross-compiling -!!! note - Your runner needs Xcode Command Line Tools 12.2 or later to build `universal2` or `arm64`. +If your CI provider doesn't offer arm64 runners yet, or you want to create `universal2`, you'll have to cross-compile. Cross-compilation can be enabled by adding extra archs to the [`CIBW_ARCHS_MACOS` option](options.md#archs) - e.g. `CIBW_ARCHS_MACOS="x86_64 universal2"`. Cross-compilation is provided by Xcode toolchain v12.2+. - Only CPython 3.8 and newer support `universal2` and `arm64` wheels. +Regarding testing, + +- On an arm64 runner, it is possible to test x86_64 wheels and both parts of a universal2 wheel using Rosetta 2 emulation. +- On an x86_64 runner, arm64 code can be compiled but it can't be tested. `cibuildwheel` will raise a warning to notify you of this - these warnings can be silenced by skipping testing on these platforms: `CIBW_TEST_SKIP: "*_arm64 *_universal2:arm64"`. !!! note If your project uses **Poetry** as a build backend, cross-compiling on macOS [does not currently work](https://github.com/python-poetry/poetry/issues/7107). In some cases arm64 wheels can be built but their tags will be incorrect, with the platform tag showing `x86_64` instead of `arm64`. As a workaround, the tag can be fixed before running delocate to repair the wheel. The [`wheel tags`](https://wheel.readthedocs.io/en/stable/reference/wheel_tags.html) command is ideal for this. See [this workflow](https://gist.github.com/anderssonjohan/49f07e33fc5cb2420515a8ac76dc0c95#file-build-pendulum-wheels-yml-L39-L53) for an example usage of `wheel tags`. -Hopefully, cross-compilation is a temporary situation. Once we have widely available Apple Silicon CI runners, we can build `arm64` wheels natively. Until then, cross-compiling `arm64` or `universal2` wheels requires opt-in by setting `CIBW_ARCHS_MACOS` on Intel runners. - -Here's an example GitHub Actions workflow with a job that builds for Apple Silicon: - -> .github/workflows/build_macos.yml - -```yml -{% include "../examples/github-apple-silicon.yml" %} -``` - -Here's an example Cirrus CI workflow with a job that builds for macOS Intel through Rosetta 2 emulation and for Apple Silicon natively: - -> .cirrus.yml - -```yml -{% include "../examples/cirrus-ci-intel-mac.yml" %} -``` - ### Building Linux wheels for non-native archs using emulation {: #emulation} cibuildwheel supports building non-native architectures on Linux, via diff --git a/docs/options.md b/docs/options.md index a339e28e..2f047e3d 100644 --- a/docs/options.md +++ b/docs/options.md @@ -343,8 +343,8 @@ See the [cibuildwheel 1 documentation](https://cibuildwheel.readthedocs.io/en/1. A list of architectures to build. -On macOS, this option can be used to cross-compile between `x86_64`, -`universal2` and `arm64` for Apple Silicon support. +On macOS, this option can be used to [cross-compile](faq.md#cross-compiling) +between `x86_64`, `universal2` and `arm64`. On Linux, this option can be used to build non-native architectures under emulation. See [this guide](faq.md#emulation) for more information. diff --git a/docs/setup.md b/docs/setup.md index 6f6f13f9..a915b8c3 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -178,7 +178,8 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/ runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04, windows-2019, macos-11] + # macos-13 is an intel runner, macos-14 is apple silicon + os: [ubuntu-20.04, windows-2019, macos-13, macos-14] steps: - uses: actions/checkout@v4 @@ -211,7 +212,8 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/ runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04, windows-2019, macos-11] + # macos-13 is an intel runner, macos-14 is apple silicon + os: [ubuntu-20.04, windows-2019, macos-13, macos-14] steps: - uses: actions/checkout@v4 diff --git a/examples/github-apple-silicon.yml b/examples/github-apple-silicon.yml deleted file mode 100644 index 87a8421f..00000000 --- a/examples/github-apple-silicon.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Build - -on: [push, pull_request] - -jobs: - build_wheels_macos: - name: Build wheels on macos-11 - runs-on: macos-11 - steps: - - uses: actions/checkout@v4 - - - name: Build wheels - uses: pypa/cibuildwheel@v2.16.5 - env: - CIBW_ARCHS_MACOS: x86_64 arm64 - - - uses: actions/upload-artifact@v4 - with: - name: cibw-wheels-macos - path: ./wheelhouse/*.whl diff --git a/examples/github-deploy.yml b/examples/github-deploy.yml index 57e4c871..3a9a5f03 100644 --- a/examples/github-deploy.yml +++ b/examples/github-deploy.yml @@ -16,7 +16,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04, windows-2022, macos-11] + # macos-13 is an intel runner, macos-14 is apple silicon + os: [ubuntu-22.04, windows-2022, macos-13, macos-14] steps: - uses: actions/checkout@v4 diff --git a/examples/github-minimal.yml b/examples/github-minimal.yml index de3e5ee2..ea5e337a 100644 --- a/examples/github-minimal.yml +++ b/examples/github-minimal.yml @@ -8,7 +8,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04, windows-2019, macos-11] + # macos-13 is an intel runner, macos-14 is apple silicon + os: [ubuntu-20.04, windows-2019, macos-13, macos-14] steps: - uses: actions/checkout@v4 diff --git a/examples/github-with-qemu.yml b/examples/github-with-qemu.yml index e218f32e..2c8ddd4b 100644 --- a/examples/github-with-qemu.yml +++ b/examples/github-with-qemu.yml @@ -8,7 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04, windows-2019, macos-11] + os: [ubuntu-20.04, windows-2019, macos-13, macos-14] steps: - uses: actions/checkout@v4 diff --git a/test/test_macos_archs.py b/test/test_macos_archs.py index 80945351..0437778e 100644 --- a/test/test_macos_archs.py +++ b/test/test_macos_archs.py @@ -83,7 +83,7 @@ def test_cross_compiled_test(tmp_path, capfd, build_universal2): assert "running tests on arm64" not in captured.out if build_universal2: assert ( - "While universal2 wheels can be built on x86_64, the arm64 part of them cannot currently be tested" + "While universal2 wheels can be built on x86_64, the arm64 part of the wheel cannot be tested" in captured.err ) else: @@ -95,7 +95,7 @@ def test_cross_compiled_test(tmp_path, capfd, build_universal2): assert "running tests on x86_64" in captured.out assert "running tests on arm64" in captured.out assert ( - "While universal2 wheels can be built on x86_64, the arm64 part of them cannot currently be tested" + "While universal2 wheels can be built on x86_64, the arm64 part of the wheel cannot be tested" not in captured.err ) assert ( @@ -162,7 +162,7 @@ def test_universal2_testing_on_x86_64(tmp_path, capfd, skip_arm64_test): assert "running tests on x86_64" in captured.out assert "running tests on arm64" not in captured.out - warning_message = "While universal2 wheels can be built on x86_64, the arm64 part of them cannot currently be tested" + warning_message = "While universal2 wheels can be built on x86_64, the arm64 part of the wheel cannot be tested" if skip_arm64_test: assert warning_message not in captured.err else: