Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd033a4447 | ||
|
|
9d023cf77a | ||
|
|
8a69dbd9d4 | ||
|
|
147de6f4f7 | ||
|
|
e217e44661 | ||
|
|
871ef6b506 | ||
|
|
fac72f024a | ||
|
|
d4c332104d | ||
|
|
5af5df4e4f | ||
|
|
6c5cf87871 | ||
|
|
46f4108f23 | ||
|
|
1da439f8dc | ||
|
|
7af9d039fb | ||
|
|
de84624d70 | ||
|
|
cac121a67d | ||
|
|
604da878cb | ||
|
|
eaf0051162 | ||
|
|
8dcf71e02d | ||
|
|
92f0142a3e | ||
|
|
6c8347f465 | ||
|
|
a4d24056ef | ||
|
|
7e5a838a63 | ||
|
|
19e1b8a4b0 | ||
|
|
73581ae579 | ||
|
|
f21ff5e84c | ||
|
|
973946b172 | ||
|
|
5ea40e6ff3 | ||
|
|
6a36f6494b | ||
|
|
31de15bcd9 | ||
|
|
3179fd215a | ||
|
|
184d4e1280 | ||
|
|
08165ffeed | ||
|
|
9bb03835e5 | ||
|
|
2552303ff3 | ||
|
|
5b74582a72 | ||
|
|
4470eb0dd9 | ||
|
|
8bda260d3a | ||
|
|
5b5a95bdc2 | ||
|
|
561fa32683 | ||
|
|
70913f0a49 | ||
|
|
f49397f151 | ||
|
|
c1b8a12cd5 | ||
|
|
932529cab1 | ||
|
|
70fb1c4a1a | ||
|
|
405a475ac7 | ||
|
|
78da7bafcc | ||
|
|
8d86d3122b | ||
|
|
89a5cfe272 | ||
|
|
8d5d84e0fc | ||
|
|
4ada77dea4 | ||
|
|
829441f4a0 |
@@ -1,9 +1,10 @@
|
||||
version: 2
|
||||
|
||||
jobs:
|
||||
osx-python3.9:
|
||||
osx-python3.12:
|
||||
macos:
|
||||
xcode: 12.5.1
|
||||
xcode: 15.4.0
|
||||
resource_class: macos.m1.medium.gen1
|
||||
environment:
|
||||
PYTHON: python3
|
||||
steps:
|
||||
@@ -17,9 +18,9 @@ jobs:
|
||||
command: venv/bin/python ./bin/run_tests.py
|
||||
no_output_timeout: 30m
|
||||
|
||||
linux-python3.9:
|
||||
linux-python3.12:
|
||||
docker:
|
||||
- image: circleci/python:3.9
|
||||
- image: cimg/python:3.12
|
||||
environment:
|
||||
PYTHON: python3
|
||||
# Temporarily restrict the tests that are run on CircleCI to prevent
|
||||
@@ -61,6 +62,6 @@ workflows:
|
||||
version: 2
|
||||
all-tests:
|
||||
jobs:
|
||||
- osx-python3.9
|
||||
- linux-python3.9
|
||||
- osx-python3.12
|
||||
- linux-python3.12
|
||||
- linux-aarch64
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
set -o errexit
|
||||
set -o xtrace
|
||||
|
||||
if [ "$(uname -s)" == "Darwin" ]; then
|
||||
sudo softwareupdate --install-rosetta --agree-to-license
|
||||
fi
|
||||
|
||||
$PYTHON --version
|
||||
$PYTHON -m pip --version
|
||||
$PYTHON -m virtualenv --version
|
||||
$PYTHON -m virtualenv --no-setuptools --no-wheel -p "$PYTHON" venv
|
||||
$PYTHON -m venv venv
|
||||
venv/bin/python -m pip install -U pip
|
||||
venv/bin/python -m pip install -e ".[dev]"
|
||||
venv/bin/python -m pip freeze
|
||||
|
||||
@@ -28,9 +28,12 @@ jobs:
|
||||
needs: [dist]
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
||||
environment: pypi
|
||||
environment:
|
||||
name: pypi
|
||||
url: https://pypi.org/p/cibuildwheel
|
||||
permissions:
|
||||
id-token: write
|
||||
attestations: write
|
||||
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
@@ -39,4 +42,9 @@ jobs:
|
||||
path: dist
|
||||
merge-multiple: true
|
||||
|
||||
- name: Generate artifact attestation for sdist and wheel
|
||||
uses: actions/attest-build-provenance@5e9cb68e95676991667494a6a4e59b8a2f13e1d0 # v1.3.3
|
||||
with:
|
||||
subject-path: "dist/cibuildwheel-*"
|
||||
|
||||
- uses: pypa/gh-action-pypi-publish@release/v1
|
||||
|
||||
@@ -22,13 +22,14 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
id: python
|
||||
with:
|
||||
python-version: "3.x"
|
||||
- uses: pre-commit/action@v3.0.1
|
||||
- name: Check manifest
|
||||
run: pipx run nox -s check_manifest
|
||||
run: pipx run --python "${{ steps.python.outputs.python-path }}" nox -s check_manifest
|
||||
- name: PyLint checks
|
||||
run: pipx run nox -s pylint -- --output-format=github
|
||||
run: pipx run --python "${{ steps.python.outputs.python-path }}" nox -s pylint -- --output-format=github
|
||||
|
||||
test:
|
||||
name: Test on ${{ matrix.os }} (${{ matrix.python_version }})
|
||||
|
||||
+13
-3
@@ -1,5 +1,5 @@
|
||||
linux:
|
||||
image: python:3.8
|
||||
image: python:3.12
|
||||
services:
|
||||
- name: docker:dind
|
||||
entrypoint: ["env", "-u", "DOCKER_HOST"]
|
||||
@@ -23,9 +23,19 @@ windows:
|
||||
variables:
|
||||
PYTEST_ADDOPTS: -k "unit_test or test_0_basic" --suppress-no-test-exit-code
|
||||
before_script:
|
||||
- choco install python -y --version 3.8.6
|
||||
- choco install python -y --version 3.12.4
|
||||
script:
|
||||
- py -m pip install -e ".[dev]" pytest-custom-exit-code
|
||||
- py bin\run_tests.py
|
||||
tags:
|
||||
- windows
|
||||
- saas-windows-medium-amd64
|
||||
|
||||
macos:
|
||||
image: macos-14-xcode-15
|
||||
variables:
|
||||
PYTEST_ADDOPTS: -k "unit_test or test_0_basic" --suppress-no-test-exit-code
|
||||
script:
|
||||
- python3 -m pip install -e ".[dev]" pytest-custom-exit-code
|
||||
- python3 ./bin/run_tests.py
|
||||
tags:
|
||||
- saas-macos-medium-m1
|
||||
|
||||
@@ -14,14 +14,14 @@ repos:
|
||||
- id: trailing-whitespace
|
||||
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.4.7
|
||||
rev: v0.5.5
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: ["--fix", "--show-fixes"]
|
||||
- id: ruff-format
|
||||
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: v1.10.0
|
||||
rev: v1.11.0
|
||||
hooks:
|
||||
- id: mypy
|
||||
name: mypy 3.8 on cibuildwheel/
|
||||
@@ -77,7 +77,7 @@ repos:
|
||||
|
||||
|
||||
- repo: https://github.com/python-jsonschema/check-jsonschema
|
||||
rev: 0.28.4
|
||||
rev: 0.29.1
|
||||
hooks:
|
||||
- id: check-dependabot
|
||||
- id: check-github-actions
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
This is a summary of the host Python versions and platforms covered by the different CI platforms:
|
||||
|
||||
| | 3.8 | 3.9 | 3.10 | 3.12 |
|
||||
|---------|--------------------------------------------------------|-----------------------|-----------|----------------|
|
||||
| Linux | AppVeyor¹ / Azure Pipelines / GitLab¹ / GitHub Actions | CircleCI¹ / Travis CI | Cirrus CI | GitHub Actions |
|
||||
| macOS | AppVeyor¹ / Azure Pipelines | CircleCI¹ / Travis CI | Cirrus CI | GitHub Actions |
|
||||
| Windows | AppVeyor¹ / Azure Pipelines / GitLab¹ | Travis CI | Cirrus CI | GitHub Actions |
|
||||
| | 3.8 | 3.9 | 3.10 | 3.11 | 3.12 |
|
||||
|---------|----------------------------------------------|-----------|-----------|---------|--------------------------------------|
|
||||
| Linux | AppVeyor¹ / Azure Pipelines / GitHub Actions | Travis CI | Cirrus CI | | CircleCI¹ / GitHub Actions / GitLab¹ |
|
||||
| macOS | AppVeyor¹ / Azure Pipelines | | Cirrus CI | GitLab¹ | CircleCI¹ / GitHub Actions |
|
||||
| Windows | AppVeyor¹ / Azure Pipelines | Travis CI | Cirrus CI | | GitHub Actions / GitLab¹ |
|
||||
|
||||
> ¹ Runs a reduced set of tests to reduce CI load
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ What does it do?
|
||||
|
||||
<sup>¹ PyPy is only supported for manylinux wheels.</sup><br>
|
||||
<sup>² Windows arm64 support is experimental.</sup><br>
|
||||
<sup>³ CPython 3.13 is available using the [`CIBW_PRERELEASE_PYTHONS`](https://cibuildwheel.pypa.io/en/stable/options/#prerelease-pythons) option. Free-threaded mode requires opt-in, not yet available on macOS.</sup><br>
|
||||
<sup>³ CPython 3.13 is built by default using Python RCs, starting with cibuildwheel 2.20. Free-threaded mode will still require opt-in using [`CIBW_FREE_THREADED_SUPPORT`](https://cibuildwheel.pypa.io/en/stable/options/#free-threaded-support).</sup><br>
|
||||
<sup>⁴ Experimental, not yet supported on PyPI, but can be used directly in web deployment. Use `--platform pyodide` to build.</sup><br>
|
||||
|
||||
- Builds manylinux, musllinux, macOS 10.9+, and Windows wheels for CPython and PyPy
|
||||
@@ -61,7 +61,7 @@ Usage
|
||||
| Travis CI | ✅ | | ✅ | ✅ | | |
|
||||
| AppVeyor | ✅ | ✅ | ✅ | | ✅ | ✅² |
|
||||
| CircleCI | ✅ | ✅ | | ✅ | ✅ | |
|
||||
| Gitlab CI | ✅ | | ✅ | ✅¹ | | |
|
||||
| Gitlab CI | ✅ | ✅ | ✅ | ✅¹ | ✅ | |
|
||||
| Cirrus CI | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
|
||||
<sup>¹ [Requires emulation](https://cibuildwheel.pypa.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.</sup><br>
|
||||
@@ -94,7 +94,7 @@ jobs:
|
||||
- uses: actions/setup-python@v5
|
||||
|
||||
- name: Install cibuildwheel
|
||||
run: python -m pip install cibuildwheel==2.19.0
|
||||
run: python -m pip install cibuildwheel==2.20.0
|
||||
|
||||
- name: Build wheels
|
||||
run: python -m cibuildwheel --output-dir wheelhouse
|
||||
@@ -162,9 +162,9 @@ Here are some repos that use cibuildwheel.
|
||||
| [pytorch-fairseq][] | ![github icon][] | ![apple icon][] ![linux icon][] | Facebook AI Research Sequence-to-Sequence Toolkit written in Python. |
|
||||
| [NumPy][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The fundamental package for scientific computing with Python. |
|
||||
| [Tornado][] | ![github icon][] | ![linux icon][] ![apple icon][] ![windows icon][] | Tornado is a Python web framework and asynchronous networking library. Uses stable ABI for a small C extension. |
|
||||
| [Matplotlib][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The venerable Matplotlib, a Python library with C++ portions |
|
||||
| [NCNN][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | ncnn is a high-performance neural network inference framework optimized for the mobile platform |
|
||||
| [duckdb][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | DuckDB is an analytical in-process SQL database management system |
|
||||
| [NCNN][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | ncnn is a high-performance neural network inference framework optimized for the mobile platform |
|
||||
| [Matplotlib][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The venerable Matplotlib, a Python library with C++ portions |
|
||||
| [Prophet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth. |
|
||||
| [MyPy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | The compiled version of MyPy using MyPyC. |
|
||||
| [Kivy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Open source UI framework written in Python, running on Windows, Linux, macOS, Android and iOS |
|
||||
@@ -173,9 +173,9 @@ Here are some repos that use cibuildwheel.
|
||||
[pytorch-fairseq]: https://github.com/facebookresearch/fairseq
|
||||
[NumPy]: https://github.com/numpy/numpy
|
||||
[Tornado]: https://github.com/tornadoweb/tornado
|
||||
[Matplotlib]: https://github.com/matplotlib/matplotlib
|
||||
[NCNN]: https://github.com/Tencent/ncnn
|
||||
[duckdb]: https://github.com/duckdb/duckdb
|
||||
[NCNN]: https://github.com/Tencent/ncnn
|
||||
[Matplotlib]: https://github.com/matplotlib/matplotlib
|
||||
[Prophet]: https://github.com/facebook/prophet
|
||||
[MyPy]: https://github.com/mypyc/mypy_mypyc-wheels
|
||||
[Kivy]: https://github.com/kivy/kivy
|
||||
@@ -211,8 +211,41 @@ Changelog
|
||||
|
||||
<!-- this section was generated by bin/update_readme_changelog.py -- do not edit manually -->
|
||||
|
||||
### v2.20.0
|
||||
|
||||
- 🌟 CPython 3.13 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.13.0rc1, which is guaranteed to be ABI compatible with the final release. Free-threading is still behind a flag/config option. (#1950)
|
||||
- ✨ Provide a `CIBW_ALLOW_EMPTY` environment variable as an alternative to the command line flag. (#1937)
|
||||
- 🐛 Don't use uv on PyPy3.8 on Windows, it stopped working starting in 0.2.25. Note that PyPy 3.8 is EoL. (#1868)
|
||||
- 🛠 Set the `VSCMD_ARG_TGT_ARCH` variable based on target arch. (#1876)
|
||||
- 🛠 Undo cleaner output on pytest 8-8.2 now that 8.3 is out. (#1943)
|
||||
- 📚 Update examples to use Python 3.12 on host (cibuildwheel will require Python 3.11+ on the host machine starting in October 2024) (#1919)
|
||||
|
||||
|
||||
### v2.19.2
|
||||
|
||||
- 🐛 Update manylinux2014 pins to versions that support past-EoL CentOS 7 mirrors. (#1917)
|
||||
- 🐛 Support `--no-isolation` with `build[uv]` build-frontend. (#1889)
|
||||
- 🛠 Provide attestations for releases at <https://github.com/pypa/cibuildwheel/attestations>. (#1916)
|
||||
- 🛠 Provide CPython 3.13.0b3. (#1913)
|
||||
- 🛠 Remove some workarounds now that pip 21.1 is available. (#1891, #1892)
|
||||
- 📚 Remove nosetest from our docs. (#1821)
|
||||
- 📚 Document the macOS ARM workaround for 3.8 on GHA. (#1871)
|
||||
- 📚 GitLab CI + macOS is now a supported platform with an example. (#1911)
|
||||
|
||||
|
||||
### v2.19.1
|
||||
|
||||
- 🐛 Don't require setup-python on GHA for Pyodide (#1868)
|
||||
- 🐛 Specify full python path for uv (fixes issue in 0.2.10 & 0.2.11) (#1881)
|
||||
- 🛠 Update for pip 24.1b2 on CPython 3.13. (#1879)
|
||||
- 🛠 Fix a warning in our schema generation script. (#1866)
|
||||
- 🛠 Cleaner output on pytest 8-8.2. (#1865)
|
||||
|
||||
|
||||
### v2.19.0
|
||||
|
||||
See the [release post](https://iscinumpy.dev/post/cibuildwheel-2-19-0/) for more info on new features!
|
||||
|
||||
- 🌟 Add Pyodide platform. Set with `--platform pyodide` or `CIBW_PLATFORM: pyodide` on Linux with a host Python 3.12 to build WebAssembly wheels. Not accepted on PyPI currently, but usable directly in a website using Pyodide, for live docs, etc. (#1456, #1859)
|
||||
- 🌟 Add `build[uv]` backend, which will take a pre-existing uv install (or install `cibuildwheel[uv]`) and use `uv` for all environment setup and installs on Python 3.8+. This is significantly faster in most cases. (#1856)
|
||||
- ✨ Add free-threaded macOS builds and update CPython to 3.13.0b2. (#1854)
|
||||
@@ -238,49 +271,6 @@ Changelog
|
||||
- 🐛 Fix running linux tests from Windows or macOS ARM. (#1788)
|
||||
- 📚 Fix our documentation build. (#1821)
|
||||
|
||||
|
||||
### v2.18.0
|
||||
|
||||
_12 May 2024_
|
||||
|
||||
- ✨ Adds CPython 3.13 support, under the prerelease flag [CIBW_PRERELEASE_PYTHONS](https://cibuildwheel.pypa.io/en/stable/options/#prerelease-pythons). This version of cibuildwheel uses 3.13.0b1. Free-threading mode is not available yet (#1657), waiting on official binaries (planned for beta 2) and pip support.
|
||||
|
||||
_While CPython is in beta, the ABI can change, so your wheels might not be compatible with the final release. For this reason, we don't recommend distributing wheels until RC1, at which point 3.13 will be available in cibuildwheel without the flag._ (#1815)
|
||||
|
||||
- ✨ Musllinux now defaults to `musllinux_1_2`. You can set the older `musllinux_1_1` via config if needed. (#1817)
|
||||
- 🛠 No longer pre-seed setuptools/wheel in virtual environments (#1819)
|
||||
- 🛠 Respect the constraints file when building with pip, matching build (#1818)
|
||||
- 🛠 Use uv to compile our pinned dependencies, 10x faster and doesn't require special setup (#1778)
|
||||
- 🐛 Fix an issue with the schema (#1788)
|
||||
- 📚 Document the new delocate error checking macOS versions (#1766)
|
||||
- 📚 Document Rust builds (#1816)
|
||||
- 📚 Speed up our readthedocs builds with uv, 26 seconds -> 6 seconds to install dependencies (#1816)
|
||||
|
||||
|
||||
### v2.17.0
|
||||
|
||||
_11 March 2024_
|
||||
|
||||
- 🌟 Adds the ability to inherit configuration in TOML overrides. This makes certain configurations much simpler. If you're overriding an option like `before-build` or `environment`, and you just want to add an extra command or environment variable, you can just append (or prepend) to the previous config. See [the docs](https://cibuildwheel.pypa.io/en/stable/options/#inherit) for more information. (#1730)
|
||||
- 🌟 Adds official support for native `arm64` macOS GitHub runners. To use them, just specify `macos-14` as an `os` of your job in your workflow file. You can also keep `macos-13` in your build matrix to build `x86_64`. Check out the new [GitHub Actions example config](https://cibuildwheel.pypa.io/en/stable/setup/#github-actions).
|
||||
- ✨ You no longer need to specify `--platform` to run cibuildwheel locally! Instead it will detect your platform automatically. This was a safety feature, no longer necessary. (#1727)
|
||||
- 🛠 Removed setuptools and wheel pinned versions. This only affects old-style projects without a `pyproject.toml`, projects with `pyproject.toml` are already getting fresh versions of their `build-system.requires` installed into an isolated environment. (#1725)
|
||||
- 🛠 Improve how the GitHub Action passes arguments (#1757)
|
||||
- 🛠 Remove a system-wide install of pipx in the GitHub Action (#1745)
|
||||
- 🐛 No longer will cibuildwheel override the `PIP_CONSTRAINT` environment variable when using the `build` frontend. Instead it will be extended. (#1675)
|
||||
- 🐛 Fix a bug where building and testing both `x86_86` and `arm64` wheels on the same runner caused the wrong architectures in the test environment (#1750)
|
||||
- 🐛 Fix a bug that prevented testing a CPython 3.8 wheel targeting macOS 11+ on `x86_64` (#1768)
|
||||
- 📚 Moved the docs onto the official PyPA domain - they're now available at https://cibuildwheel.pypa.io . (#1775)
|
||||
- 📚 Docs and examples improvements (#1762, #1734)
|
||||
|
||||
|
||||
### 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)
|
||||
|
||||
<!-- END bin/update_readme_changelog.py -->
|
||||
|
||||
---
|
||||
|
||||
+2
-2
@@ -24,11 +24,11 @@ branding:
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
# Set up a non-EOL, cibuildwheel & pipx supported Python version
|
||||
# Set up the version of Python that supports pyodide
|
||||
- uses: actions/setup-python@v5
|
||||
id: python
|
||||
with:
|
||||
python-version: "3.8 - 3.12"
|
||||
python-version: "3.12"
|
||||
update-environment: false
|
||||
|
||||
- id: cibw
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ jobs:
|
||||
python ./bin/run_tests.py
|
||||
|
||||
- job: macos_38
|
||||
pool: {vmImage: 'macOS-11'}
|
||||
pool: {vmImage: 'macOS-12'}
|
||||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
|
||||
@@ -56,7 +56,7 @@ properties:
|
||||
- type: string
|
||||
pattern: '^build; ?args:'
|
||||
- type: string
|
||||
pattern: '^build\[uv\]; ?args:'
|
||||
pattern: '^build\\[uv\\]; ?args:'
|
||||
- type: object
|
||||
additionalProperties: false
|
||||
required: [name]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
from __future__ import annotations
|
||||
|
||||
__version__ = "2.19.0"
|
||||
__version__ = "2.20.0"
|
||||
|
||||
@@ -319,7 +319,7 @@ def build_in_directory(args: CommandLineArguments) -> None:
|
||||
# Python is buffering by default when running on the CI platforms, giving
|
||||
# problems interleaving subprocess call output with unflushed calls to
|
||||
# 'print'
|
||||
sys.stdout = Unbuffered(sys.stdout) # type: ignore[assignment]
|
||||
sys.stdout = Unbuffered(sys.stdout)
|
||||
|
||||
# create the cache dir before it gets printed & builds performed
|
||||
CIBW_CACHE_PATH.mkdir(parents=True, exist_ok=True)
|
||||
@@ -334,7 +334,7 @@ def build_in_directory(args: CommandLineArguments) -> None:
|
||||
|
||||
if not identifiers:
|
||||
message = f"No build identifiers selected: {options.globals.build_selector}"
|
||||
if args.allow_empty:
|
||||
if options.globals.allow_empty:
|
||||
print(f"cibuildwheel: {message}", file=sys.stderr)
|
||||
else:
|
||||
raise errors.NothingToDoError(message)
|
||||
|
||||
@@ -4,6 +4,8 @@ a different return code, by defining them all here, we can ensure that they're
|
||||
semantically clear and unique.
|
||||
"""
|
||||
|
||||
import textwrap
|
||||
|
||||
|
||||
class FatalError(BaseException):
|
||||
"""
|
||||
@@ -25,3 +27,34 @@ class NothingToDoError(FatalError):
|
||||
|
||||
class DeprecationError(FatalError):
|
||||
return_code = 4
|
||||
|
||||
|
||||
class NonPlatformWheelError(FatalError):
|
||||
def __init__(self) -> None:
|
||||
message = textwrap.dedent(
|
||||
"""
|
||||
Build failed because a pure Python wheel was generated.
|
||||
|
||||
If you intend to build a pure-Python wheel, you don't need cibuildwheel - use
|
||||
`pip wheel -w DEST_DIR .` instead.
|
||||
|
||||
If you expected a platform wheel, check your project configuration, or run
|
||||
cibuildwheel with CIBW_BUILD_VERBOSITY=1 to view build logs.
|
||||
"""
|
||||
)
|
||||
super().__init__(message)
|
||||
self.return_code = 5
|
||||
|
||||
|
||||
class AlreadyBuiltWheelError(FatalError):
|
||||
def __init__(self, wheel_name: str) -> None:
|
||||
message = textwrap.dedent(
|
||||
f"""
|
||||
Build failed because a wheel named {wheel_name} was already generated in the current run.
|
||||
|
||||
If you expected another wheel to be generated, check your project configuration, or run
|
||||
cibuildwheel with CIBW_BUILD_VERBOSITY=1 to view build logs.
|
||||
"""
|
||||
)
|
||||
super().__init__(message)
|
||||
self.return_code = 6
|
||||
|
||||
@@ -18,10 +18,8 @@ from .oci_container import OCIContainer, OCIContainerEngineConfig
|
||||
from .options import BuildOptions, Options
|
||||
from .typing import PathOrStr
|
||||
from .util import (
|
||||
AlreadyBuiltWheelError,
|
||||
BuildFrontendConfig,
|
||||
BuildSelector,
|
||||
NonPlatformWheelError,
|
||||
find_compatible_wheel,
|
||||
get_build_verbosity_extra_flags,
|
||||
prepare_command,
|
||||
@@ -282,7 +280,7 @@ def build_in_container(
|
||||
if not 0 <= build_options.build_verbosity < 2:
|
||||
msg = f"build_verbosity {build_options.build_verbosity} is not supported for build frontend. Ignoring."
|
||||
log.warning(msg)
|
||||
if use_uv:
|
||||
if use_uv and "--no-isolation" not in extra_flags and "-n" not in extra_flags:
|
||||
extra_flags += ["--installer=uv"]
|
||||
container.call(
|
||||
[
|
||||
@@ -306,7 +304,7 @@ def build_in_container(
|
||||
container.call(["mkdir", "-p", repaired_wheel_dir])
|
||||
|
||||
if built_wheel.name.endswith("none-any.whl"):
|
||||
raise NonPlatformWheelError()
|
||||
raise errors.NonPlatformWheelError()
|
||||
|
||||
if build_options.repair_command:
|
||||
log.step("Repairing wheel...")
|
||||
@@ -321,7 +319,7 @@ def build_in_container(
|
||||
|
||||
for repaired_wheel in repaired_wheels:
|
||||
if repaired_wheel.name in {wheel.name for wheel in built_wheels}:
|
||||
raise AlreadyBuiltWheelError(repaired_wheel.name)
|
||||
raise errors.AlreadyBuiltWheelError(repaired_wheel.name)
|
||||
|
||||
if build_options.test_command and build_options.test_selector(config.identifier):
|
||||
log.step("Testing wheel...")
|
||||
@@ -352,10 +350,6 @@ def build_in_container(
|
||||
virtualenv_env["PATH"] = f"{venv_dir / 'bin'}:{virtualenv_env['PATH']}"
|
||||
virtualenv_env["VIRTUAL_ENV"] = str(venv_dir)
|
||||
|
||||
# TODO remove me once virtualenv provides pip>=24.1b1
|
||||
if config.version == "3.13" and not use_uv:
|
||||
container.call(["pip", "install", "pip>=24.1b1"], env=virtualenv_env)
|
||||
|
||||
if build_options.before_test:
|
||||
before_test_prepared = prepare_command(
|
||||
build_options.before_test,
|
||||
|
||||
@@ -25,11 +25,9 @@ from .options import Options
|
||||
from .typing import PathOrStr
|
||||
from .util import (
|
||||
CIBW_CACHE_PATH,
|
||||
AlreadyBuiltWheelError,
|
||||
BuildFrontendConfig,
|
||||
BuildFrontendName,
|
||||
BuildSelector,
|
||||
NonPlatformWheelError,
|
||||
call,
|
||||
combine_constraints,
|
||||
detect_ci_provider,
|
||||
@@ -201,7 +199,7 @@ def setup_python(
|
||||
dependency_constraint_flags: Sequence[PathOrStr],
|
||||
environment: ParsedEnvironment,
|
||||
build_frontend: BuildFrontendName,
|
||||
) -> dict[str, str]:
|
||||
) -> tuple[Path, dict[str, str]]:
|
||||
if build_frontend == "build[uv]" and Version(python_configuration.version) < Version("3.8"):
|
||||
build_frontend = "build"
|
||||
|
||||
@@ -388,7 +386,7 @@ def setup_python(
|
||||
else:
|
||||
assert_never(build_frontend)
|
||||
|
||||
return env
|
||||
return base_python, env
|
||||
|
||||
|
||||
def build(options: Options, tmp_path: Path) -> None:
|
||||
@@ -442,7 +440,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
build_options.dependency_constraints.get_for_python_version(config.version),
|
||||
]
|
||||
|
||||
env = setup_python(
|
||||
base_python, env = setup_python(
|
||||
identifier_tmp_dir / "build",
|
||||
config,
|
||||
dependency_constraint_flags,
|
||||
@@ -505,7 +503,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
if not 0 <= build_options.build_verbosity < 2:
|
||||
msg = f"build_verbosity {build_options.build_verbosity} is not supported for build frontend. Ignoring."
|
||||
log.warning(msg)
|
||||
if use_uv:
|
||||
if use_uv and "--no-isolation" not in extra_flags and "-n" not in extra_flags:
|
||||
extra_flags.append("--installer=uv")
|
||||
call(
|
||||
"python",
|
||||
@@ -525,7 +523,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
repaired_wheel_dir.mkdir()
|
||||
|
||||
if built_wheel.name.endswith("none-any.whl"):
|
||||
raise NonPlatformWheelError()
|
||||
raise errors.NonPlatformWheelError()
|
||||
|
||||
if build_options.repair_command:
|
||||
log.step("Repairing wheel...")
|
||||
@@ -550,7 +548,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
repaired_wheel = next(repaired_wheel_dir.glob("*.whl"))
|
||||
|
||||
if repaired_wheel.name in {wheel.name for wheel in built_wheels}:
|
||||
raise AlreadyBuiltWheelError(repaired_wheel.name)
|
||||
raise errors.AlreadyBuiltWheelError(repaired_wheel.name)
|
||||
|
||||
log.step_end()
|
||||
|
||||
@@ -658,7 +656,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
|
||||
if use_uv:
|
||||
pip_install = functools.partial(call, *pip, "install", *uv_arch_args)
|
||||
call("uv", "venv", venv_dir, "--python=python", env=env)
|
||||
call("uv", "venv", venv_dir, f"--python={base_python}", env=env)
|
||||
else:
|
||||
pip_install = functools.partial(call_with_arch, *pip, "install")
|
||||
# Use pip version from the initial env to ensure determinism
|
||||
|
||||
@@ -31,7 +31,6 @@ from .util import (
|
||||
BuildSelector,
|
||||
DependencyConstraints,
|
||||
TestSelector,
|
||||
cached_property,
|
||||
format_safe,
|
||||
resources_dir,
|
||||
selector_matches,
|
||||
@@ -76,6 +75,7 @@ class GlobalOptions:
|
||||
build_selector: BuildSelector
|
||||
test_selector: TestSelector
|
||||
architectures: set[Architecture]
|
||||
allow_empty: bool
|
||||
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
@@ -502,7 +502,7 @@ class Options:
|
||||
|
||||
return None
|
||||
|
||||
@cached_property
|
||||
@functools.cached_property
|
||||
def package_requires_python_str(self) -> str | None:
|
||||
args = self.command_line_arguments
|
||||
return get_requires_python_str(Path(args.package_dir))
|
||||
@@ -521,6 +521,8 @@ class Options:
|
||||
self.reader.get("free-threaded-support", env_plat=False, ignore_empty=True)
|
||||
)
|
||||
|
||||
allow_empty = args.allow_empty or strtobool(self.env.get("CIBW_ALLOW_EMPTY", "0"))
|
||||
|
||||
prerelease_pythons = args.prerelease_pythons or strtobool(
|
||||
self.env.get("CIBW_PRERELEASE_PYTHONS", "0")
|
||||
)
|
||||
@@ -558,6 +560,7 @@ class Options:
|
||||
build_selector=build_selector,
|
||||
test_selector=test_selector,
|
||||
architectures=architectures,
|
||||
allow_empty=allow_empty,
|
||||
)
|
||||
|
||||
def build_options(self, identifier: str | None) -> BuildOptions:
|
||||
@@ -722,7 +725,7 @@ class Options:
|
||||
deprecated_selectors("CIBW_SKIP", build_selector.skip_config)
|
||||
deprecated_selectors("CIBW_TEST_SKIP", test_selector.skip_config)
|
||||
|
||||
@cached_property
|
||||
@functools.cached_property
|
||||
def defaults(self) -> Options:
|
||||
return Options(
|
||||
platform=self.platform,
|
||||
|
||||
@@ -39,10 +39,8 @@ def is_main(parent: ast.AST | None) -> bool:
|
||||
if len(mains) != 1:
|
||||
return False
|
||||
consts = {x for x in values if isinstance(x, ast.Name) and x.id == "__name__"}
|
||||
if len(consts) != 1:
|
||||
return False
|
||||
|
||||
return True
|
||||
return len(consts) == 1
|
||||
|
||||
|
||||
class Analyzer(ast.NodeVisitor):
|
||||
|
||||
+10
-10
@@ -2,6 +2,7 @@ from __future__ import annotations
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
from collections.abc import Sequence, Set
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
@@ -16,11 +17,10 @@ from .options import Options
|
||||
from .typing import PathOrStr
|
||||
from .util import (
|
||||
CIBW_CACHE_PATH,
|
||||
AlreadyBuiltWheelError,
|
||||
BuildFrontendConfig,
|
||||
BuildSelector,
|
||||
NonPlatformWheelError,
|
||||
call,
|
||||
combine_constraints,
|
||||
download,
|
||||
ensure_node,
|
||||
extract_zip,
|
||||
@@ -92,7 +92,11 @@ def install_xbuildenv(env: dict[str, str], pyodide_version: str) -> str:
|
||||
def get_base_python(identifier: str) -> Path:
|
||||
implementation_id = identifier.split("-")[0]
|
||||
majorminor = implementation_id[len("cp") :]
|
||||
major_minor = f"{majorminor[0]}.{majorminor[1:]}"
|
||||
version_info = (int(majorminor[0]), int(majorminor[1:]))
|
||||
if version_info == sys.version_info[:2]:
|
||||
return Path(sys.executable)
|
||||
|
||||
major_minor = ".".join(str(v) for v in version_info)
|
||||
python_name = f"python{major_minor}"
|
||||
which_python = shutil.which(python_name)
|
||||
if which_python is None:
|
||||
@@ -280,11 +284,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
|
||||
build_env = env.copy()
|
||||
if build_options.dependency_constraints:
|
||||
our_constraints = str(constraints_path)
|
||||
user_constraints = build_env.get("PIP_CONSTRAINT")
|
||||
build_env["PIP_CONSTRAINT"] = " ".join(
|
||||
c for c in [our_constraints, user_constraints] if c
|
||||
)
|
||||
combine_constraints(build_env, constraints_path, identifier_tmp_dir)
|
||||
build_env["VIRTUALENV_PIP"] = pip_version
|
||||
call(
|
||||
"pyodide",
|
||||
@@ -297,7 +297,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
built_wheel = next(built_wheel_dir.glob("*.whl"))
|
||||
|
||||
if built_wheel.name.endswith("none-any.whl"):
|
||||
raise NonPlatformWheelError()
|
||||
raise errors.NonPlatformWheelError()
|
||||
|
||||
if build_options.repair_command:
|
||||
log.step("Repairing wheel...")
|
||||
@@ -314,7 +314,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
repaired_wheel = next(repaired_wheel_dir.glob("*.whl"))
|
||||
|
||||
if repaired_wheel.name in {wheel.name for wheel in built_wheels}:
|
||||
raise AlreadyBuiltWheelError(repaired_wheel.name)
|
||||
raise errors.AlreadyBuiltWheelError(repaired_wheel.name)
|
||||
|
||||
if build_options.test_command and build_options.test_selector(config.identifier):
|
||||
log.step("Testing wheel...")
|
||||
|
||||
@@ -120,15 +120,15 @@ python_configurations = [
|
||||
{ identifier = "cp311-macosx_x86_64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.9/python-3.11.9-macos11.pkg" },
|
||||
{ identifier = "cp311-macosx_arm64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.9/python-3.11.9-macos11.pkg" },
|
||||
{ identifier = "cp311-macosx_universal2", version = "3.11", url = "https://www.python.org/ftp/python/3.11.9/python-3.11.9-macos11.pkg" },
|
||||
{ identifier = "cp312-macosx_x86_64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.3/python-3.12.3-macos11.pkg" },
|
||||
{ identifier = "cp312-macosx_arm64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.3/python-3.12.3-macos11.pkg" },
|
||||
{ identifier = "cp312-macosx_universal2", version = "3.12", url = "https://www.python.org/ftp/python/3.12.3/python-3.12.3-macos11.pkg" },
|
||||
{ identifier = "cp313-macosx_x86_64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.0/python-3.13.0b2-macos11.pkg" },
|
||||
{ identifier = "cp313-macosx_arm64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.0/python-3.13.0b2-macos11.pkg" },
|
||||
{ identifier = "cp313-macosx_universal2", version = "3.13", url = "https://www.python.org/ftp/python/3.13.0/python-3.13.0b2-macos11.pkg" },
|
||||
{ identifier = "cp313t-macosx_x86_64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.0/python-3.13.0b2-macos11.pkg" },
|
||||
{ identifier = "cp313t-macosx_arm64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.0/python-3.13.0b2-macos11.pkg" },
|
||||
{ identifier = "cp313t-macosx_universal2", version = "3.13", url = "https://www.python.org/ftp/python/3.13.0/python-3.13.0b2-macos11.pkg" },
|
||||
{ identifier = "cp312-macosx_x86_64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.4/python-3.12.4-macos11.pkg" },
|
||||
{ identifier = "cp312-macosx_arm64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.4/python-3.12.4-macos11.pkg" },
|
||||
{ identifier = "cp312-macosx_universal2", version = "3.12", url = "https://www.python.org/ftp/python/3.12.4/python-3.12.4-macos11.pkg" },
|
||||
{ identifier = "cp313-macosx_x86_64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.0/python-3.13.0rc1-macos11.pkg" },
|
||||
{ identifier = "cp313-macosx_arm64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.0/python-3.13.0rc1-macos11.pkg" },
|
||||
{ identifier = "cp313-macosx_universal2", version = "3.13", url = "https://www.python.org/ftp/python/3.13.0/python-3.13.0rc1-macos11.pkg" },
|
||||
{ identifier = "cp313t-macosx_x86_64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.0/python-3.13.0rc1-macos11.pkg" },
|
||||
{ identifier = "cp313t-macosx_arm64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.0/python-3.13.0rc1-macos11.pkg" },
|
||||
{ identifier = "cp313t-macosx_universal2", version = "3.13", url = "https://www.python.org/ftp/python/3.13.0/python-3.13.0rc1-macos11.pkg" },
|
||||
{ identifier = "pp37-macosx_x86_64", version = "3.7", url = "https://downloads.python.org/pypy/pypy3.7-v7.3.9-osx64.tar.bz2" },
|
||||
{ identifier = "pp38-macosx_x86_64", version = "3.8", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-macos_x86_64.tar.bz2" },
|
||||
{ identifier = "pp38-macosx_arm64", version = "3.8", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-macos_arm64.tar.bz2" },
|
||||
@@ -154,16 +154,16 @@ python_configurations = [
|
||||
{ identifier = "cp311-win_amd64", version = "3.11.9", arch = "64" },
|
||||
{ identifier = "cp312-win32", version = "3.12.4", arch = "32" },
|
||||
{ identifier = "cp312-win_amd64", version = "3.12.4", arch = "64" },
|
||||
{ identifier = "cp313-win32", version = "3.13.0-b2", arch = "32" },
|
||||
{ identifier = "cp313t-win32", version = "3.13.0-b2", arch = "32" },
|
||||
{ identifier = "cp313-win_amd64", version = "3.13.0-b2", arch = "64" },
|
||||
{ identifier = "cp313t-win_amd64", version = "3.13.0-b2", arch = "64" },
|
||||
{ identifier = "cp313-win32", version = "3.13.0-rc1", arch = "32" },
|
||||
{ identifier = "cp313t-win32", version = "3.13.0-rc1", arch = "32" },
|
||||
{ identifier = "cp313-win_amd64", version = "3.13.0-rc1", arch = "64" },
|
||||
{ identifier = "cp313t-win_amd64", version = "3.13.0-rc1", arch = "64" },
|
||||
{ identifier = "cp39-win_arm64", version = "3.9.10", arch = "ARM64" },
|
||||
{ identifier = "cp310-win_arm64", version = "3.10.11", arch = "ARM64" },
|
||||
{ identifier = "cp311-win_arm64", version = "3.11.9", arch = "ARM64" },
|
||||
{ identifier = "cp312-win_arm64", version = "3.12.4", arch = "ARM64" },
|
||||
{ identifier = "cp313-win_arm64", version = "3.13.0-b2", arch = "ARM64" },
|
||||
{ identifier = "cp313t-win_arm64", version = "3.13.0-b2", arch = "ARM64" },
|
||||
{ identifier = "cp313-win_arm64", version = "3.13.0-rc1", arch = "ARM64" },
|
||||
{ identifier = "cp313t-win_arm64", version = "3.13.0-rc1", arch = "ARM64" },
|
||||
{ identifier = "pp37-win_amd64", version = "3.7", arch = "64", url = "https://downloads.python.org/pypy/pypy3.7-v7.3.9-win64.zip" },
|
||||
{ identifier = "pp38-win_amd64", version = "3.8", arch = "64", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-win64.zip" },
|
||||
{ identifier = "pp39-win_amd64", version = "3.9", arch = "64", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.16-win64.zip" },
|
||||
|
||||
@@ -4,13 +4,13 @@ annotated-types==0.7.0
|
||||
# via pydantic
|
||||
anyio==4.4.0
|
||||
# via httpx
|
||||
auditwheel-emscripten==0.0.14
|
||||
auditwheel-emscripten==0.0.16
|
||||
# via pyodide-build
|
||||
build==1.2.1
|
||||
# via
|
||||
# -r .nox/update_constraints/tmp/constraints-pyodide.in
|
||||
# pyodide-build
|
||||
certifi==2024.6.2
|
||||
certifi==2024.7.4
|
||||
# via
|
||||
# httpcore
|
||||
# httpx
|
||||
@@ -21,11 +21,11 @@ click==8.1.7
|
||||
# via typer
|
||||
cloudpickle==3.0.0
|
||||
# via loky
|
||||
cmake==3.29.3
|
||||
cmake==3.30.1
|
||||
# via pyodide-build
|
||||
distlib==0.3.8
|
||||
# via virtualenv
|
||||
filelock==3.14.0
|
||||
filelock==3.15.4
|
||||
# via virtualenv
|
||||
h11==0.14.0
|
||||
# via httpcore
|
||||
@@ -38,7 +38,7 @@ idna==3.7
|
||||
# anyio
|
||||
# httpx
|
||||
# requests
|
||||
leb128==1.0.7
|
||||
leb128==1.0.8
|
||||
# via auditwheel-emscripten
|
||||
loky==3.4.1
|
||||
# via pyodide-build
|
||||
@@ -46,27 +46,27 @@ markdown-it-py==3.0.0
|
||||
# via rich
|
||||
mdurl==0.1.2
|
||||
# via markdown-it-py
|
||||
packaging==24.0
|
||||
packaging==24.1
|
||||
# via
|
||||
# auditwheel-emscripten
|
||||
# build
|
||||
# pyodide-build
|
||||
# unearth
|
||||
pip==24.0
|
||||
pip==24.2
|
||||
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
|
||||
platformdirs==4.2.2
|
||||
# via virtualenv
|
||||
pydantic==2.7.3
|
||||
pydantic==2.8.2
|
||||
# via
|
||||
# pyodide-build
|
||||
# pyodide-lock
|
||||
pydantic-core==2.18.4
|
||||
pydantic-core==2.20.1
|
||||
# via pydantic
|
||||
pygments==2.18.0
|
||||
# via rich
|
||||
pyodide-build==0.26.1
|
||||
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
|
||||
pyodide-cli==0.2.3
|
||||
pyodide-cli==0.2.4
|
||||
# via
|
||||
# auditwheel-emscripten
|
||||
# pyodide-build
|
||||
@@ -100,20 +100,20 @@ typer==0.12.3
|
||||
# auditwheel-emscripten
|
||||
# pyodide-build
|
||||
# pyodide-cli
|
||||
types-requests==2.32.0.20240602
|
||||
types-requests==2.32.0.20240712
|
||||
# via pyodide-build
|
||||
typing-extensions==4.12.2
|
||||
# via
|
||||
# pydantic
|
||||
# pydantic-core
|
||||
# typer
|
||||
unearth==0.15.4
|
||||
unearth==0.16.1
|
||||
# via pyodide-build
|
||||
urllib3==2.2.1
|
||||
urllib3==2.2.2
|
||||
# via
|
||||
# requests
|
||||
# types-requests
|
||||
virtualenv==20.26.2
|
||||
virtualenv==20.26.3
|
||||
# via
|
||||
# build
|
||||
# pyodide-build
|
||||
|
||||
@@ -8,17 +8,17 @@ delocate==0.11.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.8
|
||||
# via virtualenv
|
||||
filelock==3.14.0
|
||||
filelock==3.15.4
|
||||
# via virtualenv
|
||||
importlib-metadata==7.1.0
|
||||
importlib-metadata==8.2.0
|
||||
# via build
|
||||
macholib==1.16.3
|
||||
# via delocate
|
||||
packaging==24.0
|
||||
packaging==24.1
|
||||
# via
|
||||
# build
|
||||
# delocate
|
||||
pip==24.0
|
||||
pip==24.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
platformdirs==4.2.2
|
||||
# via virtualenv
|
||||
@@ -28,7 +28,7 @@ tomli==2.0.1
|
||||
# via build
|
||||
typing-extensions==4.12.2
|
||||
# via delocate
|
||||
virtualenv==20.26.2
|
||||
virtualenv==20.26.3
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
zipp==3.19.2
|
||||
# via importlib-metadata
|
||||
|
||||
@@ -8,15 +8,15 @@ delocate==0.11.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.8
|
||||
# via virtualenv
|
||||
filelock==3.14.0
|
||||
filelock==3.15.4
|
||||
# via virtualenv
|
||||
macholib==1.16.3
|
||||
# via delocate
|
||||
packaging==24.0
|
||||
packaging==24.1
|
||||
# via
|
||||
# build
|
||||
# delocate
|
||||
pip==24.0
|
||||
pip==24.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
platformdirs==4.2.2
|
||||
# via virtualenv
|
||||
@@ -24,5 +24,5 @@ pyproject-hooks==1.1.0
|
||||
# via build
|
||||
typing-extensions==4.12.2
|
||||
# via delocate
|
||||
virtualenv==20.26.2
|
||||
virtualenv==20.26.3
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -8,15 +8,15 @@ delocate==0.11.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.8
|
||||
# via virtualenv
|
||||
filelock==3.14.0
|
||||
filelock==3.15.4
|
||||
# via virtualenv
|
||||
macholib==1.16.3
|
||||
# via delocate
|
||||
packaging==24.0
|
||||
packaging==24.1
|
||||
# via
|
||||
# build
|
||||
# delocate
|
||||
pip==24.0
|
||||
pip==24.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
platformdirs==4.2.2
|
||||
# via virtualenv
|
||||
@@ -24,5 +24,5 @@ pyproject-hooks==1.1.0
|
||||
# via build
|
||||
typing-extensions==4.12.2
|
||||
# via delocate
|
||||
virtualenv==20.26.2
|
||||
virtualenv==20.26.3
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -8,15 +8,15 @@ delocate==0.11.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.8
|
||||
# via virtualenv
|
||||
filelock==3.14.0
|
||||
filelock==3.15.4
|
||||
# via virtualenv
|
||||
macholib==1.16.3
|
||||
# via delocate
|
||||
packaging==24.0
|
||||
packaging==24.1
|
||||
# via
|
||||
# build
|
||||
# delocate
|
||||
pip==24.1b1
|
||||
pip==24.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
platformdirs==4.2.2
|
||||
# via virtualenv
|
||||
@@ -24,5 +24,5 @@ pyproject-hooks==1.1.0
|
||||
# via build
|
||||
typing-extensions==4.12.2
|
||||
# via delocate
|
||||
virtualenv==20.26.2
|
||||
virtualenv==20.26.3
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -33,7 +33,7 @@ typing-extensions==4.7.1
|
||||
# delocate
|
||||
# importlib-metadata
|
||||
# platformdirs
|
||||
virtualenv==20.26.2
|
||||
virtualenv==20.26.3
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
zipp==3.15.0
|
||||
# via importlib-metadata
|
||||
|
||||
@@ -8,17 +8,17 @@ delocate==0.11.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.8
|
||||
# via virtualenv
|
||||
filelock==3.14.0
|
||||
filelock==3.15.4
|
||||
# via virtualenv
|
||||
importlib-metadata==7.1.0
|
||||
importlib-metadata==8.2.0
|
||||
# via build
|
||||
macholib==1.16.3
|
||||
# via delocate
|
||||
packaging==24.0
|
||||
packaging==24.1
|
||||
# via
|
||||
# build
|
||||
# delocate
|
||||
pip==24.0
|
||||
pip==24.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
platformdirs==4.2.2
|
||||
# via virtualenv
|
||||
@@ -28,7 +28,7 @@ tomli==2.0.1
|
||||
# via build
|
||||
typing-extensions==4.12.2
|
||||
# via delocate
|
||||
virtualenv==20.26.2
|
||||
virtualenv==20.26.3
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
zipp==3.19.2
|
||||
# via importlib-metadata
|
||||
|
||||
@@ -8,17 +8,17 @@ delocate==0.11.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.8
|
||||
# via virtualenv
|
||||
filelock==3.14.0
|
||||
filelock==3.15.4
|
||||
# via virtualenv
|
||||
importlib-metadata==7.1.0
|
||||
importlib-metadata==8.2.0
|
||||
# via build
|
||||
macholib==1.16.3
|
||||
# via delocate
|
||||
packaging==24.0
|
||||
packaging==24.1
|
||||
# via
|
||||
# build
|
||||
# delocate
|
||||
pip==24.0
|
||||
pip==24.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
platformdirs==4.2.2
|
||||
# via virtualenv
|
||||
@@ -28,7 +28,7 @@ tomli==2.0.1
|
||||
# via build
|
||||
typing-extensions==4.12.2
|
||||
# via delocate
|
||||
virtualenv==20.26.2
|
||||
virtualenv==20.26.3
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
zipp==3.19.2
|
||||
# via importlib-metadata
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
pip>=24.1b1 ; python_version >= '3.13'
|
||||
pip ; python_version < '3.13'
|
||||
pip
|
||||
build
|
||||
delocate
|
||||
virtualenv
|
||||
|
||||
@@ -8,15 +8,15 @@ delocate==0.11.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.8
|
||||
# via virtualenv
|
||||
filelock==3.14.0
|
||||
filelock==3.15.4
|
||||
# via virtualenv
|
||||
macholib==1.16.3
|
||||
# via delocate
|
||||
packaging==24.0
|
||||
packaging==24.1
|
||||
# via
|
||||
# build
|
||||
# delocate
|
||||
pip==24.0
|
||||
pip==24.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
platformdirs==4.2.2
|
||||
# via virtualenv
|
||||
@@ -24,5 +24,5 @@ pyproject-hooks==1.1.0
|
||||
# via build
|
||||
typing-extensions==4.12.2
|
||||
# via delocate
|
||||
virtualenv==20.26.2
|
||||
virtualenv==20.26.3
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
url = "https://nodejs.org/dist/"
|
||||
v20 = "v20.14.0"
|
||||
v20 = "v20.16.0"
|
||||
|
||||
@@ -1,54 +1,54 @@
|
||||
[x86_64]
|
||||
manylinux1 = quay.io/pypa/manylinux1_x86_64:2024-04-29-76807b8
|
||||
manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2024-06-06-99f15a7
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2024.08.03-1
|
||||
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-06-06-99f15a7
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2024-06-06-99f15a7
|
||||
musllinux_1_2 = quay.io/pypa/musllinux_1_2_x86_64:2024-06-06-99f15a7
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2024.08.03-1
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2024.08.03-1
|
||||
musllinux_1_2 = quay.io/pypa/musllinux_1_2_x86_64:2024.08.03-1
|
||||
|
||||
[i686]
|
||||
manylinux1 = quay.io/pypa/manylinux1_i686:2024-04-29-76807b8
|
||||
manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_i686:2024-06-06-99f15a7
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_i686:2024.08.03-1
|
||||
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-06-06-99f15a7
|
||||
musllinux_1_2 = quay.io/pypa/musllinux_1_2_i686:2024-06-06-99f15a7
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2024.08.03-1
|
||||
musllinux_1_2 = quay.io/pypa/musllinux_1_2_i686:2024.08.03-1
|
||||
|
||||
[pypy_x86_64]
|
||||
manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2024-06-06-99f15a7
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2024.08.03-1
|
||||
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-06-06-99f15a7
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2024.08.03-1
|
||||
|
||||
[pypy_i686]
|
||||
manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_i686:2024-06-06-99f15a7
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_i686:2024.08.03-1
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-12-26-0d38463
|
||||
|
||||
[aarch64]
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2024-06-03-e195670
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2024.08.03-1
|
||||
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-06-03-e195670
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2024-06-03-e195670
|
||||
musllinux_1_2 = quay.io/pypa/musllinux_1_2_aarch64:2024-06-03-e195670
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2024.08.03-1
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2024.08.03-1
|
||||
musllinux_1_2 = quay.io/pypa/musllinux_1_2_aarch64:2024.08.03-1
|
||||
|
||||
[ppc64le]
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2024-06-03-e195670
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2024.08.03-1
|
||||
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-06-03-e195670
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2024-06-03-e195670
|
||||
musllinux_1_2 = quay.io/pypa/musllinux_1_2_ppc64le:2024-06-03-e195670
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2024.08.03-1
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2024.08.03-1
|
||||
musllinux_1_2 = quay.io/pypa/musllinux_1_2_ppc64le:2024.08.03-1
|
||||
|
||||
[s390x]
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_s390x:2024-06-03-e195670
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_s390x:2024.08.03-1
|
||||
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-06-03-e195670
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2024-06-03-e195670
|
||||
musllinux_1_2 = quay.io/pypa/musllinux_1_2_s390x:2024-06-03-e195670
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_s390x:2024.08.03-1
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2024.08.03-1
|
||||
musllinux_1_2 = quay.io/pypa/musllinux_1_2_s390x:2024.08.03-1
|
||||
|
||||
[pypy_aarch64]
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2024-06-03-e195670
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2024.08.03-1
|
||||
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-06-03-e195670
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2024.08.03-1
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
py36 = { version = "20.21.1", url = "https://github.com/pypa/get-virtualenv/blob/20.21.1/public/virtualenv.pyz?raw=true" }
|
||||
default = { version = "20.26.2", url = "https://github.com/pypa/get-virtualenv/blob/20.26.2/public/virtualenv.pyz?raw=true" }
|
||||
default = { version = "20.26.3", url = "https://github.com/pypa/get-virtualenv/blob/20.26.3/public/virtualenv.pyz?raw=true" }
|
||||
|
||||
+2
-34
@@ -19,7 +19,7 @@ from collections import defaultdict
|
||||
from collections.abc import Generator, Iterable, Mapping, MutableMapping, Sequence
|
||||
from dataclasses import dataclass
|
||||
from enum import Enum
|
||||
from functools import cached_property, lru_cache
|
||||
from functools import lru_cache
|
||||
from pathlib import Path, PurePath
|
||||
from tempfile import TemporaryDirectory
|
||||
from time import sleep
|
||||
@@ -41,7 +41,6 @@ from .typing import PathOrStr, PlatformName
|
||||
|
||||
__all__ = [
|
||||
"MANYLINUX_ARCHS",
|
||||
"cached_property",
|
||||
"call",
|
||||
"chdir",
|
||||
"combine_constraints",
|
||||
@@ -249,7 +248,7 @@ class BuildSelector:
|
||||
requires_python: SpecifierSet | None = None
|
||||
|
||||
# a pattern that skips prerelease versions, when include_prereleases is False.
|
||||
PRERELEASE_SKIP: ClassVar[str] = "cp313-* cp313t-*"
|
||||
PRERELEASE_SKIP: ClassVar[str] = ""
|
||||
prerelease_pythons: bool = False
|
||||
|
||||
free_threaded_support: bool = False
|
||||
@@ -463,37 +462,6 @@ class BuildFrontendConfig:
|
||||
return {"name": self.name, "args": repr(self.args)}
|
||||
|
||||
|
||||
class NonPlatformWheelError(Exception):
|
||||
def __init__(self) -> None:
|
||||
message = textwrap.dedent(
|
||||
"""
|
||||
cibuildwheel: Build failed because a pure Python wheel was generated.
|
||||
|
||||
If you intend to build a pure-Python wheel, you don't need cibuildwheel - use
|
||||
`pip wheel -w DEST_DIR .` instead.
|
||||
|
||||
If you expected a platform wheel, check your project configuration, or run
|
||||
cibuildwheel with CIBW_BUILD_VERBOSITY=1 to view build logs.
|
||||
"""
|
||||
)
|
||||
|
||||
super().__init__(message)
|
||||
|
||||
|
||||
class AlreadyBuiltWheelError(Exception):
|
||||
def __init__(self, wheel_name: str) -> None:
|
||||
message = textwrap.dedent(
|
||||
f"""
|
||||
cibuildwheel: Build failed because a wheel named {wheel_name} was already generated in the current run.
|
||||
|
||||
If you expected another wheel to be generated, check your project configuration, or run
|
||||
cibuildwheel with CIBW_BUILD_VERBOSITY=1 to view build logs.
|
||||
"""
|
||||
)
|
||||
|
||||
super().__init__(message)
|
||||
|
||||
|
||||
def strtobool(val: str) -> bool:
|
||||
return val.lower() in {"y", "yes", "t", "true", "on", "1"}
|
||||
|
||||
|
||||
+25
-13
@@ -22,11 +22,9 @@ from .options import Options
|
||||
from .typing import PathOrStr
|
||||
from .util import (
|
||||
CIBW_CACHE_PATH,
|
||||
AlreadyBuiltWheelError,
|
||||
BuildFrontendConfig,
|
||||
BuildFrontendName,
|
||||
BuildSelector,
|
||||
NonPlatformWheelError,
|
||||
call,
|
||||
combine_constraints,
|
||||
download,
|
||||
@@ -154,6 +152,16 @@ def setup_setuptools_cross_compile(
|
||||
# set the platform name
|
||||
map_plat = {"32": "win32", "64": "win-amd64", "ARM64": "win-arm64"}
|
||||
plat_name = map_plat[python_configuration.arch]
|
||||
|
||||
# Set environment variable so that setuptools._distutils.get_platform()
|
||||
# identifies the target, not the host
|
||||
vscmd_arg_tgt_arch = {"32": "x86", "64": "x64", "ARM64": "arm64"}
|
||||
current_tgt_arch = vscmd_arg_tgt_arch[python_configuration.arch]
|
||||
if (env.get("VSCMD_ARG_TGT_ARCH") or current_tgt_arch) != current_tgt_arch:
|
||||
msg = f"VSCMD_ARG_TGT_ARCH must be set to {current_tgt_arch!r}, got {env['VSCMD_ARG_TGT_ARCH']!r}. If you're setting up MSVC yourself (e.g. using vcvarsall.bat or msvc-dev-cmd), make sure to target the right architecture. Alternatively, run cibuildwheel without configuring MSVC, and let the build backend handle it."
|
||||
raise errors.FatalError(msg)
|
||||
env["VSCMD_ARG_TGT_ARCH"] = current_tgt_arch
|
||||
|
||||
# (This file must be default/locale encoding, so we can't pass 'encoding')
|
||||
distutils_cfg.write_text(
|
||||
textwrap.dedent(
|
||||
@@ -223,7 +231,7 @@ def setup_python(
|
||||
dependency_constraint_flags: Sequence[PathOrStr],
|
||||
environment: ParsedEnvironment,
|
||||
build_frontend: BuildFrontendName,
|
||||
) -> dict[str, str]:
|
||||
) -> tuple[Path, dict[str, str]]:
|
||||
tmp.mkdir()
|
||||
implementation_id = python_configuration.identifier.split("-")[0]
|
||||
python_libs_base = None
|
||||
@@ -246,8 +254,10 @@ def setup_python(
|
||||
raise ValueError(msg)
|
||||
assert base_python.exists()
|
||||
|
||||
use_uv = build_frontend == "build[uv]" and Version(python_configuration.version) >= Version(
|
||||
"3.8"
|
||||
use_uv = (
|
||||
build_frontend == "build[uv]"
|
||||
and Version(python_configuration.version) >= Version("3.8")
|
||||
and not python_configuration.identifier.startswith("pp38-")
|
||||
)
|
||||
uv_path = find_uv()
|
||||
|
||||
@@ -330,7 +340,7 @@ def setup_python(
|
||||
setup_setuptools_cross_compile(tmp, python_configuration, python_libs_base, env)
|
||||
setup_rust_cross_compile(tmp, python_configuration, python_libs_base, env)
|
||||
|
||||
return env
|
||||
return base_python, env
|
||||
|
||||
|
||||
def build(options: Options, tmp_path: Path) -> None:
|
||||
@@ -358,8 +368,10 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
for config in python_configurations:
|
||||
build_options = options.build_options(config.identifier)
|
||||
build_frontend = build_options.build_frontend or BuildFrontendConfig("pip")
|
||||
use_uv = build_frontend.name == "build[uv]" and Version(config.version) >= Version(
|
||||
"3.8"
|
||||
use_uv = (
|
||||
build_frontend.name == "build[uv]"
|
||||
and Version(config.version) >= Version("3.8")
|
||||
and not config.identifier.startswith("pp38-")
|
||||
)
|
||||
log.build_start(config.identifier)
|
||||
|
||||
@@ -376,7 +388,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
]
|
||||
|
||||
# install Python
|
||||
env = setup_python(
|
||||
base_python, env = setup_python(
|
||||
identifier_tmp_dir / "build",
|
||||
config,
|
||||
dependency_constraint_flags,
|
||||
@@ -441,7 +453,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
if not 0 <= build_options.build_verbosity < 2:
|
||||
msg = f"build_verbosity {build_options.build_verbosity} is not supported for build frontend. Ignoring."
|
||||
log.warning(msg)
|
||||
if use_uv:
|
||||
if use_uv and "--no-isolation" not in extra_flags and "-n" not in extra_flags:
|
||||
extra_flags.append("--installer=uv")
|
||||
call(
|
||||
"python",
|
||||
@@ -462,7 +474,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
repaired_wheel_dir.mkdir()
|
||||
|
||||
if built_wheel.name.endswith("none-any.whl"):
|
||||
raise NonPlatformWheelError()
|
||||
raise errors.NonPlatformWheelError()
|
||||
|
||||
if build_options.repair_command:
|
||||
log.step("Repairing wheel...")
|
||||
@@ -478,7 +490,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
repaired_wheel = next(repaired_wheel_dir.glob("*.whl"))
|
||||
|
||||
if repaired_wheel.name in {wheel.name for wheel in built_wheels}:
|
||||
raise AlreadyBuiltWheelError(repaired_wheel.name)
|
||||
raise errors.AlreadyBuiltWheelError(repaired_wheel.name)
|
||||
|
||||
test_selected = options.globals.test_selector(config.identifier)
|
||||
if test_selected and config.arch == "ARM64" != platform_module.machine():
|
||||
@@ -502,7 +514,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
venv_dir = identifier_tmp_dir / "venv-test"
|
||||
|
||||
if use_uv:
|
||||
call("uv", "venv", venv_dir, "--python=python", env=env)
|
||||
call("uv", "venv", venv_dir, f"--python={base_python}", env=env)
|
||||
else:
|
||||
# Use pip version from the initial env to ensure determinism
|
||||
venv_args = ["--no-periodic-update", f"--pip={pip_version}"]
|
||||
|
||||
@@ -4,8 +4,41 @@ title: Changelog
|
||||
|
||||
# Changelog
|
||||
|
||||
### v2.20.0
|
||||
|
||||
- 🌟 CPython 3.13 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.13.0rc1, which is guaranteed to be ABI compatible with the final release. Free-threading is still behind a flag/config option. (#1950)
|
||||
- ✨ Provide a `CIBW_ALLOW_EMPTY` environment variable as an alternative to the command line flag. (#1937)
|
||||
- 🐛 Don't use uv on PyPy3.8 on Windows, it stopped working starting in 0.2.25. Note that PyPy 3.8 is EoL. (#1868)
|
||||
- 🛠 Set the `VSCMD_ARG_TGT_ARCH` variable based on target arch. (#1876)
|
||||
- 🛠 Undo cleaner output on pytest 8-8.2 now that 8.3 is out. (#1943)
|
||||
- 📚 Update examples to use Python 3.12 on host (cibuildwheel will require Python 3.11+ on the host machine starting in October 2024) (#1919)
|
||||
|
||||
|
||||
### v2.19.2
|
||||
|
||||
- 🐛 Update manylinux2014 pins to versions that support past-EoL CentOS 7 mirrors. (#1917)
|
||||
- 🐛 Support `--no-isolation` with `build[uv]` build-frontend. (#1889)
|
||||
- 🛠 Provide attestations for releases at <https://github.com/pypa/cibuildwheel/attestations>. (#1916)
|
||||
- 🛠 Provide CPython 3.13.0b3. (#1913)
|
||||
- 🛠 Remove some workarounds now that pip 21.1 is available. (#1891, #1892)
|
||||
- 📚 Remove nosetest from our docs. (#1821)
|
||||
- 📚 Document the macOS ARM workaround for 3.8 on GHA. (#1871)
|
||||
- 📚 GitLab CI + macOS is now a supported platform with an example. (#1911)
|
||||
|
||||
|
||||
### v2.19.1
|
||||
|
||||
- 🐛 Don't require setup-python on GHA for Pyodide (#1868)
|
||||
- 🐛 Specify full python path for uv (fixes issue in 0.2.10 & 0.2.11) (#1881)
|
||||
- 🛠 Update for pip 24.1b2 on CPython 3.13. (#1879)
|
||||
- 🛠 Fix a warning in our schema generation script. (#1866)
|
||||
- 🛠 Cleaner output on pytest 8-8.2. (#1865)
|
||||
|
||||
|
||||
### v2.19.0
|
||||
|
||||
See the [release post](https://iscinumpy.dev/post/cibuildwheel-2-19-0/) for more info on new features!
|
||||
|
||||
- 🌟 Add Pyodide platform. Set with `--platform pyodide` or `CIBW_PLATFORM: pyodide` on Linux with a host Python 3.12 to build WebAssembly wheels. Not accepted on PyPI currently, but usable directly in a website using Pyodide, for live docs, etc. (#1456, #1859)
|
||||
- 🌟 Add `build[uv]` backend, which will take a pre-existing uv install (or install `cibuildwheel[uv]`) and use `uv` for all environment setup and installs on Python 3.8+. This is significantly faster in most cases. (#1856)
|
||||
- ✨ Add free-threaded macOS builds and update CPython to 3.13.0b2. (#1854)
|
||||
|
||||
@@ -109,7 +109,7 @@ You can see a list of sessions by typing `nox -l`; here are a few common ones:
|
||||
```console
|
||||
nox -s lint # Run the linters (default)
|
||||
nox -s tests [-- PYTEST-ARGS] # Run the tests (default)
|
||||
nox -s docs -- serve # Build and serve the documentation
|
||||
nox -s docs # Build and serve the documentation
|
||||
nox -s build # Make SDist and wheel
|
||||
```
|
||||
|
||||
@@ -177,7 +177,7 @@ Then, increment the project version number using:
|
||||
bin/bump_version.py
|
||||
```
|
||||
|
||||
You'll be prompted to enter the new version number. Update the changelog when prompted. The script will create a 'bump version' commit and version tag.
|
||||
(or `nox -s bump_version`) You'll be prompted to enter the new version number. Update the changelog when prompted. The script will create a 'bump version' commit and version tag.
|
||||
|
||||
Finally, cut the release and push to GitHub.
|
||||
|
||||
@@ -186,3 +186,5 @@ git push && git push --tags
|
||||
```
|
||||
|
||||
Then head to https://github.com/pypa/cibuildwheel/releases and create a GitHub release from the new tag, pasting in the changelog entry. Once the release is created inside GitHub, a CI job will create the assets and upload them to PyPI.
|
||||
|
||||
If there were any schema updates, run `pipx run ./bin/generate_schema.py --schemastore > partial-cibuildwheel.json` and contribute the changes to SchemaStore.
|
||||
|
||||
@@ -657,3 +657,10 @@
|
||||
C++ framework. Uses cibuildwheel to deploy on as many operating
|
||||
systems and Python versions as possible with only one dependency
|
||||
(any NumPy).
|
||||
|
||||
- name: streaming-form-data
|
||||
gh: siddhantgoel/streaming-form-data
|
||||
ci: [github]
|
||||
os: [apple, linux, windows]
|
||||
pypi: streaming-form-data
|
||||
notes: Streaming parser for multipart/form-data written in Cython
|
||||
|
||||
+20
-11
@@ -142,7 +142,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.19.0
|
||||
uses: pypa/cibuildwheel@v2.20.0
|
||||
```
|
||||
|
||||
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.
|
||||
@@ -164,7 +164,7 @@ The second option, and the only one that supports other CI systems, is using a `
|
||||
|
||||
```bash
|
||||
# requirements-cibw.txt
|
||||
cibuildwheel==2.19.0
|
||||
cibuildwheel==2.20.0
|
||||
```
|
||||
|
||||
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:
|
||||
@@ -328,7 +328,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.19.0 --output-dir wheelhouse
|
||||
pipx run cibuildwheel==2.20.0 --output-dir wheelhouse
|
||||
pipx run twine upload wheelhouse/*.whl
|
||||
```
|
||||
|
||||
@@ -363,16 +363,25 @@ If you're building on an arm64 runner, you might notice something strange about
|
||||
|
||||
This is fine for simple C extensions, but for more complicated builds on arm64 it becomes an issue.
|
||||
|
||||
So, if the cross-compilation is an issue for you, there is an 'experimental' installer available that's built natively for arm64.
|
||||
|
||||
To use this installer and perform native CPython 3.8 building, before invoking cibuildwheel, install the universal2 version of Python on your arm64 runner, something like:
|
||||
So, if you want to build macOS arm64 wheels on an arm64 runner (e.g., `macos-14`) on Python 3.8, before invoking cibuildwheel, you should install a native arm64 Python 3.8 interpreter on the runner:
|
||||
|
||||
|
||||
```bash
|
||||
curl -o /tmp/Python38.pkg https://www.python.org/ftp/python/3.8.10/python-3.8.10-macos11.pkg
|
||||
sudo installer -pkg /tmp/Python38.pkg -target /
|
||||
sh "/Applications/Python 3.8/Install Certificates.command"
|
||||
```
|
||||
!!! tab "GitHub Actions"
|
||||
|
||||
```yaml
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.8
|
||||
if: runner.os == 'macOS' && runner.arch == 'ARM64'
|
||||
```
|
||||
|
||||
!!! tab "Generic"
|
||||
|
||||
```bash
|
||||
curl -o /tmp/Python38.pkg https://www.python.org/ftp/python/3.8.10/python-3.8.10-macos11.pkg
|
||||
sudo installer -pkg /tmp/Python38.pkg -target /
|
||||
sh "/Applications/Python 3.8/Install Certificates.command"
|
||||
```
|
||||
|
||||
Then cibuildwheel will detect that it's installed and use it instead. However, you probably don't want to build x86_64 wheels on this Python, unless you're happy with them only supporting macOS 11+.
|
||||
|
||||
|
||||
+34
-12
@@ -621,10 +621,32 @@ This option can also be set using the [command-line option](#command-line) `--pr
|
||||
CIBW_PRERELEASE_PYTHONS: True
|
||||
```
|
||||
|
||||
### `CIBW_ALLOW_EMPTY` {: #allow-empty}
|
||||
> Suppress the error code if no wheels match the specified build identifiers
|
||||
|
||||
When none of the specified build identifiers match any available versions,
|
||||
cibuildwheel will typically return error code 3, indicating that there are
|
||||
no wheels to build. Enabling this option will suppress this error, allowing
|
||||
the build process to complete without signaling an error.
|
||||
|
||||
Default: Off (0). Error code 3 is returned when no builds are selected.
|
||||
|
||||
This option can also be set using the [command-line option](#command-line)
|
||||
`--allow-empty`. This option is not available in the `pyproject.toml` config.
|
||||
|
||||
#### Examples
|
||||
|
||||
!!! tab examples "Environment variables"
|
||||
|
||||
```yaml
|
||||
# Prevent an error code if the build does not match any wheels
|
||||
CIBW_ALLOW_EMPTY: True
|
||||
```
|
||||
|
||||
## Build customization
|
||||
|
||||
### `CIBW_BUILD_FRONTEND` {: #build-frontend}
|
||||
> Set the tool to use to build, either "pip" (default for now), "build", or "build[uv]"
|
||||
> Set the tool to use to build, either "pip" (default for now), "build", or "build\[uv\]"
|
||||
|
||||
Options:
|
||||
|
||||
@@ -636,7 +658,7 @@ Default: `pip`
|
||||
Choose which build frontend to use. Can either be "pip", which will run
|
||||
`python -m pip wheel`, or "build", which will run `python -m build --wheel`.
|
||||
|
||||
You can also use "build[uv]", which will use an external [uv][] everywhere
|
||||
You can also use "build\[uv\]", which will use an external [uv][] everywhere
|
||||
possible, both through `--installer=uv` passed to build, as well as when making
|
||||
all build and test environments. This will generally speed up cibuildwheel.
|
||||
Make sure you have an external uv on Windows and macOS, either by
|
||||
@@ -657,6 +679,12 @@ optional `args` option.
|
||||
will change the default to [build][], in line with the PyPA's recommendation.
|
||||
If you want to try `build` before this, you can use this option.
|
||||
|
||||
!!! warning
|
||||
If you are using `build[uv]` and are passing `--no-isolation` or `-n`, we
|
||||
will detect this and avoid passing `--installer=uv` to build, but still
|
||||
install all packages with uv. We do not currently detect combined short
|
||||
options, like `-xn`!
|
||||
|
||||
[pip]: https://pip.pypa.io/en/stable/cli/pip_wheel/
|
||||
[build]: https://github.com/pypa/build/
|
||||
[uv]: https://github.com/astral-sh/uv
|
||||
@@ -818,7 +846,7 @@ Platform-specific environment variables are also available:<br/>
|
||||
In configuration mode, you can use a [TOML][] table instead of a raw string as shown above.
|
||||
|
||||
!!! note
|
||||
cibuildwheel always defines the environment variable `CIBUILDWHEEL=1`. This can be useful for [building wheels with optional extensions](faq.md#building-packages-with-optional-c-extensions).
|
||||
cibuildwheel always defines the environment variable `CIBUILDWHEEL=1`. This can be useful for [building wheels with optional extensions](faq.md#optional-extensions).
|
||||
|
||||
!!! note
|
||||
To do its work, cibuildwheel sets the variables `VIRTUALENV_PIP`, `DIST_EXTRA_CONFIG`, `SETUPTOOLS_EXT_SUFFIX`, `PIP_DISABLE_PIP_VERSION_CHECK`, `PIP_ROOT_USER_ACTION`, and it extends the variables `PATH` and `PIP_CONSTRAINT`. Your assignments to these options might be replaced or extended.
|
||||
@@ -1383,9 +1411,6 @@ Platform-specific environment variables are also available:<br/>
|
||||
!!! tab examples "Environment variables"
|
||||
|
||||
```yaml
|
||||
# Run the project tests against the installed wheel using `nose`
|
||||
CIBW_TEST_COMMAND: nosetests {project}/tests
|
||||
|
||||
# Run the package tests using `pytest`
|
||||
CIBW_TEST_COMMAND: pytest {package}/tests
|
||||
|
||||
@@ -1402,9 +1427,6 @@ Platform-specific environment variables are also available:<br/>
|
||||
|
||||
```toml
|
||||
[tool.cibuildwheel]
|
||||
# Run the project tests against the installed wheel using `nose`
|
||||
test-command = "nosetests {project}/tests"
|
||||
|
||||
# Run the package tests using `pytest`
|
||||
test-command = "pytest {package}/tests"
|
||||
|
||||
@@ -1510,7 +1532,7 @@ Platform-specific environment variables are also available:<br/>
|
||||
CIBW_TEST_REQUIRES: pytest
|
||||
|
||||
# Install specific versions of test dependencies
|
||||
CIBW_TEST_REQUIRES: nose==1.3.7 moto==0.4.31
|
||||
CIBW_TEST_REQUIRES: pytest==8.2.2 packaging==24.1
|
||||
```
|
||||
|
||||
!!! tab examples "pyproject.toml"
|
||||
@@ -1522,7 +1544,7 @@ Platform-specific environment variables are also available:<br/>
|
||||
|
||||
# Install specific versions of test dependencies
|
||||
[tool.cibuildwheel]
|
||||
test-requires = ["nose==1.3.7", "moto==0.4.31"]
|
||||
test-requires = ["pytest==8.2.2", "packaging==24.1"]
|
||||
```
|
||||
|
||||
In configuration files, you can use an array, and the items will be joined with a space.
|
||||
@@ -1667,7 +1689,7 @@ cibuildwheel exits 0 on success, or >0 if an error occurs.
|
||||
Specific error codes are defined:
|
||||
|
||||
- 2 means a configuration error
|
||||
- 3 means no builds are selected (and --allow-empty wasn't passed)
|
||||
- 3 means no builds are selected (and [`--allow-empty`](#allow-empty) wasn't passed)
|
||||
- 4 means you specified an option that has been deprecated.
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -161,7 +161,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.19.0
|
||||
run: pipx run cibuildwheel==2.20.0
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
@@ -198,7 +198,7 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/
|
||||
- uses: actions/setup-python@v5
|
||||
|
||||
- name: Install cibuildwheel
|
||||
run: python -m pip install cibuildwheel==2.19.0
|
||||
run: python -m pip install cibuildwheel==2.20.0
|
||||
|
||||
- name: Build wheels
|
||||
run: python -m cibuildwheel --output-dir wheelhouse
|
||||
|
||||
+24
-22
@@ -12,9 +12,9 @@ title: Working examples
|
||||
| [pytorch-fairseq][] | ![github icon][] | ![apple icon][] ![linux icon][] | Facebook AI Research Sequence-to-Sequence Toolkit written in Python. |
|
||||
| [NumPy][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The fundamental package for scientific computing with Python. |
|
||||
| [Tornado][] | ![github icon][] | ![linux icon][] ![apple icon][] ![windows icon][] | Tornado is a Python web framework and asynchronous networking library. Uses stable ABI for a small C extension. |
|
||||
| [Matplotlib][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The venerable Matplotlib, a Python library with C++ portions |
|
||||
| [NCNN][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | ncnn is a high-performance neural network inference framework optimized for the mobile platform |
|
||||
| [duckdb][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | DuckDB is an analytical in-process SQL database management system |
|
||||
| [NCNN][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | ncnn is a high-performance neural network inference framework optimized for the mobile platform |
|
||||
| [Matplotlib][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The venerable Matplotlib, a Python library with C++ portions |
|
||||
| [Prophet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth. |
|
||||
| [MyPy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | The compiled version of MyPy using MyPyC. |
|
||||
| [Kivy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Open source UI framework written in Python, running on Windows, Linux, macOS, Android and iOS |
|
||||
@@ -38,7 +38,6 @@ title: Working examples
|
||||
| [UltraJSON][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Ultra fast JSON decoder and encoder written in C with Python bindings |
|
||||
| [OpenSpiel][] | ![github icon][] | ![apple icon][] ![linux icon][] | OpenSpiel is a collection of environments and algorithms for research in general reinforcement learning and search/planning in games. |
|
||||
| [aiortc][] | ![github icon][] | ![apple icon][] ![linux icon][] | WebRTC and ORTC implementation for Python using asyncio. |
|
||||
| [Confluent client for Kafka][] | ![travisci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | setup in `tools/wheels/build-wheels.bat` |
|
||||
| [Dependency Injector][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Dependency injection framework for Python, uses Windows TravisCI |
|
||||
| [pyzmq][] | ![github icon][] ![circleci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Python bindings for zeromq, the networking library. Uses Cython on CPython and CFFI on PyPy. ARM wheels for linux are built natively on CircleCI. |
|
||||
| [Implicit][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes GPU support for linux wheels |
|
||||
@@ -62,23 +61,23 @@ title: Working examples
|
||||
| [ruptures][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Extensive Cython + NumPy [pyproject.toml](https://github.com/deepcharles/ruptures/blob/master/pyproject.toml) example. |
|
||||
| [OpenTimelineIO][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Open Source API and interchange format for editorial timeline information. |
|
||||
| [PyTables][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python package to manage extremely large amounts of data |
|
||||
| [Parselmouth][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python interface to the Praat software package, using pybind11, C++17 and CMake, with the core Praat static library built only once and shared between wheels. |
|
||||
| [google neuroglancer][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | WebGL-based viewer for volumetric data |
|
||||
| [Parselmouth][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python interface to the Praat software package, using pybind11, C++17 and CMake, with the core Praat static library built only once and shared between wheels. |
|
||||
| [DeepForest][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | An Efficient, Scalable and Optimized Python Framework for Deep Forest (2021.2.1) |
|
||||
| [AutoPy][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes a Windows Travis build. |
|
||||
| [H3-py][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Python bindings for H3, a hierarchical hexagonal geospatial indexing system |
|
||||
| [mosec][] | ![github icon][] | ![linux icon][] ![apple icon][] | A machine learning model serving framework powered by Rust |
|
||||
| [Picologging][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A high-performance logging library for Python. |
|
||||
| [time-machine][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Time mocking library using only the CPython C API. |
|
||||
| [Picologging][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A high-performance logging library for Python. |
|
||||
| [markupsafe][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Safely add untrusted strings to HTML/XML markup. |
|
||||
| [Rtree][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Rtree: spatial index for Python GIS |
|
||||
| [pybind11 cmake_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Example pybind11 module built with a CMake-based build system |
|
||||
| [KDEpy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Kernel Density Estimation in Python |
|
||||
| [dd-trace-py][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Uses custom alternate arch emulation on GitHub |
|
||||
| [python-rapidjson][] | ![travisci icon][] ![gitlab icon][] ![appveyor icon][] | ![windows icon][] ![linux icon][] | Python wrapper around rapidjson |
|
||||
| [tgcalls][] | ![github icon][] | ![apple icon][] ![windows icon][] | Python `pybind11` binding to Telegram's WebRTC library with third party dependencies like `OpenSSL`, `MozJPEG`, `FFmpeg`, etc. |
|
||||
| [python-snappy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Python bindings for the snappy google library |
|
||||
| [python-rapidjson][] | ![travisci icon][] ![gitlab icon][] ![appveyor icon][] | ![windows icon][] ![linux icon][] | Python wrapper around rapidjson |
|
||||
| [pybind11 python_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Example pybind11 module built with a Python-based build system |
|
||||
| [python-snappy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Python bindings for the snappy google library |
|
||||
| [abess][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A fast best-subset selection library. It uses cibuildwheel to build a large project with C++ extensions. |
|
||||
| [sourmash][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Quickly search, compare, and analyze genomic and metagenomic data sets. |
|
||||
| [cyvcf2][] | ![github icon][] | ![apple icon][] ![linux icon][] | cython + htslib == fast VCF and BCF processing |
|
||||
@@ -91,13 +90,14 @@ title: Working examples
|
||||
| [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 |
|
||||
| [streaming-form-data][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Streaming parser for multipart/form-data written in Cython |
|
||||
| [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 |
|
||||
| [power-grid-model][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Python/C++ library for distribution power system analysis |
|
||||
| [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 |
|
||||
| [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. |
|
||||
| [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. |
|
||||
| [pybind11 scikit_build_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | An example combining scikit-build and pybind11 |
|
||||
| [polaroid][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Full range of wheels for setuptools rust, with auto release and PyPI deploy. |
|
||||
@@ -106,24 +106,25 @@ title: Working examples
|
||||
| [cf-units][] | ![github icon][] | ![apple icon][] ![linux icon][] | Units of measure as required by the Climate and Forecast (CF) Metadata Conventions |
|
||||
| [ninja][] | ![github icon][] ![travisci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Multitagged binary builds for all supported platforms, using cibw 2 config configuration. |
|
||||
| [numpythia][] | ![github icon][] | ![apple icon][] ![linux icon][] | The interface between PYTHIA and NumPy |
|
||||
| [Confluent client for Kafka][] | ![travisci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | setup in `tools/wheels/build-wheels.bat` |
|
||||
| [pyjet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The interface between FastJet and NumPy |
|
||||
| [ril][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A python binding to Rust Imaging library using maturin and Pyo3, utilizes Github Action cache to improve speed. Builds abi3 wheels. |
|
||||
| [SiPM][] | ![github icon][] | ![apple icon][] ![linux icon][] | High performance library for SiPM detectors simulation using C++17, OpenMP and AVX2 intrinsics. |
|
||||
| [GSD][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Cython and NumPy project with 64-bit wheels. |
|
||||
| [CorrectionLib][] | ![github icon][] | ![apple icon][] ![linux icon][] | Structured JSON powered correction library for HEP, designed for the CMS experiment at CERN. |
|
||||
| [SiPM][] | ![github icon][] | ![apple icon][] ![linux icon][] | High performance library for SiPM detectors simulation using C++17, OpenMP and AVX2 intrinsics. |
|
||||
| [aalink][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Async Python interface for Ableton Link. |
|
||||
| [CorrectionLib][] | ![github icon][] | ![apple icon][] ![linux icon][] | Structured JSON powered correction library for HEP, designed for the CMS experiment at CERN. |
|
||||
| [xmlstarlet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Python 3.6+ CFFI bindings with true MSVC build. |
|
||||
| [pyinstrument_cext][] | ![travisci icon][] ![appveyor icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A simple C extension, without external dependencies |
|
||||
| [werpy][] | ![github icon][] | ![windows icon][] ![linux icon][] ![apple icon][] | An ultra-fast python package using optimized dynamic programming to compute the Word Error Rate (WER). |
|
||||
| [pyinstrument_cext][] | ![travisci icon][] ![appveyor icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A simple C extension, without external dependencies |
|
||||
| [pybind11 cross build example][] | ![github icon][] ![gitlab icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Same as pybind11 cmake_example but used to demo Linux ARM + Windows + macOS builds on GitLab |
|
||||
|
||||
[scikit-learn]: https://github.com/scikit-learn/scikit-learn
|
||||
[pytorch-fairseq]: https://github.com/facebookresearch/fairseq
|
||||
[NumPy]: https://github.com/numpy/numpy
|
||||
[Tornado]: https://github.com/tornadoweb/tornado
|
||||
[Matplotlib]: https://github.com/matplotlib/matplotlib
|
||||
[NCNN]: https://github.com/Tencent/ncnn
|
||||
[duckdb]: https://github.com/duckdb/duckdb
|
||||
[NCNN]: https://github.com/Tencent/ncnn
|
||||
[Matplotlib]: https://github.com/matplotlib/matplotlib
|
||||
[Prophet]: https://github.com/facebook/prophet
|
||||
[MyPy]: https://github.com/mypyc/mypy_mypyc-wheels
|
||||
[Kivy]: https://github.com/kivy/kivy
|
||||
@@ -147,7 +148,6 @@ title: Working examples
|
||||
[UltraJSON]: https://github.com/ultrajson/ultrajson
|
||||
[OpenSpiel]: https://github.com/google-deepmind/open_spiel
|
||||
[aiortc]: https://github.com/aiortc/aiortc
|
||||
[Confluent client for Kafka]: https://github.com/confluentinc/confluent-kafka-python
|
||||
[Dependency Injector]: https://github.com/ets-labs/python-dependency-injector
|
||||
[pyzmq]: https://github.com/zeromq/pyzmq
|
||||
[Implicit]: https://github.com/benfred/implicit
|
||||
@@ -171,23 +171,23 @@ title: Working examples
|
||||
[ruptures]: https://github.com/deepcharles/ruptures
|
||||
[OpenTimelineIO]: https://github.com/AcademySoftwareFoundation/OpenTimelineIO
|
||||
[PyTables]: https://github.com/PyTables/PyTables
|
||||
[Parselmouth]: https://github.com/YannickJadoul/Parselmouth
|
||||
[google neuroglancer]: https://github.com/google/neuroglancer
|
||||
[Parselmouth]: https://github.com/YannickJadoul/Parselmouth
|
||||
[DeepForest]: https://github.com/LAMDA-NJU/Deep-Forest
|
||||
[AutoPy]: https://github.com/autopilot-rs/autopy
|
||||
[H3-py]: https://github.com/uber/h3-py
|
||||
[mosec]: https://github.com/mosecorg/mosec
|
||||
[Picologging]: https://github.com/microsoft/picologging
|
||||
[time-machine]: https://github.com/adamchainz/time-machine
|
||||
[Picologging]: https://github.com/microsoft/picologging
|
||||
[markupsafe]: https://github.com/pallets/markupsafe
|
||||
[Rtree]: https://github.com/Toblerity/rtree
|
||||
[pybind11 cmake_example]: https://github.com/pybind/cmake_example
|
||||
[KDEpy]: https://github.com/tommyod/KDEpy
|
||||
[dd-trace-py]: https://github.com/DataDog/dd-trace-py
|
||||
[python-rapidjson]: https://github.com/python-rapidjson/python-rapidjson
|
||||
[tgcalls]: https://github.com/MarshalX/tgcalls
|
||||
[python-snappy]: https://github.com/intake/python-snappy
|
||||
[python-rapidjson]: https://github.com/python-rapidjson/python-rapidjson
|
||||
[pybind11 python_example]: https://github.com/pybind/python_example
|
||||
[python-snappy]: https://github.com/intake/python-snappy
|
||||
[abess]: https://github.com/abess-team/abess
|
||||
[sourmash]: https://github.com/sourmash-bio/sourmash
|
||||
[cyvcf2]: https://github.com/brentp/cyvcf2
|
||||
@@ -200,13 +200,14 @@ title: Working examples
|
||||
[pillow-heif]: https://github.com/bigcat88/pillow_heif
|
||||
[TgCrypto]: https://github.com/pyrogram/tgcrypto
|
||||
[iDynTree]: https://github.com/robotology/idyntree
|
||||
[streaming-form-data]: https://github.com/siddhantgoel/streaming-form-data
|
||||
[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
|
||||
[power-grid-model]: https://github.com/PowerGridModel/power-grid-model
|
||||
[pybase64]: https://github.com/mayeut/pybase64
|
||||
[fathon]: https://github.com/stfbnc/fathon
|
||||
[Imagecodecs (fork)]: https://github.com/czaki/imagecodecs_build
|
||||
[fathon]: https://github.com/stfbnc/fathon
|
||||
[Arbor]: https://github.com/arbor-sim/arbor
|
||||
[pybind11 scikit_build_example]: https://github.com/pybind/scikit_build_example
|
||||
[polaroid]: https://github.com/daggy1234/polaroid
|
||||
@@ -215,15 +216,16 @@ title: Working examples
|
||||
[cf-units]: https://github.com/SciTools/cf-units
|
||||
[ninja]: https://github.com/scikit-build/ninja-python-distributions
|
||||
[numpythia]: https://github.com/scikit-hep/numpythia
|
||||
[Confluent client for Kafka]: https://github.com/confluentinc/confluent-kafka-python
|
||||
[pyjet]: https://github.com/scikit-hep/pyjet
|
||||
[ril]: https://github.com/Cryptex-github/ril-py
|
||||
[SiPM]: https://github.com/EdoPro98/SimSiPM
|
||||
[GSD]: https://github.com/glotzerlab/gsd
|
||||
[CorrectionLib]: https://github.com/cms-nanoAOD/correctionlib
|
||||
[SiPM]: https://github.com/EdoPro98/SimSiPM
|
||||
[aalink]: https://github.com/artfwo/aalink
|
||||
[CorrectionLib]: https://github.com/cms-nanoAOD/correctionlib
|
||||
[xmlstarlet]: https://github.com/dimitern/xmlstarlet
|
||||
[pyinstrument_cext]: https://github.com/joerick/pyinstrument_cext
|
||||
[werpy]: https://github.com/analyticsinmotion/werpy
|
||||
[pyinstrument_cext]: https://github.com/joerick/pyinstrument_cext
|
||||
[pybind11 cross build example]: https://github.com/wbarnha/pybind_cmake_example_crossbuild
|
||||
|
||||
[appveyor icon]: data/readme_icons/appveyor.svg
|
||||
|
||||
@@ -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.19.0
|
||||
install: python -m pip install cibuildwheel==2.20.0
|
||||
|
||||
build_script: python -m cibuildwheel --output-dir wheelhouse
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ jobs:
|
||||
- bash: |
|
||||
set -o errexit
|
||||
python3 -m pip install --upgrade pip
|
||||
pip3 install cibuildwheel==2.19.0
|
||||
pip3 install cibuildwheel==2.20.0
|
||||
displayName: Install dependencies
|
||||
- bash: cibuildwheel --output-dir wheelhouse .
|
||||
displayName: Build wheels
|
||||
@@ -14,13 +14,13 @@ jobs:
|
||||
inputs: {pathtoPublish: 'wheelhouse'}
|
||||
|
||||
- job: macos
|
||||
pool: {vmImage: 'macOS-11'}
|
||||
pool: {vmImage: 'macOS-12'}
|
||||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
- bash: |
|
||||
set -o errexit
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install cibuildwheel==2.19.0
|
||||
python3 -m pip install cibuildwheel==2.20.0
|
||||
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.19.0
|
||||
pip install cibuildwheel==2.20.0
|
||||
displayName: Install dependencies
|
||||
- bash: cibuildwheel --output-dir wheelhouse .
|
||||
displayName: Build wheels
|
||||
|
||||
@@ -4,14 +4,14 @@ jobs:
|
||||
linux-wheels:
|
||||
working_directory: ~/linux-wheels
|
||||
docker:
|
||||
- image: circleci/python:3.9
|
||||
- image: cimg/python:3.12
|
||||
steps:
|
||||
- checkout
|
||||
- setup_remote_docker
|
||||
- run:
|
||||
name: Build the Linux wheels.
|
||||
command: |
|
||||
pip3 install --user cibuildwheel==2.19.0
|
||||
python3 -m pip install --user cibuildwheel==2.20.0
|
||||
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.19.0
|
||||
python3 -m pip install --user cibuildwheel==2.20.0
|
||||
python3 -m cibuildwheel --output-dir wheelhouse
|
||||
- store_artifacts:
|
||||
path: wheelhouse/
|
||||
@@ -36,13 +36,15 @@ jobs:
|
||||
osx-wheels:
|
||||
working_directory: ~/osx-wheels
|
||||
macos:
|
||||
xcode: 12.5.1
|
||||
xcode: 15.4.0
|
||||
resource_class: macos.m1.medium.gen1
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Build the OS X wheels.
|
||||
command: |
|
||||
pip3 install cibuildwheel==2.19.0
|
||||
sudo softwareupdate --install-rosetta --agree-to-license # for python<=3.8 or x86_64/universal2 tests
|
||||
pip3 install cibuildwheel==2.20.0
|
||||
cibuildwheel --output-dir wheelhouse
|
||||
- store_artifacts:
|
||||
path: wheelhouse/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
build_and_store_wheels: &BUILD_AND_STORE_WHEELS
|
||||
install_cibuildwheel_script:
|
||||
- python -m pip install cibuildwheel==2.19.0
|
||||
- python -m pip install cibuildwheel==2.20.0
|
||||
run_cibuildwheel_script:
|
||||
- cibuildwheel
|
||||
wheels_artifacts:
|
||||
@@ -11,10 +11,11 @@ macos_task:
|
||||
name: Build macOS x86_64 and arm64 wheels.
|
||||
macos_instance:
|
||||
image: ghcr.io/cirruslabs/macos-sonoma-xcode
|
||||
|
||||
env:
|
||||
PATH: /opt/homebrew/opt/python@3.10/libexec/bin:$PATH
|
||||
VENV_ROOT: ${HOME}/venv-cibuildwheel
|
||||
PATH: ${VENV_ROOT}/bin:${PATH}
|
||||
CIBW_ARCHS_MACOS: x86_64 arm64
|
||||
install_pre_requirements_script:
|
||||
- brew install python@3.10
|
||||
- brew install python@3.12
|
||||
- python3.12 -m venv ${VENV_ROOT}
|
||||
<<: *BUILD_AND_STORE_WHEELS
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
build_and_store_wheels: &BUILD_AND_STORE_WHEELS
|
||||
install_cibuildwheel_script:
|
||||
- python -m pip install cibuildwheel==2.19.0
|
||||
- python -m pip install cibuildwheel==2.20.0
|
||||
run_cibuildwheel_script:
|
||||
- cibuildwheel
|
||||
wheels_artifacts:
|
||||
@@ -15,9 +15,14 @@ linux_x86_task:
|
||||
platform: linux
|
||||
cpu: 4
|
||||
memory: 4G
|
||||
|
||||
env:
|
||||
VENV_ROOT: ${HOME}/venv-cibuildwheel
|
||||
PATH: ${VENV_ROOT}/bin:${PATH}
|
||||
install_pre_requirements_script:
|
||||
- apt install -y python3-venv python-is-python3
|
||||
- add-apt-repository -y ppa:deadsnakes/ppa
|
||||
- apt-get update
|
||||
- apt-get install -y python3.12-venv
|
||||
- python3.12 -m venv ${VENV_ROOT}
|
||||
<<: *BUILD_AND_STORE_WHEELS
|
||||
|
||||
linux_aarch64_task:
|
||||
@@ -29,9 +34,14 @@ linux_aarch64_task:
|
||||
platform: linux
|
||||
cpu: 4
|
||||
memory: 4G
|
||||
|
||||
env:
|
||||
VENV_ROOT: ${HOME}/venv-cibuildwheel
|
||||
PATH: ${VENV_ROOT}/bin:${PATH}
|
||||
install_pre_requirements_script:
|
||||
- apt install -y python3-venv python-is-python3
|
||||
- add-apt-repository -y ppa:deadsnakes/ppa
|
||||
- apt-get update
|
||||
- apt-get install -y python3.12-venv
|
||||
- python3.12 -m venv ${VENV_ROOT}
|
||||
<<: *BUILD_AND_STORE_WHEELS
|
||||
|
||||
windows_x86_task:
|
||||
@@ -42,7 +52,7 @@ windows_x86_task:
|
||||
memory: 4G
|
||||
|
||||
install_pre_requirements_script:
|
||||
- choco install -y --no-progress python3 --version 3.10.6
|
||||
- choco install -y --no-progress python3 --version 3.12.4
|
||||
- refreshenv
|
||||
- echo PATH=%PATH% >> "%CIRRUS_ENV%"
|
||||
<<: *BUILD_AND_STORE_WHEELS
|
||||
@@ -51,9 +61,10 @@ macos_arm64_task:
|
||||
name: Build macOS arm64 wheels.
|
||||
macos_instance:
|
||||
image: ghcr.io/cirruslabs/macos-sonoma-xcode
|
||||
|
||||
env:
|
||||
PATH: /opt/homebrew/opt/python@3.10/libexec/bin:$PATH
|
||||
VENV_ROOT: ${HOME}/venv-cibuildwheel
|
||||
PATH: ${VENV_ROOT}/bin:${PATH}
|
||||
install_pre_requirements_script:
|
||||
- brew install python@3.10
|
||||
- brew install python@3.12
|
||||
- python3.12 -m venv ${VENV_ROOT}
|
||||
<<: *BUILD_AND_STORE_WHEELS
|
||||
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build wheels
|
||||
uses: pypa/cibuildwheel@v2.19.0
|
||||
uses: pypa/cibuildwheel@v2.20.0
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build wheels
|
||||
uses: pypa/cibuildwheel@v2.19.0
|
||||
uses: pypa/cibuildwheel@v2.20.0
|
||||
# env:
|
||||
# CIBW_SOME_OPTION: value
|
||||
# ...
|
||||
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
platforms: all
|
||||
|
||||
- name: Build wheels
|
||||
uses: pypa/cibuildwheel@v2.19.0
|
||||
uses: pypa/cibuildwheel@v2.20.0
|
||||
env:
|
||||
# configure cibuildwheel to build native archs ('auto'), and some
|
||||
# emulated ones
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
linux:
|
||||
image: python:3.8
|
||||
image: python:3.12
|
||||
# make a docker daemon available for cibuildwheel to use
|
||||
services:
|
||||
- name: docker:dind
|
||||
@@ -12,7 +12,7 @@ linux:
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
script:
|
||||
- curl -sSL https://get.docker.com/ | sh
|
||||
- python -m pip install cibuildwheel==2.19.0
|
||||
- python -m pip install cibuildwheel==2.20.0
|
||||
- cibuildwheel --output-dir wheelhouse
|
||||
artifacts:
|
||||
paths:
|
||||
@@ -21,13 +21,25 @@ linux:
|
||||
windows:
|
||||
image: mcr.microsoft.com/windows/servercore:1809
|
||||
before_script:
|
||||
- choco install python -y --version 3.8.6
|
||||
- choco install python -y --version 3.12.4
|
||||
- choco install git.install -y
|
||||
- py -m pip install cibuildwheel==2.19.0
|
||||
- py -m pip install cibuildwheel==2.20.0
|
||||
script:
|
||||
- py -m cibuildwheel --output-dir wheelhouse --platform windows
|
||||
artifacts:
|
||||
paths:
|
||||
- wheelhouse/
|
||||
tags:
|
||||
- windows
|
||||
- saas-windows-medium-amd64
|
||||
|
||||
macos:
|
||||
image: macos-14-xcode-15
|
||||
before_script:
|
||||
- python3 -m pip install cibuildwheel==2.20.0
|
||||
script:
|
||||
- python3 -m cibuildwheel --output-dir wheelhouse
|
||||
artifacts:
|
||||
paths:
|
||||
- wheelhouse/
|
||||
tags:
|
||||
- saas-macos-medium-m1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
linux:
|
||||
image: python:3.8
|
||||
image: python:3.12
|
||||
# make a docker daemon available for cibuildwheel to use
|
||||
services:
|
||||
- name: docker:dind
|
||||
@@ -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.19.0
|
||||
- python -m pip install cibuildwheel==2.20.0
|
||||
# Assuming your CI runner's default architecture is x86_64...
|
||||
- cibuildwheel --output-dir wheelhouse --platform linux --archs aarch64
|
||||
artifacts:
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
os: linux
|
||||
dist: focal
|
||||
language: python
|
||||
python: "3.9"
|
||||
python: "3.12"
|
||||
|
||||
jobs:
|
||||
include:
|
||||
@@ -14,13 +14,13 @@ jobs:
|
||||
- os: windows
|
||||
language: shell
|
||||
before_install:
|
||||
- choco upgrade python -y --version 3.8.6
|
||||
- export PATH="/c/Python38:/c/Python38/Scripts:$PATH"
|
||||
- choco upgrade python -y --version 3.12.4
|
||||
- export PATH="/c/Python312:/c/Python312/Scripts:$PATH"
|
||||
# make sure it's on PATH as 'python3'
|
||||
- ln -s /c/Python38/python.exe /c/Python38/python3.exe
|
||||
- ln -s /c/Python312/python.exe /c/Python312/python3.exe
|
||||
|
||||
install:
|
||||
- python3 -m pip install cibuildwheel==2.19.0
|
||||
- python3 -m pip install cibuildwheel==2.20.0
|
||||
|
||||
script:
|
||||
# build the wheels, put them into './dist'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
os: linux
|
||||
dist: focal
|
||||
language: python
|
||||
python: "3.9"
|
||||
python: "3.12"
|
||||
|
||||
jobs:
|
||||
include:
|
||||
@@ -20,13 +20,13 @@ jobs:
|
||||
- os: windows
|
||||
language: shell
|
||||
before_install:
|
||||
- choco upgrade python -y --version 3.8.6
|
||||
- export PATH="/c/Python38:/c/Python38/Scripts:$PATH"
|
||||
- choco upgrade python -y --version 3.12.4
|
||||
- export PATH="/c/Python312:/c/Python312/Scripts:$PATH"
|
||||
# make sure it's on PATH as 'python3'
|
||||
- ln -s /c/Python38/python.exe /c/Python38/python3.exe
|
||||
- ln -s /c/Python312/python.exe /c/Python312/python3.exe
|
||||
|
||||
install:
|
||||
- python3 -m pip install cibuildwheel==2.19.0
|
||||
- python3 -m pip install cibuildwheel==2.20.0
|
||||
|
||||
script:
|
||||
# build the wheels, put them into './wheelhouse'
|
||||
|
||||
@@ -8,17 +8,15 @@
|
||||
os: linux
|
||||
dist: focal
|
||||
language: python
|
||||
python:
|
||||
- 3.7
|
||||
- 3.8
|
||||
python: "3.12"
|
||||
|
||||
before_install:
|
||||
- |
|
||||
if [[ "$TRAVIS_OS_NAME" = windows ]]; then
|
||||
choco upgrade python -y --version 3.8.6
|
||||
export PATH="/c/Python38:/c/Python38/Scripts:$PATH"
|
||||
choco upgrade python -y --version 3.12.4
|
||||
export PATH="/c/Python312:/c/Python312/Scripts:$PATH"
|
||||
# make sure it's on PATH as 'python3'
|
||||
ln -s /c/Python38/python.exe /c/Python38/python3.exe
|
||||
ln -s /c/Python312/python.exe /c/Python312/python3.exe
|
||||
fi
|
||||
|
||||
install:
|
||||
@@ -54,7 +52,7 @@ jobs:
|
||||
- stage: deploy
|
||||
name: Build and deploy Linux wheels
|
||||
services: docker
|
||||
install: python3 -m pip install cibuildwheel==2.19.0 twine
|
||||
install: python3 -m pip install cibuildwheel==2.20.0 twine
|
||||
script: python3 -m cibuildwheel --output-dir wheelhouse
|
||||
after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl
|
||||
# Deploy on windows
|
||||
@@ -62,7 +60,7 @@ jobs:
|
||||
name: Build and deploy Windows wheels
|
||||
os: windows
|
||||
language: shell
|
||||
install: python3 -m pip install cibuildwheel==2.19.0 twine
|
||||
install: python3 -m pip install cibuildwheel==2.20.0 twine
|
||||
script: python3 -m cibuildwheel --output-dir wheelhouse
|
||||
after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl
|
||||
|
||||
|
||||
+4
-1
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "cibuildwheel"
|
||||
version = "2.19.0"
|
||||
version = "2.20.0"
|
||||
description = "Build Python wheels on CI with minimal configuration."
|
||||
readme = "README.md"
|
||||
license = "BSD-2-Clause"
|
||||
@@ -75,6 +75,7 @@ test = [
|
||||
"pytest-timeout",
|
||||
"pytest-xdist",
|
||||
"pytest>=6",
|
||||
"setuptools",
|
||||
"tomli_w",
|
||||
"validate-pyproject",
|
||||
]
|
||||
@@ -135,6 +136,8 @@ disallow_untyped_decorators = true
|
||||
[[tool.mypy.overrides]]
|
||||
module = [
|
||||
"setuptools",
|
||||
"setuptools._distutils", # needed even if only directly import setuptools._distutils.util
|
||||
"setuptools._distutils.util",
|
||||
"pytest", # ignored in pre-commit to speed up check
|
||||
"bashlex",
|
||||
"bashlex.*",
|
||||
|
||||
+9
-9
@@ -28,22 +28,22 @@ def pytest_addoption(parser) -> None:
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(
|
||||
params=[{"CIBW_BUILD_FRONTEND": "pip"}, {"CIBW_BUILD_FRONTEND": "build"}], ids=["pip", "build"]
|
||||
)
|
||||
def build_frontend_env_nouv(request) -> dict[str, str]:
|
||||
if platform == "pyodide":
|
||||
@pytest.fixture(params=["pip", "build"])
|
||||
def build_frontend_env_nouv(request: pytest.FixtureRequest) -> dict[str, str]:
|
||||
frontend = request.param
|
||||
if platform == "pyodide" and frontend == "pip":
|
||||
pytest.skip("Can't use pip as build frontend for pyodide platform")
|
||||
|
||||
return request.param # type: ignore[no-any-return]
|
||||
return {"CIBW_BUILD_FRONTEND": frontend}
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def build_frontend_env(build_frontend_env_nouv: dict[str, str]) -> dict[str, str]:
|
||||
if build_frontend_env_nouv["CIBW_BUILD_FRONTEND"] == "build" and find_uv() is not None:
|
||||
return {"CIBW_BUILD_FRONTEND": "build[uv]"}
|
||||
frontend = build_frontend_env_nouv["CIBW_BUILD_FRONTEND"]
|
||||
if frontend != "build" or platform == "pyodide" or find_uv() is None:
|
||||
return build_frontend_env_nouv
|
||||
|
||||
return build_frontend_env_nouv
|
||||
return {"CIBW_BUILD_FRONTEND": "build[uv]"}
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
|
||||
+11
-3
@@ -69,7 +69,15 @@ def test_build_identifiers(tmp_path):
|
||||
), f"{expected_wheels} vs {build_identifiers}"
|
||||
|
||||
|
||||
def test_allow_empty(tmp_path):
|
||||
@pytest.mark.parametrize(
|
||||
("add_args", "env_allow_empty"),
|
||||
[
|
||||
(["--allow-empty"], {}),
|
||||
(["--allow-empty"], {"CIBW_ALLOW_EMPTY": "0"}),
|
||||
(None, {"CIBW_ALLOW_EMPTY": "1"}),
|
||||
],
|
||||
)
|
||||
def test_allow_empty(tmp_path, add_args, env_allow_empty):
|
||||
project_dir = tmp_path / "project"
|
||||
basic_project.generate(project_dir)
|
||||
|
||||
@@ -77,8 +85,8 @@ def test_allow_empty(tmp_path):
|
||||
# without error
|
||||
actual_wheels = utils.cibuildwheel_run(
|
||||
project_dir,
|
||||
add_env={"CIBW_BUILD": "BUILD_NOTHING_AT_ALL"},
|
||||
add_args=["--allow-empty"],
|
||||
add_env={"CIBW_BUILD": "BUILD_NOTHING_AT_ALL", **env_allow_empty},
|
||||
add_args=add_args,
|
||||
)
|
||||
|
||||
# check that nothing was built
|
||||
|
||||
@@ -34,7 +34,7 @@ class TestBeforeTest(TestCase):
|
||||
"""
|
||||
|
||||
|
||||
def test(tmp_path):
|
||||
def test(tmp_path, build_frontend_env):
|
||||
project_dir = tmp_path / "project"
|
||||
before_test_project.generate(project_dir)
|
||||
test_project_dir = project_dir / "dependency"
|
||||
@@ -49,7 +49,7 @@ def test(tmp_path):
|
||||
before_test_steps.extend(
|
||||
["pyodide build {project}/dependency", "pip install --find-links dist/ spam"]
|
||||
)
|
||||
else:
|
||||
elif build_frontend_env["CIBW_BUILD_FRONTEND"] in {"pip", "build"}:
|
||||
before_test_steps.append("python -m pip install {project}/dependency")
|
||||
|
||||
before_test = " && ".join(before_test_steps)
|
||||
@@ -66,6 +66,7 @@ def test(tmp_path):
|
||||
# mac/linux.
|
||||
"CIBW_TEST_COMMAND": f"false || {utils.invoke_pytest()} {{project}}/test",
|
||||
"CIBW_TEST_COMMAND_WINDOWS": "pytest {project}/test",
|
||||
**build_frontend_env,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ def test(tmp_path, capfd):
|
||||
else:
|
||||
expectation = does_not_raise()
|
||||
|
||||
with expectation:
|
||||
with expectation as exc_info:
|
||||
result = utils.cibuildwheel_run(
|
||||
project_dir,
|
||||
add_env={
|
||||
@@ -49,6 +49,7 @@ def test(tmp_path, capfd):
|
||||
captured = capfd.readouterr()
|
||||
if num_builds > 1:
|
||||
assert "Build failed because a wheel named" in captured.err
|
||||
assert exc_info.value.returncode == 6
|
||||
else:
|
||||
# We only produced one wheel (currently Pyodide)
|
||||
# check that it has the right name
|
||||
|
||||
@@ -52,12 +52,14 @@ def get_versions_from_constraint_file(constraint_file):
|
||||
return dict(re.findall(VERSION_REGEX, constraint_file_text))
|
||||
|
||||
|
||||
@pytest.mark.parametrize("python_version", ["3.6", "3.8", "3.10"])
|
||||
@pytest.mark.parametrize("python_version", ["3.6", "3.8", "3.12"])
|
||||
def test_pinned_versions(tmp_path, python_version, build_frontend_env_nouv):
|
||||
if utils.platform == "linux":
|
||||
pytest.skip("linux doesn't pin individual tool versions, it pins manylinux images instead")
|
||||
if python_version == "3.6" and utils.platform == "macos" and platform.machine() == "arm64":
|
||||
pytest.skip("macOS arm64 does not support Python 3.6")
|
||||
if python_version != "3.12" and utils.platform == "pyodide":
|
||||
pytest.skip(f"pyodide does not support Python {python_version}")
|
||||
|
||||
project_dir = tmp_path / "project"
|
||||
project_with_expected_version_checks.generate(project_dir)
|
||||
|
||||
+3
-4
@@ -8,8 +8,8 @@ basic_project = test_projects.new_c_project(
|
||||
setup_py_add=textwrap.dedent(
|
||||
"""
|
||||
# Will fail if PEP 518 does work
|
||||
import requests
|
||||
assert requests.__version__ == "2.27.0", "Requests found but wrong version ({0})".format(requests.__version__)
|
||||
import jmespath
|
||||
assert jmespath.__version__ == "0.10.0", "'jmespath' found but wrong version ({0})".format(jmespath.__version__)
|
||||
|
||||
# Just making sure environment is still set
|
||||
import os
|
||||
@@ -24,8 +24,7 @@ basic_project.files["pyproject.toml"] = """
|
||||
requires = [
|
||||
"setuptools >= 42",
|
||||
"setuptools_scm[toml]>=4.1.2",
|
||||
"wheel",
|
||||
"requests==2.27.0"
|
||||
"jmespath==0.10.0"
|
||||
]
|
||||
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
@@ -31,10 +31,11 @@ def test(tmp_path, capfd):
|
||||
project_dir = tmp_path / "project"
|
||||
pure_python_project.generate(project_dir)
|
||||
|
||||
with pytest.raises(subprocess.CalledProcessError):
|
||||
with pytest.raises(subprocess.CalledProcessError) as exc_info:
|
||||
print("produced wheels:", utils.cibuildwheel_run(project_dir))
|
||||
|
||||
captured = capfd.readouterr()
|
||||
print("out", captured.out)
|
||||
print("err", captured.err)
|
||||
assert exc_info.value.returncode == 5
|
||||
assert "Build failed because a pure Python wheel was generated" in captured.err
|
||||
|
||||
@@ -135,8 +135,8 @@ def test_failing_test(tmp_path):
|
||||
project_dir,
|
||||
output_dir=output_dir,
|
||||
add_env={
|
||||
"CIBW_TEST_REQUIRES": "nose",
|
||||
"CIBW_TEST_COMMAND": "nosetests {project}/test",
|
||||
"CIBW_TEST_REQUIRES": "pytest",
|
||||
"CIBW_TEST_COMMAND": f"{utils.invoke_pytest()} {{project}}/test",
|
||||
# manylinux1 has a version of bash that's been shown to have
|
||||
# problems with this, so let's check that.
|
||||
"CIBW_MANYLINUX_I686_IMAGE": "manylinux1",
|
||||
|
||||
@@ -13,7 +13,7 @@ def test_build():
|
||||
assert build_selector("cp310-manylinux_x86_64")
|
||||
assert build_selector("cp311-manylinux_x86_64")
|
||||
assert build_selector("cp312-manylinux_x86_64")
|
||||
assert not build_selector("cp313-manylinux_x86_64")
|
||||
assert build_selector("cp313-manylinux_x86_64")
|
||||
assert build_selector("pp36-manylinux_x86_64")
|
||||
assert build_selector("pp37-manylinux_x86_64")
|
||||
assert build_selector("cp36-manylinux_i686")
|
||||
@@ -34,7 +34,7 @@ def test_build():
|
||||
assert build_selector("cp310-win_amd64")
|
||||
assert build_selector("cp311-win_amd64")
|
||||
assert build_selector("cp312-win_amd64")
|
||||
assert not build_selector("cp313-win_amd64")
|
||||
assert build_selector("cp313-win_amd64")
|
||||
assert not build_selector("pp36-win_amd64")
|
||||
assert not build_selector("pp37-win_amd64")
|
||||
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
import contextlib
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Dict
|
||||
|
||||
import pytest
|
||||
import setuptools._distutils.util
|
||||
|
||||
from cibuildwheel.errors import FatalError
|
||||
from cibuildwheel.util import CIProvider, detect_ci_provider
|
||||
from cibuildwheel.windows import PythonConfiguration, setup_setuptools_cross_compile
|
||||
|
||||
# monkeypatching os.name is too flaky. E.g. It works on my machine, but fails in pipeline
|
||||
if not sys.platform.startswith("win"):
|
||||
pytest.skip("Windows-only tests", allow_module_level=True)
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def patched_environment(monkeypatch: pytest.MonkeyPatch, environment: Dict[str, str]):
|
||||
with monkeypatch.context() as mp:
|
||||
for envvar, val in environment.items():
|
||||
mp.setenv(name=envvar, value=val)
|
||||
yield
|
||||
|
||||
|
||||
def test_x86(tmp_path: Path, monkeypatch: pytest.MonkeyPatch):
|
||||
arch = "32"
|
||||
environment: Dict[str, str] = {}
|
||||
|
||||
configuration = PythonConfiguration("irrelevant", arch, "irrelevant", None)
|
||||
|
||||
setup_setuptools_cross_compile(tmp_path, configuration, tmp_path, environment)
|
||||
with patched_environment(monkeypatch, environment):
|
||||
target_platform = setuptools._distutils.util.get_platform()
|
||||
|
||||
assert environment["VSCMD_ARG_TGT_ARCH"] == "x86"
|
||||
assert target_platform == "win32"
|
||||
|
||||
|
||||
def test_x64(tmp_path: Path, monkeypatch: pytest.MonkeyPatch):
|
||||
arch = "64"
|
||||
environment: Dict[str, str] = {}
|
||||
|
||||
configuration = PythonConfiguration("irrelevant", arch, "irrelevant", None)
|
||||
|
||||
setup_setuptools_cross_compile(tmp_path, configuration, tmp_path, environment)
|
||||
with patched_environment(monkeypatch, environment):
|
||||
target_platform = setuptools._distutils.util.get_platform()
|
||||
|
||||
assert environment["VSCMD_ARG_TGT_ARCH"] == "x64"
|
||||
assert target_platform == "win-amd64"
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
detect_ci_provider() == CIProvider.azure_pipelines, reason="arm64 not recognised on azure"
|
||||
)
|
||||
def test_arm(tmp_path: Path, monkeypatch: pytest.MonkeyPatch):
|
||||
arch = "ARM64"
|
||||
environment: Dict[str, str] = {}
|
||||
|
||||
configuration = PythonConfiguration("irrelevant", arch, "irrelevant", None)
|
||||
|
||||
setup_setuptools_cross_compile(tmp_path, configuration, tmp_path, environment)
|
||||
with patched_environment(monkeypatch, environment):
|
||||
target_platform = setuptools._distutils.util.get_platform()
|
||||
|
||||
assert environment["VSCMD_ARG_TGT_ARCH"] == "arm64"
|
||||
assert target_platform == "win-arm64"
|
||||
|
||||
|
||||
def test_env_set(tmp_path: Path):
|
||||
arch = "32"
|
||||
environment = {"VSCMD_ARG_TGT_ARCH": "x64"}
|
||||
|
||||
configuration = PythonConfiguration("irrelevant", arch, "irrelevant", None)
|
||||
|
||||
with pytest.raises(FatalError, match="VSCMD_ARG_TGT_ARCH"):
|
||||
setup_setuptools_cross_compile(tmp_path, configuration, tmp_path, environment)
|
||||
|
||||
|
||||
def test_env_blank(tmp_path: Path, monkeypatch: pytest.MonkeyPatch):
|
||||
arch = "32"
|
||||
environment = {"VSCMD_ARG_TGT_ARCH": ""}
|
||||
|
||||
configuration = PythonConfiguration("irrelevant", arch, "irrelevant", None)
|
||||
|
||||
setup_setuptools_cross_compile(tmp_path, configuration, tmp_path, environment)
|
||||
with patched_environment(monkeypatch, environment):
|
||||
target_platform = setuptools._distutils.util.get_platform()
|
||||
|
||||
assert environment["VSCMD_ARG_TGT_ARCH"] == "x86"
|
||||
assert target_platform == "win32"
|
||||
@@ -71,9 +71,10 @@ def test_linux_container_split(tmp_path: Path, monkeypatch):
|
||||
"cp36-manylinux_x86_64",
|
||||
"cp311-manylinux_x86_64",
|
||||
"cp312-manylinux_x86_64",
|
||||
"cp313-manylinux_x86_64",
|
||||
]
|
||||
assert before_alls(build_steps[0]) == [""] * 3
|
||||
assert container_engines(build_steps[0]) == [default_container_engine] * 3
|
||||
assert before_alls(build_steps[0]) == [""] * 4
|
||||
assert container_engines(build_steps[0]) == [default_container_engine] * 4
|
||||
|
||||
assert build_steps[1].container_image == "other_container_image"
|
||||
assert identifiers(build_steps[1]) == ["cp37-manylinux_x86_64", "cp38-manylinux_x86_64"]
|
||||
|
||||
@@ -21,6 +21,7 @@ ALL_IDS = {
|
||||
"cp310",
|
||||
"cp311",
|
||||
"cp312",
|
||||
"cp313",
|
||||
"pp37",
|
||||
"pp38",
|
||||
"pp39",
|
||||
@@ -155,7 +156,8 @@ before-all = "true"
|
||||
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
||||
assert identifiers == {
|
||||
f"{x}-manylinux_x86_64"
|
||||
for x in ALL_IDS - {"cp36", "cp310", "cp311", "cp312", "pp37", "pp38", "pp39", "pp310"}
|
||||
for x in ALL_IDS
|
||||
- {"cp36", "cp310", "cp311", "cp312", "cp313", "pp37", "pp38", "pp39", "pp310"}
|
||||
}
|
||||
assert kwargs["options"].build_options("cp37-manylinux_x86_64").before_all == ""
|
||||
|
||||
@@ -166,7 +168,7 @@ before-all = "true"
|
||||
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
||||
assert identifiers == {
|
||||
f"{x}-manylinux_x86_64"
|
||||
for x in ["cp310", "cp311", "cp312", "pp37", "pp38", "pp39", "pp310"]
|
||||
for x in ["cp310", "cp311", "cp312", "cp313", "pp37", "pp38", "pp39", "pp310"]
|
||||
}
|
||||
|
||||
kwargs = build_in_container.call_args_list[3][1]
|
||||
|
||||
Reference in New Issue
Block a user