Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7da7df1efc | ||
|
|
9deb1b6794 | ||
|
|
271c5fe6e4 | ||
|
|
c716cfaeb8 | ||
|
|
099d397aee | ||
|
|
72222654f4 | ||
|
|
7a8b8012ff | ||
|
|
0ccf1dc016 | ||
|
|
ba11212a13 | ||
|
|
6d0890e7e0 | ||
|
|
cf7586ce7e | ||
|
|
137dc1a2cf | ||
|
|
1646b08659 | ||
|
|
a873dd9cbf | ||
|
|
e8ba0d49ed | ||
|
|
f0feaffbaa | ||
|
|
80a54b0226 | ||
|
|
76dba0b9ba | ||
|
|
0954ffaa65 | ||
|
|
753cbd1ca5 | ||
|
|
825d89818a | ||
|
|
f5e60d647f | ||
|
|
adc991c47b | ||
|
|
cc50337ecd | ||
|
|
db6d3095b9 | ||
|
|
f6a95d3d0b | ||
|
|
028455f481 | ||
|
|
05d5c9bada | ||
|
|
f34ae7731d | ||
|
|
4f888e27c3 | ||
|
|
e5d0cc0b0d | ||
|
|
a449142802 | ||
|
|
82a1f99268 | ||
|
|
1280565f7f | ||
|
|
386d36f5ad | ||
|
|
be0e07ac31 | ||
|
|
001f11c755 | ||
|
|
5f37a3bb02 | ||
|
|
5311f88684 | ||
|
|
81ef5fac43 | ||
|
|
53b641caaf | ||
|
|
ae6b3d40b5 | ||
|
|
061ea627e2 | ||
|
|
297e4a6099 | ||
|
|
e8bb208374 | ||
|
|
18ff2c57c2 | ||
|
|
98b83afe63 | ||
|
|
25428deff2 | ||
|
|
ce71f445de | ||
|
|
12d548865f | ||
|
|
9afd31017a | ||
|
|
7508943e06 | ||
|
|
26c5e18e62 | ||
|
|
c655dbdaab | ||
|
|
39a63b5912 | ||
|
|
47e5d3c2cd | ||
|
|
a63e11a1c4 | ||
|
|
df94b5db67 | ||
|
|
8946bfb2e8 | ||
|
|
36049d86a2 | ||
|
|
229f8570b4 | ||
|
|
5b32ee7d7b | ||
|
|
3f3bd9cff6 | ||
|
|
8df6d59adf | ||
|
|
4135c0a01d | ||
|
|
6282bc5a83 | ||
|
|
ddbcf561db | ||
|
|
f5960020cd | ||
|
|
c824c7e87a |
@@ -1,3 +1,5 @@
|
|||||||
|
skip: changesIncludeOnly('docs/*', '.pre-commit-config.yaml')
|
||||||
|
|
||||||
run_tests: &RUN_TESTS
|
run_tests: &RUN_TESTS
|
||||||
install_cibuildwheel_script:
|
install_cibuildwheel_script:
|
||||||
- python -m pip install -e ".[dev]" pytest-custom-exit-code
|
- python -m pip install -e ".[dev]" pytest-custom-exit-code
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
* text=auto
|
||||||
|
|
||||||
|
*.py diff=python
|
||||||
|
*.md diff=markdown
|
||||||
|
|
||||||
|
*.svg -diff
|
||||||
@@ -11,7 +11,7 @@ jobs:
|
|||||||
dist:
|
dist:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build SDist and wheel
|
- name: Build SDist and wheel
|
||||||
run: pipx run build
|
run: pipx run build
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
|
- .pre-commit-config.yaml
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
# allow manual runs on branches without a PR
|
# allow manual runs on branches without a PR
|
||||||
|
|
||||||
@@ -19,7 +20,7 @@ jobs:
|
|||||||
name: Linters (mypy, flake8, etc.)
|
name: Linters (mypy, flake8, etc.)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.x"
|
python-version: "3.x"
|
||||||
@@ -44,7 +45,7 @@ jobs:
|
|||||||
python_version: '3.8'
|
python_version: '3.8'
|
||||||
timeout-minutes: 180
|
timeout-minutes: 180
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
name: Install Python ${{ matrix.python_version }}
|
name: Install Python ${{ matrix.python_version }}
|
||||||
with:
|
with:
|
||||||
@@ -61,6 +62,13 @@ jobs:
|
|||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get -y install podman
|
sudo apt-get -y install podman
|
||||||
|
|
||||||
|
# free some space to prevent reaching GHA disk space limits
|
||||||
|
- name: Clean docker images
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
run: |
|
||||||
|
docker system prune -a -f
|
||||||
|
df -h
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install ".[test]"
|
python -m pip install ".[test]"
|
||||||
@@ -92,7 +100,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 180
|
timeout-minutes: 180
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.x"
|
python-version: "3.x"
|
||||||
@@ -102,7 +110,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
id: qemu
|
id: qemu
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v3
|
||||||
with:
|
with:
|
||||||
platforms: all
|
platforms: all
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ jobs:
|
|||||||
if: github.repository_owner == 'pypa' || github.event_name != 'schedule'
|
if: github.repository_owner == 'pypa' || github.event_name != 'schedule'
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: wntrblm/nox@2023.04.22
|
- uses: wntrblm/nox@2023.04.22
|
||||||
with:
|
with:
|
||||||
@@ -35,7 +35,7 @@ jobs:
|
|||||||
|
|
||||||
# we use this step to grab a Github App auth token, so that PRs generated by this workflow
|
# we use this step to grab a Github App auth token, so that PRs generated by this workflow
|
||||||
# run the GHA tests.
|
# run the GHA tests.
|
||||||
- uses: tibdex/github-app-token@v1
|
- uses: tibdex/github-app-token@v2
|
||||||
id: generate-token
|
id: generate-token
|
||||||
if: github.ref == 'refs/heads/main' && github.repository == 'pypa/cibuildwheel'
|
if: github.ref == 'refs/heads/main' && github.repository == 'pypa/cibuildwheel'
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Update the ${{ env.TAG_NAME }} tag
|
- name: Update the ${{ env.TAG_NAME }} tag
|
||||||
id: update-major-minor-tag
|
id: update-major-minor-tag
|
||||||
|
|||||||
@@ -13,13 +13,13 @@ repos:
|
|||||||
- id: mixed-line-ending
|
- id: mixed-line-ending
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
|
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black-pre-commit-mirror
|
||||||
rev: 23.3.0
|
rev: 23.9.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
|
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: v0.0.276
|
rev: v0.0.291
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff
|
- id: ruff
|
||||||
args: ["--fix", "--show-fixes"]
|
args: ["--fix", "--show-fixes"]
|
||||||
@@ -31,7 +31,7 @@ repos:
|
|||||||
args: [--include-version-classifiers, --min-py-version=3.8, --max-py-version=3.11]
|
args: [--include-version-classifiers, --min-py-version=3.8, --max-py-version=3.11]
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||||
rev: v1.4.1
|
rev: v1.5.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: mypy
|
- id: mypy
|
||||||
name: mypy 3.8 on cibuildwheel/
|
name: mypy 3.8 on cibuildwheel/
|
||||||
|
|||||||
+7
-3
@@ -2,13 +2,17 @@
|
|||||||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
||||||
version: 2
|
version: 2
|
||||||
|
|
||||||
mkdocs:
|
build:
|
||||||
configuration: mkdocs.yml
|
os: ubuntu-22.04
|
||||||
|
tools:
|
||||||
|
python: "3.11"
|
||||||
|
|
||||||
python:
|
python:
|
||||||
version: 3.8
|
|
||||||
install:
|
install:
|
||||||
- method: pip
|
- method: pip
|
||||||
path: .
|
path: .
|
||||||
extra_requirements:
|
extra_requirements:
|
||||||
- docs
|
- docs
|
||||||
|
|
||||||
|
mkdocs:
|
||||||
|
configuration: mkdocs.yml
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ What does it do?
|
|||||||
<sup>² Windows arm64 support is experimental.</sup><br>
|
<sup>² Windows arm64 support is experimental.</sup><br>
|
||||||
<sup>³ Alpine 3.14 and very briefly 3.15's default python3 [was not able to load](https://github.com/pypa/cibuildwheel/issues/934) musllinux wheels. This has been fixed; please upgrade the python package if using Alpine from before the fix.</sup><br>
|
<sup>³ Alpine 3.14 and very briefly 3.15's default python3 [was not able to load](https://github.com/pypa/cibuildwheel/issues/934) musllinux wheels. This has been fixed; please upgrade the python package if using Alpine from before the fix.</sup><br>
|
||||||
<sup>⁴ Cross-compilation not supported with PyPy - to build these wheels you need to run cibuildwheel on an Apple Silicon machine.</sup><br>
|
<sup>⁴ Cross-compilation not supported with PyPy - to build these wheels you need to run cibuildwheel on an Apple Silicon machine.</sup><br>
|
||||||
<sup>⁵ CPython 3.12 is available using the [CIBW_PRERELEASE_PYTHONS](https://cibuildwheel.readthedocs.io/en/stable/options/#prerelease-pythons) option.</sup><br>
|
<sup>⁵ CPython 3.12 is built by default using Python RCs, starting with cibuildwheel 2.15.</sup><br>
|
||||||
|
|
||||||
- Builds manylinux, musllinux, macOS 10.9+, and Windows wheels for CPython and PyPy
|
- Builds manylinux, musllinux, macOS 10.9+, and Windows wheels for CPython and PyPy
|
||||||
- Works on GitHub Actions, Azure Pipelines, Travis CI, AppVeyor, CircleCI, GitLab CI, and Cirrus CI
|
- Works on GitHub Actions, Azure Pipelines, Travis CI, AppVeyor, CircleCI, GitLab CI, and Cirrus CI
|
||||||
@@ -91,13 +91,13 @@ jobs:
|
|||||||
os: [ubuntu-20.04, windows-2019, macOS-11]
|
os: [ubuntu-20.04, windows-2019, macOS-11]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
# Used to host cibuildwheel
|
# Used to host cibuildwheel
|
||||||
- uses: actions/setup-python@v3
|
- uses: actions/setup-python@v3
|
||||||
|
|
||||||
- name: Install cibuildwheel
|
- name: Install cibuildwheel
|
||||||
run: python -m pip install cibuildwheel==2.14.1
|
run: python -m pip install cibuildwheel==2.16.1
|
||||||
|
|
||||||
- name: Build wheels
|
- name: Build wheels
|
||||||
run: python -m cibuildwheel --output-dir wheelhouse
|
run: python -m cibuildwheel --output-dir wheelhouse
|
||||||
@@ -163,12 +163,12 @@ Here are some repos that use cibuildwheel.
|
|||||||
| [scikit-learn][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The machine learning library. A complex but clean config using many of cibuildwheel's features to build a large project with Cython and C++ extensions. |
|
| [scikit-learn][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The machine learning library. A complex but clean config using many of cibuildwheel's features to build a large project with Cython and C++ extensions. |
|
||||||
| [pytorch-fairseq][] | ![github icon][] | ![apple icon][] ![linux icon][] | Facebook AI Research Sequence-to-Sequence Toolkit written in Python. |
|
| [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. |
|
| [NumPy][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The fundamental package for scientific computing with Python. |
|
||||||
| [Tornado][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. |
|
| [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 |
|
| [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 |
|
| [NCNN][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | ncnn is a high-performance neural network inference framework optimized for the mobile platform |
|
||||||
|
| [MyPy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | The compiled version of MyPy using MyPyC. |
|
||||||
| [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. |
|
| [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. |
|
||||||
| [Kivy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Open source UI framework written in Python, running on Windows, Linux, macOS, Android and iOS |
|
| [Kivy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Open source UI framework written in Python, running on Windows, Linux, macOS, Android and iOS |
|
||||||
| [MyPy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | The compiled version of MyPy using MyPyC. |
|
|
||||||
| [duckdb][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | DuckDB is an in-process SQL OLAP Database Management System |
|
| [duckdb][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | DuckDB is an in-process SQL OLAP Database Management System |
|
||||||
|
|
||||||
[scikit-learn]: https://github.com/scikit-learn/scikit-learn
|
[scikit-learn]: https://github.com/scikit-learn/scikit-learn
|
||||||
@@ -177,9 +177,9 @@ Here are some repos that use cibuildwheel.
|
|||||||
[Tornado]: https://github.com/tornadoweb/tornado
|
[Tornado]: https://github.com/tornadoweb/tornado
|
||||||
[Matplotlib]: https://github.com/matplotlib/matplotlib
|
[Matplotlib]: https://github.com/matplotlib/matplotlib
|
||||||
[NCNN]: https://github.com/Tencent/ncnn
|
[NCNN]: https://github.com/Tencent/ncnn
|
||||||
|
[MyPy]: https://github.com/mypyc/mypy_mypyc-wheels
|
||||||
[Prophet]: https://github.com/facebook/prophet
|
[Prophet]: https://github.com/facebook/prophet
|
||||||
[Kivy]: https://github.com/kivy/kivy
|
[Kivy]: https://github.com/kivy/kivy
|
||||||
[MyPy]: https://github.com/mypyc/mypy_mypyc-wheels
|
|
||||||
[duckdb]: https://github.com/duckdb/duckdb
|
[duckdb]: https://github.com/duckdb/duckdb
|
||||||
|
|
||||||
[appveyor icon]: docs/data/readme_icons/appveyor.svg
|
[appveyor icon]: docs/data/readme_icons/appveyor.svg
|
||||||
@@ -213,6 +213,32 @@ Changelog
|
|||||||
|
|
||||||
<!-- this section was generated by bin/update_readme_changelog.py -- do not edit manually -->
|
<!-- this section was generated by bin/update_readme_changelog.py -- do not edit manually -->
|
||||||
|
|
||||||
|
### v2.16.1
|
||||||
|
|
||||||
|
_26 September 2023_
|
||||||
|
|
||||||
|
- 🛠 Updates the prerelease CPython 3.12 version to 3.12.0rc3 (#1625)
|
||||||
|
- 🛠 Only calls `linux32` in containers when necessary (#1599)
|
||||||
|
|
||||||
|
### v2.16.0
|
||||||
|
|
||||||
|
_18 September 2023_
|
||||||
|
|
||||||
|
- ✨ Add the ability to pass additional flags to a build frontend through the [CIBW_BUILD_FRONTEND](https://cibuildwheel.readthedocs.io/en/stable/options/#build-frontend) option (#1588).
|
||||||
|
- ✨ The environment variable SOURCE_DATE_EPOCH is now automatically passed through to container Linux builds (useful for [reproducible builds](https://reproducible-builds.org/docs/source-date-epoch/)!) (#1589)
|
||||||
|
- 🛠 Updates the prerelease CPython 3.12 version to 3.12.0rc2 (#1604)
|
||||||
|
- 🐛 Fix `requires_python` auto-detection from setup.py when the call to `setup()` is within an `if __name__ == "__main__" block (#1613)
|
||||||
|
- 🐛 Fix a bug that prevented building Linux wheels in Docker on a Windows host (#1573)
|
||||||
|
- 🐛 `--only` can now select prerelease-pythons (#1564)
|
||||||
|
- 📚 Docs & examples updates (#1582, #1593, #1598, #1615)
|
||||||
|
|
||||||
|
### v2.15.0
|
||||||
|
|
||||||
|
_8 August 2023_
|
||||||
|
|
||||||
|
- 🌟 CPython 3.12 wheels are now built by default - without the CIBW_PRERELEASE_PYTHONS flag. It's time to build and upload these wheels to PyPI! This release includes CPython 3.12.0rc1, which is guaranteed to be ABI compatible with the final release. (#1565)
|
||||||
|
- ✨ Adds musllinux_1_2 support - this allows packagers to build for musl-based Linux distributions on a more recent Alpine image, and a newer musl libc. (#1561)
|
||||||
|
|
||||||
### v2.14.1
|
### v2.14.1
|
||||||
|
|
||||||
_15 July 2023_
|
_15 July 2023_
|
||||||
@@ -229,29 +255,6 @@ _10 July 2023_
|
|||||||
- 📚 Docs & examples updates (#1532, #1416)
|
- 📚 Docs & examples updates (#1532, #1416)
|
||||||
- ⚠️ Removed support for running cibuildwheel in Python 3.7. Python 3.7 is EOL. However, cibuildwheel continues to build Python 3.7 wheels for the moment. (#1175)
|
- ⚠️ Removed support for running cibuildwheel in Python 3.7. Python 3.7 is EOL. However, cibuildwheel continues to build Python 3.7 wheels for the moment. (#1175)
|
||||||
|
|
||||||
### v2.13.1
|
|
||||||
|
|
||||||
_10 June 2023_
|
|
||||||
|
|
||||||
- 🛠 Updates the prerelease CPython 3.12 version to 3.12.0b2. (#1516)
|
|
||||||
- 🛠 Adds a moving `v<major>.<minor>` tag for use in GitHub Actions workflow files. If you use this, you'll get the latest patch release within a minor version. Additionally, Dependabot won't send you PRs for patch releases. (#1517)
|
|
||||||
|
|
||||||
### v2.13.0
|
|
||||||
|
|
||||||
_28 May 2023_
|
|
||||||
|
|
||||||
- ✨ Adds CPython 3.12 support, under the prerelease flag [CIBW_PRERELEASE_PYTHONS](https://cibuildwheel.readthedocs.io/en/stable/options/#prerelease-pythons). This version of cibuildwheel uses 3.12.0b1.
|
|
||||||
|
|
||||||
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.12 will be available in cibuildwheel without the flag. (#1507)
|
|
||||||
|
|
||||||
- ✨ Adds the ability to pass arguments to the container engine when the container is created, using the [CIBW_CONTAINER_ENGINE](https://cibuildwheel.readthedocs.io/en/stable/options/#container-engine) option. (#1499)
|
|
||||||
|
|
||||||
### v2.12.3
|
|
||||||
|
|
||||||
_19 April 2023_
|
|
||||||
|
|
||||||
- 🐛 Fix an import error when running on Python 3.7. (#1479)
|
|
||||||
|
|
||||||
<!-- END bin/update_readme_changelog.py -->
|
<!-- END bin/update_readme_changelog.py -->
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
pr:
|
||||||
|
paths:
|
||||||
|
exclude:
|
||||||
|
- docs/*
|
||||||
|
- .pre-commit-config.yaml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- job: linux_38
|
- job: linux_38
|
||||||
timeoutInMinutes: 120
|
timeoutInMinutes: 120
|
||||||
|
|||||||
+3
-2
@@ -60,7 +60,7 @@ def bump_version() -> None:
|
|||||||
print(e)
|
print(e)
|
||||||
print("Failed to get previous version tag information.")
|
print("Failed to get previous version tag information.")
|
||||||
|
|
||||||
git_changes_result = subprocess.run(["git diff-index --quiet HEAD --"], shell=True)
|
git_changes_result = subprocess.run(["git diff-index --quiet HEAD --"], shell=True, check=False)
|
||||||
repo_has_uncommitted_changes = git_changes_result.returncode != 0
|
repo_has_uncommitted_changes = git_changes_result.returncode != 0
|
||||||
|
|
||||||
if repo_has_uncommitted_changes:
|
if repo_has_uncommitted_changes:
|
||||||
@@ -142,7 +142,8 @@ def bump_version() -> None:
|
|||||||
"pre-commit",
|
"pre-commit",
|
||||||
"run",
|
"run",
|
||||||
"--files=docs/changelog.md",
|
"--files=docs/changelog.md",
|
||||||
]
|
],
|
||||||
|
check=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
# run pre-commit to check that no errors occurred on the second run
|
# run pre-commit to check that no errors occurred on the second run
|
||||||
|
|||||||
@@ -12,13 +12,13 @@ from subprocess import run
|
|||||||
import click
|
import click
|
||||||
|
|
||||||
|
|
||||||
def shell(cmd, **kwargs):
|
def shell(cmd, *, check: bool, **kwargs):
|
||||||
return run([cmd], shell=True, **kwargs)
|
return run([cmd], shell=True, check=check, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def git_repo_has_changes():
|
def git_repo_has_changes():
|
||||||
unstaged_changes = shell("git diff-index --quiet HEAD --").returncode != 0
|
unstaged_changes = shell("git diff-index --quiet HEAD --", check=False).returncode != 0
|
||||||
staged_changes = shell("git diff-index --quiet --cached HEAD --").returncode != 0
|
staged_changes = shell("git diff-index --quiet --cached HEAD --", check=False).returncode != 0
|
||||||
return unstaged_changes or staged_changes
|
return unstaged_changes or staged_changes
|
||||||
|
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ def main():
|
|||||||
print("Done.")
|
print("Done.")
|
||||||
finally:
|
finally:
|
||||||
# remove any local changes
|
# remove any local changes
|
||||||
shell("git checkout -- .")
|
shell("git checkout -- .", check=True)
|
||||||
shell(f"git checkout {previous_branch}", check=True)
|
shell(f"git checkout {previous_branch}", check=True)
|
||||||
shell(f"git branch -D --force {branch_name}", check=True)
|
shell(f"git branch -D --force {branch_name}", check=True)
|
||||||
|
|
||||||
|
|||||||
@@ -16,13 +16,13 @@ from urllib.parse import quote
|
|||||||
import click
|
import click
|
||||||
|
|
||||||
|
|
||||||
def shell(cmd, **kwargs):
|
def shell(cmd, *, check: bool, **kwargs):
|
||||||
return run([cmd], shell=True, **kwargs)
|
return run([cmd], shell=True, check=check, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def git_repo_has_changes():
|
def git_repo_has_changes():
|
||||||
unstaged_changes = shell("git diff-index --quiet HEAD --").returncode != 0
|
unstaged_changes = shell("git diff-index --quiet HEAD --", check=False).returncode != 0
|
||||||
staged_changes = shell("git diff-index --quiet --cached HEAD --").returncode != 0
|
staged_changes = shell("git diff-index --quiet --cached HEAD --", check=False).returncode != 0
|
||||||
return unstaged_changes or staged_changes
|
return unstaged_changes or staged_changes
|
||||||
|
|
||||||
|
|
||||||
@@ -163,7 +163,7 @@ def run_example_ci_configs(config_files=None):
|
|||||||
finally:
|
finally:
|
||||||
# remove any local changes
|
# remove any local changes
|
||||||
shutil.rmtree(example_project, ignore_errors=True)
|
shutil.rmtree(example_project, ignore_errors=True)
|
||||||
shell("git checkout -- .")
|
shell("git checkout -- .", check=True)
|
||||||
shell(f"git checkout {previous_branch}", check=True)
|
shell(f"git checkout {previous_branch}", check=True)
|
||||||
shell(f"git branch -D --force {branch_name}", check=True)
|
shell(f"git branch -D --force {branch_name}", check=True)
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -24,4 +24,8 @@ if __name__ == "__main__":
|
|||||||
check=True,
|
check=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
sys.exit(subprocess.run([sys.executable, "-m", "cibuildwheel"], cwd=project_dir).returncode)
|
sys.exit(
|
||||||
|
subprocess.run(
|
||||||
|
[sys.executable, "-m", "cibuildwheel"], cwd=project_dir, check=False
|
||||||
|
).returncode
|
||||||
|
)
|
||||||
|
|||||||
@@ -59,6 +59,12 @@ images = [
|
|||||||
Image("musllinux_1_1", "aarch64", "quay.io/pypa/musllinux_1_1_aarch64", None),
|
Image("musllinux_1_1", "aarch64", "quay.io/pypa/musllinux_1_1_aarch64", None),
|
||||||
Image("musllinux_1_1", "ppc64le", "quay.io/pypa/musllinux_1_1_ppc64le", None),
|
Image("musllinux_1_1", "ppc64le", "quay.io/pypa/musllinux_1_1_ppc64le", None),
|
||||||
Image("musllinux_1_1", "s390x", "quay.io/pypa/musllinux_1_1_s390x", None),
|
Image("musllinux_1_1", "s390x", "quay.io/pypa/musllinux_1_1_s390x", None),
|
||||||
|
# musllinux_1_2 images
|
||||||
|
Image("musllinux_1_2", "x86_64", "quay.io/pypa/musllinux_1_2_x86_64", None),
|
||||||
|
Image("musllinux_1_2", "i686", "quay.io/pypa/musllinux_1_2_i686", None),
|
||||||
|
Image("musllinux_1_2", "aarch64", "quay.io/pypa/musllinux_1_2_aarch64", None),
|
||||||
|
Image("musllinux_1_2", "ppc64le", "quay.io/pypa/musllinux_1_2_ppc64le", None),
|
||||||
|
Image("musllinux_1_2", "s390x", "quay.io/pypa/musllinux_1_2_s390x", None),
|
||||||
]
|
]
|
||||||
|
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ except ImportError:
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
subprocess.run(["mkdocs", "build"])
|
subprocess.run(["mkdocs", "build"], check=True)
|
||||||
|
|
||||||
hti = Html2Image(custom_flags=["--force-device-scale-factor=2"])
|
hti = Html2Image(custom_flags=["--force-device-scale-factor=2"])
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
__version__ = "2.14.1"
|
__version__ = "2.16.1"
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ from __future__ import annotations
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
if sys.version_info >= (3, 11):
|
if sys.version_info >= (3, 11):
|
||||||
from tomllib import load # noqa: TID251
|
from tomllib import load
|
||||||
else:
|
else:
|
||||||
from tomli import load # noqa: TID251
|
from tomli import load
|
||||||
|
|
||||||
__all__ = ("load",)
|
__all__ = ("load",)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import sys
|
|||||||
if sys.version_info < (3, 11):
|
if sys.version_info < (3, 11):
|
||||||
from typing_extensions import NotRequired, assert_never
|
from typing_extensions import NotRequired, assert_never
|
||||||
else:
|
else:
|
||||||
from typing import NotRequired, assert_never # noqa: TID251
|
from typing import NotRequired, assert_never
|
||||||
|
|
||||||
__all__ = (
|
__all__ = (
|
||||||
"assert_never",
|
"assert_never",
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ from .options import Options
|
|||||||
from .typing import PathOrStr
|
from .typing import PathOrStr
|
||||||
from .util import (
|
from .util import (
|
||||||
AlreadyBuiltWheelError,
|
AlreadyBuiltWheelError,
|
||||||
|
BuildFrontendConfig,
|
||||||
BuildSelector,
|
BuildSelector,
|
||||||
NonPlatformWheelError,
|
NonPlatformWheelError,
|
||||||
build_frontend_or_default,
|
|
||||||
find_compatible_wheel,
|
find_compatible_wheel,
|
||||||
get_build_verbosity_extra_flags,
|
get_build_verbosity_extra_flags,
|
||||||
prepare_command,
|
prepare_command,
|
||||||
@@ -177,7 +177,7 @@ def build_in_container(
|
|||||||
for config in platform_configs:
|
for config in platform_configs:
|
||||||
log.build_start(config.identifier)
|
log.build_start(config.identifier)
|
||||||
build_options = options.build_options(config.identifier)
|
build_options = options.build_options(config.identifier)
|
||||||
build_frontend = build_frontend_or_default(build_options.build_frontend)
|
build_frontend = build_options.build_frontend or BuildFrontendConfig("pip")
|
||||||
|
|
||||||
dependency_constraint_flags: list[PathOrStr] = []
|
dependency_constraint_flags: list[PathOrStr] = []
|
||||||
|
|
||||||
@@ -185,7 +185,7 @@ def build_in_container(
|
|||||||
constraints_file = build_options.dependency_constraints.get_for_python_version(
|
constraints_file = build_options.dependency_constraints.get_for_python_version(
|
||||||
config.version
|
config.version
|
||||||
)
|
)
|
||||||
container_constraints_file = PurePath("/constraints.txt")
|
container_constraints_file = PurePosixPath("/constraints.txt")
|
||||||
|
|
||||||
container.copy_into(constraints_file, container_constraints_file)
|
container.copy_into(constraints_file, container_constraints_file)
|
||||||
dependency_constraint_flags = ["-c", container_constraints_file]
|
dependency_constraint_flags = ["-c", container_constraints_file]
|
||||||
@@ -243,9 +243,10 @@ def build_in_container(
|
|||||||
container.call(["rm", "-rf", built_wheel_dir])
|
container.call(["rm", "-rf", built_wheel_dir])
|
||||||
container.call(["mkdir", "-p", built_wheel_dir])
|
container.call(["mkdir", "-p", built_wheel_dir])
|
||||||
|
|
||||||
extra_flags = split_config_settings(build_options.config_settings, build_frontend)
|
extra_flags = split_config_settings(build_options.config_settings, build_frontend.name)
|
||||||
|
extra_flags += build_frontend.args
|
||||||
|
|
||||||
if build_frontend == "pip":
|
if build_frontend.name == "pip":
|
||||||
extra_flags += get_build_verbosity_extra_flags(build_options.build_verbosity)
|
extra_flags += get_build_verbosity_extra_flags(build_options.build_verbosity)
|
||||||
container.call(
|
container.call(
|
||||||
[
|
[
|
||||||
@@ -260,7 +261,7 @@ def build_in_container(
|
|||||||
],
|
],
|
||||||
env=env,
|
env=env,
|
||||||
)
|
)
|
||||||
elif build_frontend == "build":
|
elif build_frontend.name == "build":
|
||||||
if not 0 <= build_options.build_verbosity < 2:
|
if not 0 <= build_options.build_verbosity < 2:
|
||||||
msg = f"build_verbosity {build_options.build_verbosity} is not supported for build frontend. Ignoring."
|
msg = f"build_verbosity {build_options.build_verbosity} is not supported for build frontend. Ignoring."
|
||||||
log.warning(msg)
|
log.warning(msg)
|
||||||
@@ -422,7 +423,7 @@ def build(options: Options, tmp_path: Path) -> None: # noqa: ARG001
|
|||||||
|
|
||||||
with OCIContainer(
|
with OCIContainer(
|
||||||
image=build_step.container_image,
|
image=build_step.container_image,
|
||||||
simulate_32_bit=build_step.platform_tag.endswith("i686"),
|
enforce_32_bit=build_step.platform_tag.endswith("i686"),
|
||||||
cwd=container_project_path,
|
cwd=container_project_path,
|
||||||
engine=options.globals.container_engine,
|
engine=options.globals.container_engine,
|
||||||
) as container:
|
) as container:
|
||||||
|
|||||||
+11
-8
@@ -25,10 +25,10 @@ from .typing import PathOrStr
|
|||||||
from .util import (
|
from .util import (
|
||||||
CIBW_CACHE_PATH,
|
CIBW_CACHE_PATH,
|
||||||
AlreadyBuiltWheelError,
|
AlreadyBuiltWheelError,
|
||||||
BuildFrontend,
|
BuildFrontendConfig,
|
||||||
|
BuildFrontendName,
|
||||||
BuildSelector,
|
BuildSelector,
|
||||||
NonPlatformWheelError,
|
NonPlatformWheelError,
|
||||||
build_frontend_or_default,
|
|
||||||
call,
|
call,
|
||||||
detect_ci_provider,
|
detect_ci_provider,
|
||||||
download,
|
download,
|
||||||
@@ -165,7 +165,7 @@ def setup_python(
|
|||||||
python_configuration: PythonConfiguration,
|
python_configuration: PythonConfiguration,
|
||||||
dependency_constraint_flags: Sequence[PathOrStr],
|
dependency_constraint_flags: Sequence[PathOrStr],
|
||||||
environment: ParsedEnvironment,
|
environment: ParsedEnvironment,
|
||||||
build_frontend: BuildFrontend,
|
build_frontend: BuildFrontendName,
|
||||||
) -> dict[str, str]:
|
) -> dict[str, str]:
|
||||||
tmp.mkdir()
|
tmp.mkdir()
|
||||||
implementation_id = python_configuration.identifier.split("-")[0]
|
implementation_id = python_configuration.identifier.split("-")[0]
|
||||||
@@ -334,7 +334,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
|||||||
|
|
||||||
for config in python_configurations:
|
for config in python_configurations:
|
||||||
build_options = options.build_options(config.identifier)
|
build_options = options.build_options(config.identifier)
|
||||||
build_frontend = build_frontend_or_default(build_options.build_frontend)
|
build_frontend = build_options.build_frontend or BuildFrontendConfig("pip")
|
||||||
log.build_start(config.identifier)
|
log.build_start(config.identifier)
|
||||||
|
|
||||||
identifier_tmp_dir = tmp_path / config.identifier
|
identifier_tmp_dir = tmp_path / config.identifier
|
||||||
@@ -357,7 +357,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
|||||||
config,
|
config,
|
||||||
dependency_constraint_flags,
|
dependency_constraint_flags,
|
||||||
build_options.environment,
|
build_options.environment,
|
||||||
build_frontend,
|
build_frontend.name,
|
||||||
)
|
)
|
||||||
|
|
||||||
compatible_wheel = find_compatible_wheel(built_wheels, config.identifier)
|
compatible_wheel = find_compatible_wheel(built_wheels, config.identifier)
|
||||||
@@ -378,9 +378,12 @@ def build(options: Options, tmp_path: Path) -> None:
|
|||||||
log.step("Building wheel...")
|
log.step("Building wheel...")
|
||||||
built_wheel_dir.mkdir()
|
built_wheel_dir.mkdir()
|
||||||
|
|
||||||
extra_flags = split_config_settings(build_options.config_settings, build_frontend)
|
extra_flags = split_config_settings(
|
||||||
|
build_options.config_settings, build_frontend.name
|
||||||
|
)
|
||||||
|
extra_flags += build_frontend.args
|
||||||
|
|
||||||
if build_frontend == "pip":
|
if build_frontend.name == "pip":
|
||||||
extra_flags += get_build_verbosity_extra_flags(build_options.build_verbosity)
|
extra_flags += get_build_verbosity_extra_flags(build_options.build_verbosity)
|
||||||
# Path.resolve() is needed. Without it pip wheel may try to fetch package from pypi.org
|
# Path.resolve() is needed. Without it pip wheel may try to fetch package from pypi.org
|
||||||
# see https://github.com/pypa/cibuildwheel/pull/369
|
# see https://github.com/pypa/cibuildwheel/pull/369
|
||||||
@@ -395,7 +398,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
|||||||
*extra_flags,
|
*extra_flags,
|
||||||
env=env,
|
env=env,
|
||||||
)
|
)
|
||||||
elif build_frontend == "build":
|
elif build_frontend.name == "build":
|
||||||
if not 0 <= build_options.build_verbosity < 2:
|
if not 0 <= build_options.build_verbosity < 2:
|
||||||
msg = f"build_verbosity {build_options.build_verbosity} is not supported for build frontend. Ignoring."
|
msg = f"build_verbosity {build_options.build_verbosity} is not supported for build frontend. Ignoring."
|
||||||
log.warning(msg)
|
log.warning(msg)
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ from types import TracebackType
|
|||||||
from typing import IO, Dict, Literal
|
from typing import IO, Dict, Literal
|
||||||
|
|
||||||
from .typing import PathOrStr, PopenBytes
|
from .typing import PathOrStr, PopenBytes
|
||||||
from .util import CIProvider, detect_ci_provider, parse_key_value_string
|
from .util import CIProvider, call, detect_ci_provider, parse_key_value_string
|
||||||
|
|
||||||
ContainerEngineName = Literal["docker", "podman"]
|
ContainerEngineName = Literal["docker", "podman"]
|
||||||
|
|
||||||
@@ -29,7 +29,9 @@ class OCIContainerEngineConfig:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def from_config_string(config_string: str) -> OCIContainerEngineConfig:
|
def from_config_string(config_string: str) -> OCIContainerEngineConfig:
|
||||||
config_dict = parse_key_value_string(config_string, ["name"])
|
config_dict = parse_key_value_string(
|
||||||
|
config_string, ["name"], ["create_args", "create-args"]
|
||||||
|
)
|
||||||
name = " ".join(config_dict["name"])
|
name = " ".join(config_dict["name"])
|
||||||
if name not in {"docker", "podman"}:
|
if name not in {"docker", "podman"}:
|
||||||
msg = f"unknown container engine {name}"
|
msg = f"unknown container engine {name}"
|
||||||
@@ -83,7 +85,7 @@ class OCIContainer:
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
image: str,
|
image: str,
|
||||||
simulate_32_bit: bool = False,
|
enforce_32_bit: bool = False,
|
||||||
cwd: PathOrStr | None = None,
|
cwd: PathOrStr | None = None,
|
||||||
engine: OCIContainerEngineConfig = DEFAULT_ENGINE,
|
engine: OCIContainerEngineConfig = DEFAULT_ENGINE,
|
||||||
):
|
):
|
||||||
@@ -92,7 +94,7 @@ class OCIContainer:
|
|||||||
raise ValueError(msg)
|
raise ValueError(msg)
|
||||||
|
|
||||||
self.image = image
|
self.image = image
|
||||||
self.simulate_32_bit = simulate_32_bit
|
self.enforce_32_bit = enforce_32_bit
|
||||||
self.cwd = cwd
|
self.cwd = cwd
|
||||||
self.name: str | None = None
|
self.name: str | None = None
|
||||||
self.engine = engine
|
self.engine = engine
|
||||||
@@ -108,13 +110,24 @@ class OCIContainer:
|
|||||||
if detect_ci_provider() == CIProvider.travis_ci and platform.machine() == "ppc64le":
|
if detect_ci_provider() == CIProvider.travis_ci and platform.machine() == "ppc64le":
|
||||||
network_args = ["--network=host"]
|
network_args = ["--network=host"]
|
||||||
|
|
||||||
shell_args = ["linux32", "/bin/bash"] if self.simulate_32_bit else ["/bin/bash"]
|
simulate_32_bit = False
|
||||||
|
if self.enforce_32_bit:
|
||||||
|
# If the architecture running the image is already the right one
|
||||||
|
# or the image entrypoint takes care of enforcing this, then we don't need to
|
||||||
|
# simulate this
|
||||||
|
container_machine = call(
|
||||||
|
self.engine.name, "run", "--rm", self.image, "uname", "-m", capture_stdout=True
|
||||||
|
).strip()
|
||||||
|
simulate_32_bit = container_machine != "i686"
|
||||||
|
|
||||||
|
shell_args = ["linux32", "/bin/bash"] if simulate_32_bit else ["/bin/bash"]
|
||||||
|
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
[
|
[
|
||||||
self.engine.name,
|
self.engine.name,
|
||||||
"create",
|
"create",
|
||||||
"--env=CIBUILDWHEEL",
|
"--env=CIBUILDWHEEL",
|
||||||
|
"--env=SOURCE_DATE_EPOCH",
|
||||||
f"--name={self.name}",
|
f"--name={self.name}",
|
||||||
"--interactive",
|
"--interactive",
|
||||||
"--volume=/:/host", # ignored on CircleCI
|
"--volume=/:/host", # ignored on CircleCI
|
||||||
|
|||||||
+16
-13
@@ -27,7 +27,7 @@ from .typing import PLATFORMS, PlatformName
|
|||||||
from .util import (
|
from .util import (
|
||||||
MANYLINUX_ARCHS,
|
MANYLINUX_ARCHS,
|
||||||
MUSLLINUX_ARCHS,
|
MUSLLINUX_ARCHS,
|
||||||
BuildFrontend,
|
BuildFrontendConfig,
|
||||||
BuildSelector,
|
BuildSelector,
|
||||||
DependencyConstraints,
|
DependencyConstraints,
|
||||||
TestSelector,
|
TestSelector,
|
||||||
@@ -92,7 +92,7 @@ class BuildOptions:
|
|||||||
test_requires: list[str]
|
test_requires: list[str]
|
||||||
test_extras: str
|
test_extras: str
|
||||||
build_verbosity: int
|
build_verbosity: int
|
||||||
build_frontend: BuildFrontend | Literal["default"]
|
build_frontend: BuildFrontendConfig | None
|
||||||
config_settings: str
|
config_settings: str
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@@ -450,6 +450,7 @@ class Options:
|
|||||||
build_config = args.only
|
build_config = args.only
|
||||||
skip_config = ""
|
skip_config = ""
|
||||||
architectures = Architecture.all_archs(self.platform)
|
architectures = Architecture.all_archs(self.platform)
|
||||||
|
prerelease_pythons = True
|
||||||
|
|
||||||
build_selector = BuildSelector(
|
build_selector = BuildSelector(
|
||||||
build_config=build_config,
|
build_config=build_config,
|
||||||
@@ -487,7 +488,6 @@ class Options:
|
|||||||
with self.reader.identifier(identifier):
|
with self.reader.identifier(identifier):
|
||||||
before_all = self.reader.get("before-all", sep=" && ")
|
before_all = self.reader.get("before-all", sep=" && ")
|
||||||
|
|
||||||
build_frontend_str = self.reader.get("build-frontend", env_plat=False)
|
|
||||||
environment_config = self.reader.get(
|
environment_config = self.reader.get(
|
||||||
"environment", table={"item": '{k}="{v}"', "sep": " "}
|
"environment", table={"item": '{k}="{v}"', "sep": " "}
|
||||||
)
|
)
|
||||||
@@ -505,17 +505,20 @@ class Options:
|
|||||||
test_extras = self.reader.get("test-extras", sep=",")
|
test_extras = self.reader.get("test-extras", sep=",")
|
||||||
build_verbosity_str = self.reader.get("build-verbosity")
|
build_verbosity_str = self.reader.get("build-verbosity")
|
||||||
|
|
||||||
build_frontend: BuildFrontend | Literal["default"]
|
build_frontend_str = self.reader.get(
|
||||||
if build_frontend_str == "build":
|
"build-frontend",
|
||||||
build_frontend = "build"
|
env_plat=False,
|
||||||
elif build_frontend_str == "pip":
|
table={"item": "{k}:{v}", "sep": "; ", "quote": shlex.quote},
|
||||||
build_frontend = "pip"
|
)
|
||||||
elif build_frontend_str == "default":
|
build_frontend: BuildFrontendConfig | None
|
||||||
build_frontend = "default"
|
if not build_frontend_str or build_frontend_str == "default":
|
||||||
|
build_frontend = None
|
||||||
else:
|
else:
|
||||||
msg = f"cibuildwheel: Unrecognised build frontend {build_frontend_str!r}, only 'pip' and 'build' are supported"
|
try:
|
||||||
print(msg, file=sys.stderr)
|
build_frontend = BuildFrontendConfig.from_config_string(build_frontend_str)
|
||||||
sys.exit(2)
|
except ValueError as e:
|
||||||
|
print(f"cibuildwheel: {e}", file=sys.stderr)
|
||||||
|
sys.exit(2)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
environment = parse_environment(environment_config)
|
environment = parse_environment(environment_config)
|
||||||
|
|||||||
@@ -8,6 +8,43 @@ from pathlib import Path
|
|||||||
from ._compat import tomllib
|
from ._compat import tomllib
|
||||||
|
|
||||||
|
|
||||||
|
def get_parent(node: ast.AST | None, depth: int = 1) -> ast.AST | None:
|
||||||
|
for _ in range(depth):
|
||||||
|
node = getattr(node, "parent", None)
|
||||||
|
return node
|
||||||
|
|
||||||
|
|
||||||
|
def is_main(parent: ast.AST | None) -> bool:
|
||||||
|
if parent is None:
|
||||||
|
return False
|
||||||
|
|
||||||
|
# This would be much nicer with 3.10's pattern matching!
|
||||||
|
if not isinstance(parent, ast.If):
|
||||||
|
return False
|
||||||
|
if not isinstance(parent.test, ast.Compare):
|
||||||
|
return False
|
||||||
|
|
||||||
|
try:
|
||||||
|
(op,) = parent.test.ops
|
||||||
|
(comp,) = parent.test.comparators
|
||||||
|
except ValueError:
|
||||||
|
return False
|
||||||
|
|
||||||
|
if not isinstance(op, ast.Eq):
|
||||||
|
return False
|
||||||
|
|
||||||
|
values = {comp, parent.test.left}
|
||||||
|
|
||||||
|
mains = {x for x in values if isinstance(x, ast.Constant) and x.value == "__main__"}
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
class Analyzer(ast.NodeVisitor):
|
class Analyzer(ast.NodeVisitor):
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
self.requires_python: str | None = None
|
self.requires_python: str | None = None
|
||||||
@@ -19,13 +56,22 @@ class Analyzer(ast.NodeVisitor):
|
|||||||
super().visit(node)
|
super().visit(node)
|
||||||
|
|
||||||
def visit_keyword(self, node: ast.keyword) -> None:
|
def visit_keyword(self, node: ast.keyword) -> None:
|
||||||
|
# Must not be nested except for if __name__ == "__main__"
|
||||||
|
|
||||||
self.generic_visit(node)
|
self.generic_visit(node)
|
||||||
# Must not be nested in an if or other structure
|
|
||||||
# This will be Module -> Expr -> Call -> keyword
|
# This will be Module -> Expr -> Call -> keyword
|
||||||
|
parent = get_parent(node, 4)
|
||||||
|
unnested = parent is None
|
||||||
|
|
||||||
|
# This will be Module -> If -> Expr -> Call -> keyword
|
||||||
|
name_main_unnested = (
|
||||||
|
parent is not None and get_parent(parent) is None and is_main(get_parent(node, 3))
|
||||||
|
)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
node.arg == "python_requires"
|
node.arg == "python_requires"
|
||||||
and not hasattr(node.parent.parent.parent, "parent") # type: ignore[attr-defined]
|
|
||||||
and isinstance(node.value, ast.Constant)
|
and isinstance(node.value, ast.Constant)
|
||||||
|
and (unnested or name_main_unnested)
|
||||||
):
|
):
|
||||||
self.requires_python = node.value.value
|
self.requires_python = node.value.value
|
||||||
|
|
||||||
|
|||||||
@@ -97,12 +97,12 @@ python_configurations = [
|
|||||||
{ identifier = "cp310-macosx_x86_64", version = "3.10", url = "https://www.python.org/ftp/python/3.10.11/python-3.10.11-macos11.pkg" },
|
{ identifier = "cp310-macosx_x86_64", version = "3.10", url = "https://www.python.org/ftp/python/3.10.11/python-3.10.11-macos11.pkg" },
|
||||||
{ identifier = "cp310-macosx_arm64", version = "3.10", url = "https://www.python.org/ftp/python/3.10.11/python-3.10.11-macos11.pkg" },
|
{ identifier = "cp310-macosx_arm64", version = "3.10", url = "https://www.python.org/ftp/python/3.10.11/python-3.10.11-macos11.pkg" },
|
||||||
{ identifier = "cp310-macosx_universal2", version = "3.10", url = "https://www.python.org/ftp/python/3.10.11/python-3.10.11-macos11.pkg" },
|
{ identifier = "cp310-macosx_universal2", version = "3.10", url = "https://www.python.org/ftp/python/3.10.11/python-3.10.11-macos11.pkg" },
|
||||||
{ identifier = "cp311-macosx_x86_64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.4/python-3.11.4-macos11.pkg" },
|
{ identifier = "cp311-macosx_x86_64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.5/python-3.11.5-macos11.pkg" },
|
||||||
{ identifier = "cp311-macosx_arm64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.4/python-3.11.4-macos11.pkg" },
|
{ identifier = "cp311-macosx_arm64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.5/python-3.11.5-macos11.pkg" },
|
||||||
{ identifier = "cp311-macosx_universal2", version = "3.11", url = "https://www.python.org/ftp/python/3.11.4/python-3.11.4-macos11.pkg" },
|
{ identifier = "cp311-macosx_universal2", version = "3.11", url = "https://www.python.org/ftp/python/3.11.5/python-3.11.5-macos11.pkg" },
|
||||||
{ identifier = "cp312-macosx_x86_64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.0/python-3.12.0b4-macos11.pkg" },
|
{ identifier = "cp312-macosx_x86_64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.0/python-3.12.0rc3-macos11.pkg" },
|
||||||
{ identifier = "cp312-macosx_arm64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.0/python-3.12.0b4-macos11.pkg" },
|
{ identifier = "cp312-macosx_arm64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.0/python-3.12.0rc3-macos11.pkg" },
|
||||||
{ identifier = "cp312-macosx_universal2", version = "3.12", url = "https://www.python.org/ftp/python/3.12.0/python-3.12.0b4-macos11.pkg" },
|
{ identifier = "cp312-macosx_universal2", version = "3.12", url = "https://www.python.org/ftp/python/3.12.0/python-3.12.0rc3-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 = "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_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" },
|
{ identifier = "pp38-macosx_arm64", version = "3.8", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-macos_arm64.tar.bz2" },
|
||||||
@@ -124,14 +124,14 @@ python_configurations = [
|
|||||||
{ identifier = "cp39-win_amd64", version = "3.9.13", arch = "64" },
|
{ identifier = "cp39-win_amd64", version = "3.9.13", arch = "64" },
|
||||||
{ identifier = "cp310-win32", version = "3.10.11", arch = "32" },
|
{ identifier = "cp310-win32", version = "3.10.11", arch = "32" },
|
||||||
{ identifier = "cp310-win_amd64", version = "3.10.11", arch = "64" },
|
{ identifier = "cp310-win_amd64", version = "3.10.11", arch = "64" },
|
||||||
{ identifier = "cp311-win32", version = "3.11.4", arch = "32" },
|
{ identifier = "cp311-win32", version = "3.11.5", arch = "32" },
|
||||||
{ identifier = "cp311-win_amd64", version = "3.11.4", arch = "64" },
|
{ identifier = "cp311-win_amd64", version = "3.11.5", arch = "64" },
|
||||||
{ identifier = "cp312-win32", version = "3.12.0-b4", arch = "32" },
|
{ identifier = "cp312-win32", version = "3.12.0-rc3", arch = "32" },
|
||||||
{ identifier = "cp312-win_amd64", version = "3.12.0-b4", arch = "64" },
|
{ identifier = "cp312-win_amd64", version = "3.12.0-rc3", arch = "64" },
|
||||||
{ identifier = "cp39-win_arm64", version = "3.9.10", arch = "ARM64" },
|
{ identifier = "cp39-win_arm64", version = "3.9.10", arch = "ARM64" },
|
||||||
{ identifier = "cp310-win_arm64", version = "3.10.11", arch = "ARM64" },
|
{ identifier = "cp310-win_arm64", version = "3.10.11", arch = "ARM64" },
|
||||||
{ identifier = "cp311-win_arm64", version = "3.11.4", arch = "ARM64" },
|
{ identifier = "cp311-win_arm64", version = "3.11.5", arch = "ARM64" },
|
||||||
{ identifier = "cp312-win_arm64", version = "3.12.0-b4", arch = "ARM64" },
|
{ identifier = "cp312-win_arm64", version = "3.12.0-rc3", 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 = "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 = "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.12-win64.zip" },
|
{ identifier = "pp39-win_amd64", version = "3.9", arch = "64", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.12-win64.zip" },
|
||||||
|
|||||||
@@ -6,23 +6,23 @@
|
|||||||
#
|
#
|
||||||
delocate==0.10.4
|
delocate==0.10.4
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
distlib==0.3.6
|
distlib==0.3.7
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
filelock==3.12.2
|
filelock==3.12.4
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
packaging==23.1
|
packaging==23.1
|
||||||
# via delocate
|
# via delocate
|
||||||
platformdirs==3.8.1
|
platformdirs==3.10.0
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
typing-extensions==4.7.1
|
typing-extensions==4.8.0
|
||||||
# via delocate
|
# via delocate
|
||||||
virtualenv==20.23.1
|
virtualenv==20.24.5
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
wheel==0.40.0
|
wheel==0.41.2
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
|
|
||||||
# The following packages are considered to be unsafe in a requirements file:
|
# The following packages are considered to be unsafe in a requirements file:
|
||||||
pip==23.1.2
|
pip==23.2.1
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
setuptools==68.0.0
|
setuptools==68.2.2
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
|
|||||||
@@ -6,23 +6,23 @@
|
|||||||
#
|
#
|
||||||
delocate==0.10.4
|
delocate==0.10.4
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
distlib==0.3.6
|
distlib==0.3.7
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
filelock==3.12.2
|
filelock==3.12.4
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
packaging==23.1
|
packaging==23.1
|
||||||
# via delocate
|
# via delocate
|
||||||
platformdirs==3.8.1
|
platformdirs==3.10.0
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
typing-extensions==4.7.1
|
typing-extensions==4.8.0
|
||||||
# via delocate
|
# via delocate
|
||||||
virtualenv==20.23.1
|
virtualenv==20.24.5
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
wheel==0.40.0
|
wheel==0.41.2
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
|
|
||||||
# The following packages are considered to be unsafe in a requirements file:
|
# The following packages are considered to be unsafe in a requirements file:
|
||||||
pip==23.1.2
|
pip==23.2.1
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
setuptools==68.0.0
|
setuptools==68.2.2
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
|
|||||||
@@ -6,23 +6,23 @@
|
|||||||
#
|
#
|
||||||
delocate==0.10.4
|
delocate==0.10.4
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
distlib==0.3.6
|
distlib==0.3.7
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
filelock==3.12.2
|
filelock==3.12.4
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
packaging==23.1
|
packaging==23.1
|
||||||
# via delocate
|
# via delocate
|
||||||
platformdirs==3.8.1
|
platformdirs==3.10.0
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
typing-extensions==4.7.1
|
typing-extensions==4.8.0
|
||||||
# via delocate
|
# via delocate
|
||||||
virtualenv==20.23.1
|
virtualenv==20.24.5
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
wheel==0.40.0
|
wheel==0.41.2
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
|
|
||||||
# The following packages are considered to be unsafe in a requirements file:
|
# The following packages are considered to be unsafe in a requirements file:
|
||||||
pip==23.1.2
|
pip==23.2.1
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
setuptools==68.0.0
|
setuptools==68.2.2
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
delocate==0.10.4
|
delocate==0.10.4
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
distlib==0.3.6
|
distlib==0.3.7
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
filelock==3.12.2
|
filelock==3.12.2
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
@@ -14,22 +14,22 @@ importlib-metadata==6.7.0
|
|||||||
# via virtualenv
|
# via virtualenv
|
||||||
packaging==23.1
|
packaging==23.1
|
||||||
# via delocate
|
# via delocate
|
||||||
platformdirs==3.8.1
|
platformdirs==3.10.0
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
typing-extensions==4.7.1
|
typing-extensions==4.7.1
|
||||||
# via
|
# via
|
||||||
# delocate
|
# delocate
|
||||||
# importlib-metadata
|
# importlib-metadata
|
||||||
# platformdirs
|
# platformdirs
|
||||||
virtualenv==20.23.1
|
virtualenv==20.24.5
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
wheel==0.40.0
|
wheel==0.41.2
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
zipp==3.15.0
|
zipp==3.15.0
|
||||||
# via importlib-metadata
|
# via importlib-metadata
|
||||||
|
|
||||||
# The following packages are considered to be unsafe in a requirements file:
|
# The following packages are considered to be unsafe in a requirements file:
|
||||||
pip==23.1.2
|
pip==23.2.1
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
setuptools==68.0.0
|
setuptools==68.0.0
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
|
|||||||
@@ -6,23 +6,23 @@
|
|||||||
#
|
#
|
||||||
delocate==0.10.4
|
delocate==0.10.4
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
distlib==0.3.6
|
distlib==0.3.7
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
filelock==3.12.2
|
filelock==3.12.4
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
packaging==23.1
|
packaging==23.1
|
||||||
# via delocate
|
# via delocate
|
||||||
platformdirs==3.8.1
|
platformdirs==3.10.0
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
typing-extensions==4.7.1
|
typing-extensions==4.8.0
|
||||||
# via delocate
|
# via delocate
|
||||||
virtualenv==20.23.1
|
virtualenv==20.24.5
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
wheel==0.40.0
|
wheel==0.41.2
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
|
|
||||||
# The following packages are considered to be unsafe in a requirements file:
|
# The following packages are considered to be unsafe in a requirements file:
|
||||||
pip==23.1.2
|
pip==23.2.1
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
setuptools==68.0.0
|
setuptools==68.2.2
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
|
|||||||
@@ -6,23 +6,23 @@
|
|||||||
#
|
#
|
||||||
delocate==0.10.4
|
delocate==0.10.4
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
distlib==0.3.6
|
distlib==0.3.7
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
filelock==3.12.2
|
filelock==3.12.4
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
packaging==23.1
|
packaging==23.1
|
||||||
# via delocate
|
# via delocate
|
||||||
platformdirs==3.8.1
|
platformdirs==3.10.0
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
typing-extensions==4.7.1
|
typing-extensions==4.8.0
|
||||||
# via delocate
|
# via delocate
|
||||||
virtualenv==20.23.1
|
virtualenv==20.24.5
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
wheel==0.40.0
|
wheel==0.41.2
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
|
|
||||||
# The following packages are considered to be unsafe in a requirements file:
|
# The following packages are considered to be unsafe in a requirements file:
|
||||||
pip==23.1.2
|
pip==23.2.1
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
setuptools==68.0.0
|
setuptools==68.2.2
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
|
|||||||
@@ -6,23 +6,23 @@
|
|||||||
#
|
#
|
||||||
delocate==0.10.4
|
delocate==0.10.4
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
distlib==0.3.6
|
distlib==0.3.7
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
filelock==3.12.2
|
filelock==3.12.4
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
packaging==23.1
|
packaging==23.1
|
||||||
# via delocate
|
# via delocate
|
||||||
platformdirs==3.8.1
|
platformdirs==3.10.0
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
typing-extensions==4.7.1
|
typing-extensions==4.8.0
|
||||||
# via delocate
|
# via delocate
|
||||||
virtualenv==20.23.1
|
virtualenv==20.24.5
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
wheel==0.40.0
|
wheel==0.41.2
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
|
|
||||||
# The following packages are considered to be unsafe in a requirements file:
|
# The following packages are considered to be unsafe in a requirements file:
|
||||||
pip==23.1.2
|
pip==23.2.1
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
setuptools==68.0.0
|
setuptools==68.2.2
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
|
|||||||
@@ -1,49 +1,54 @@
|
|||||||
[x86_64]
|
[x86_64]
|
||||||
manylinux1 = quay.io/pypa/manylinux1_x86_64:2023-06-25-d2e0575
|
manylinux1 = quay.io/pypa/manylinux1_x86_64:2023-09-12-f07b683
|
||||||
manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177
|
manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177
|
||||||
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2023-07-14-55e4124
|
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2023-09-24-36b93e4
|
||||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-12-26-0d38463
|
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:2023-07-14-55e4124
|
manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2023-09-24-36b93e4
|
||||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2023-07-14-55e4124
|
musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2023-09-24-36b93e4
|
||||||
|
musllinux_1_2 = quay.io/pypa/musllinux_1_2_x86_64:2023-09-24-36b93e4
|
||||||
|
|
||||||
[i686]
|
[i686]
|
||||||
manylinux1 = quay.io/pypa/manylinux1_i686:2023-06-25-d2e0575
|
manylinux1 = quay.io/pypa/manylinux1_i686:2023-09-12-f07b683
|
||||||
manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177
|
manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177
|
||||||
manylinux2014 = quay.io/pypa/manylinux2014_i686:2023-07-14-55e4124
|
manylinux2014 = quay.io/pypa/manylinux2014_i686:2023-09-24-36b93e4
|
||||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-12-26-0d38463
|
manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-12-26-0d38463
|
||||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2023-07-14-55e4124
|
musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2023-09-24-36b93e4
|
||||||
|
musllinux_1_2 = quay.io/pypa/musllinux_1_2_i686:2023-09-24-36b93e4
|
||||||
|
|
||||||
[pypy_x86_64]
|
[pypy_x86_64]
|
||||||
manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177
|
manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177
|
||||||
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2023-07-14-55e4124
|
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2023-09-24-36b93e4
|
||||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-12-26-0d38463
|
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:2023-07-14-55e4124
|
manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2023-09-24-36b93e4
|
||||||
|
|
||||||
[pypy_i686]
|
[pypy_i686]
|
||||||
manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177
|
manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177
|
||||||
manylinux2014 = quay.io/pypa/manylinux2014_i686:2023-07-14-55e4124
|
manylinux2014 = quay.io/pypa/manylinux2014_i686:2023-09-24-36b93e4
|
||||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-12-26-0d38463
|
manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-12-26-0d38463
|
||||||
|
|
||||||
[aarch64]
|
[aarch64]
|
||||||
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2023-07-14-55e4124
|
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2023-09-24-36b93e4
|
||||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-12-26-0d38463
|
manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-12-26-0d38463
|
||||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2023-07-14-55e4124
|
manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2023-09-24-36b93e4
|
||||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2023-07-14-55e4124
|
musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2023-09-24-36b93e4
|
||||||
|
musllinux_1_2 = quay.io/pypa/musllinux_1_2_aarch64:2023-09-24-36b93e4
|
||||||
|
|
||||||
[ppc64le]
|
[ppc64le]
|
||||||
manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2023-07-14-55e4124
|
manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2023-09-24-36b93e4
|
||||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2022-12-26-0d38463
|
manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2022-12-26-0d38463
|
||||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2023-07-14-55e4124
|
manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2023-09-24-36b93e4
|
||||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2023-07-14-55e4124
|
musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2023-09-24-36b93e4
|
||||||
|
musllinux_1_2 = quay.io/pypa/musllinux_1_2_ppc64le:2023-09-24-36b93e4
|
||||||
|
|
||||||
[s390x]
|
[s390x]
|
||||||
manylinux2014 = quay.io/pypa/manylinux2014_s390x:2023-07-14-55e4124
|
manylinux2014 = quay.io/pypa/manylinux2014_s390x:2023-09-24-36b93e4
|
||||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2022-12-26-0d38463
|
manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2022-12-26-0d38463
|
||||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_s390x:2023-07-14-55e4124
|
manylinux_2_28 = quay.io/pypa/manylinux_2_28_s390x:2023-09-24-36b93e4
|
||||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2023-07-14-55e4124
|
musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2023-09-24-36b93e4
|
||||||
|
musllinux_1_2 = quay.io/pypa/musllinux_1_2_s390x:2023-09-24-36b93e4
|
||||||
|
|
||||||
[pypy_aarch64]
|
[pypy_aarch64]
|
||||||
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2023-07-14-55e4124
|
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2023-09-24-36b93e4
|
||||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-12-26-0d38463
|
manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-12-26-0d38463
|
||||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2023-07-14-55e4124
|
manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2023-09-24-36b93e4
|
||||||
|
|
||||||
|
|||||||
+39
-12
@@ -57,16 +57,6 @@ install_certifi_script: Final[Path] = resources_dir / "install_certifi.py"
|
|||||||
|
|
||||||
test_fail_cwd_file: Final[Path] = resources_dir / "testing_temp_dir_file.py"
|
test_fail_cwd_file: Final[Path] = resources_dir / "testing_temp_dir_file.py"
|
||||||
|
|
||||||
BuildFrontend = Literal["pip", "build"]
|
|
||||||
|
|
||||||
|
|
||||||
def build_frontend_or_default(
|
|
||||||
setting: BuildFrontend | Literal["default"], default: BuildFrontend = "pip"
|
|
||||||
) -> BuildFrontend:
|
|
||||||
if setting == "default":
|
|
||||||
return default
|
|
||||||
return setting
|
|
||||||
|
|
||||||
|
|
||||||
MANYLINUX_ARCHS: Final[tuple[str, ...]] = (
|
MANYLINUX_ARCHS: Final[tuple[str, ...]] = (
|
||||||
"x86_64",
|
"x86_64",
|
||||||
@@ -250,7 +240,7 @@ class BuildSelector:
|
|||||||
requires_python: SpecifierSet | None = None
|
requires_python: SpecifierSet | None = None
|
||||||
|
|
||||||
# a pattern that skips prerelease versions, when include_prereleases is False.
|
# a pattern that skips prerelease versions, when include_prereleases is False.
|
||||||
PRERELEASE_SKIP: ClassVar[str] = "cp312-*"
|
PRERELEASE_SKIP: ClassVar[str] = ""
|
||||||
prerelease_pythons: bool = False
|
prerelease_pythons: bool = False
|
||||||
|
|
||||||
def __call__(self, build_id: str) -> bool:
|
def __call__(self, build_id: str) -> bool:
|
||||||
@@ -376,6 +366,34 @@ class DependencyConstraints:
|
|||||||
return self.base_file_path.name
|
return self.base_file_path.name
|
||||||
|
|
||||||
|
|
||||||
|
BuildFrontendName = Literal["pip", "build"]
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True)
|
||||||
|
class BuildFrontendConfig:
|
||||||
|
name: BuildFrontendName
|
||||||
|
args: Sequence[str] = ()
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def from_config_string(config_string: str) -> BuildFrontendConfig:
|
||||||
|
config_dict = parse_key_value_string(config_string, ["name"], ["args"])
|
||||||
|
name = " ".join(config_dict["name"])
|
||||||
|
if name not in {"pip", "build"}:
|
||||||
|
msg = f"Unrecognised build frontend {name}, only 'pip' and 'build' are supported"
|
||||||
|
raise ValueError(msg)
|
||||||
|
|
||||||
|
name = typing.cast(BuildFrontendName, name)
|
||||||
|
|
||||||
|
args = config_dict.get("args") or []
|
||||||
|
return BuildFrontendConfig(name=name, args=args)
|
||||||
|
|
||||||
|
def options_summary(self) -> str | dict[str, str]:
|
||||||
|
if not self.args:
|
||||||
|
return self.name
|
||||||
|
else:
|
||||||
|
return {"name": self.name, "args": repr(self.args)}
|
||||||
|
|
||||||
|
|
||||||
class NonPlatformWheelError(Exception):
|
class NonPlatformWheelError(Exception):
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
message = textwrap.dedent(
|
message = textwrap.dedent(
|
||||||
@@ -699,13 +717,19 @@ def fix_ansi_codes_for_github_actions(text: str) -> str:
|
|||||||
|
|
||||||
|
|
||||||
def parse_key_value_string(
|
def parse_key_value_string(
|
||||||
key_value_string: str, positional_arg_names: list[str] | None = None
|
key_value_string: str,
|
||||||
|
positional_arg_names: Sequence[str] | None = None,
|
||||||
|
kw_arg_names: Sequence[str] | None = None,
|
||||||
) -> dict[str, list[str]]:
|
) -> dict[str, list[str]]:
|
||||||
"""
|
"""
|
||||||
Parses a string like "docker; create_args: --some-option=value another-option"
|
Parses a string like "docker; create_args: --some-option=value another-option"
|
||||||
"""
|
"""
|
||||||
if positional_arg_names is None:
|
if positional_arg_names is None:
|
||||||
positional_arg_names = []
|
positional_arg_names = []
|
||||||
|
if kw_arg_names is None:
|
||||||
|
kw_arg_names = []
|
||||||
|
|
||||||
|
all_field_names = [*positional_arg_names, *kw_arg_names]
|
||||||
|
|
||||||
shlexer = shlex.shlex(key_value_string, posix=True, punctuation_chars=";:")
|
shlexer = shlex.shlex(key_value_string, posix=True, punctuation_chars=";:")
|
||||||
shlexer.commenters = ""
|
shlexer.commenters = ""
|
||||||
@@ -721,6 +745,9 @@ def parse_key_value_string(
|
|||||||
if len(field) > 1 and field[1] == ":":
|
if len(field) > 1 and field[1] == ":":
|
||||||
field_name = field[0]
|
field_name = field[0]
|
||||||
values = field[2:]
|
values = field[2:]
|
||||||
|
if field_name not in all_field_names:
|
||||||
|
msg = f"Failed to parse {key_value_string!r}. Unknown field name {field_name!r}"
|
||||||
|
raise ValueError(msg)
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
field_name = positional_arg_names[field_i]
|
field_name = positional_arg_names[field_i]
|
||||||
|
|||||||
+11
-8
@@ -25,10 +25,10 @@ from .typing import PathOrStr
|
|||||||
from .util import (
|
from .util import (
|
||||||
CIBW_CACHE_PATH,
|
CIBW_CACHE_PATH,
|
||||||
AlreadyBuiltWheelError,
|
AlreadyBuiltWheelError,
|
||||||
BuildFrontend,
|
BuildFrontendConfig,
|
||||||
|
BuildFrontendName,
|
||||||
BuildSelector,
|
BuildSelector,
|
||||||
NonPlatformWheelError,
|
NonPlatformWheelError,
|
||||||
build_frontend_or_default,
|
|
||||||
call,
|
call,
|
||||||
download,
|
download,
|
||||||
find_compatible_wheel,
|
find_compatible_wheel,
|
||||||
@@ -216,7 +216,7 @@ def setup_python(
|
|||||||
python_configuration: PythonConfiguration,
|
python_configuration: PythonConfiguration,
|
||||||
dependency_constraint_flags: Sequence[PathOrStr],
|
dependency_constraint_flags: Sequence[PathOrStr],
|
||||||
environment: ParsedEnvironment,
|
environment: ParsedEnvironment,
|
||||||
build_frontend: BuildFrontend,
|
build_frontend: BuildFrontendName,
|
||||||
) -> dict[str, str]:
|
) -> dict[str, str]:
|
||||||
tmp.mkdir()
|
tmp.mkdir()
|
||||||
implementation_id = python_configuration.identifier.split("-")[0]
|
implementation_id = python_configuration.identifier.split("-")[0]
|
||||||
@@ -369,7 +369,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
|||||||
|
|
||||||
for config in python_configurations:
|
for config in python_configurations:
|
||||||
build_options = options.build_options(config.identifier)
|
build_options = options.build_options(config.identifier)
|
||||||
build_frontend = build_frontend_or_default(build_options.build_frontend)
|
build_frontend = build_options.build_frontend or BuildFrontendConfig("pip")
|
||||||
log.build_start(config.identifier)
|
log.build_start(config.identifier)
|
||||||
|
|
||||||
identifier_tmp_dir = tmp_path / config.identifier
|
identifier_tmp_dir = tmp_path / config.identifier
|
||||||
@@ -390,7 +390,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
|||||||
config,
|
config,
|
||||||
dependency_constraint_flags,
|
dependency_constraint_flags,
|
||||||
build_options.environment,
|
build_options.environment,
|
||||||
build_frontend,
|
build_frontend.name,
|
||||||
)
|
)
|
||||||
|
|
||||||
compatible_wheel = find_compatible_wheel(built_wheels, config.identifier)
|
compatible_wheel = find_compatible_wheel(built_wheels, config.identifier)
|
||||||
@@ -414,9 +414,12 @@ def build(options: Options, tmp_path: Path) -> None:
|
|||||||
log.step("Building wheel...")
|
log.step("Building wheel...")
|
||||||
built_wheel_dir.mkdir()
|
built_wheel_dir.mkdir()
|
||||||
|
|
||||||
extra_flags = split_config_settings(build_options.config_settings, build_frontend)
|
extra_flags = split_config_settings(
|
||||||
|
build_options.config_settings, build_frontend.name
|
||||||
|
)
|
||||||
|
extra_flags += build_frontend.args
|
||||||
|
|
||||||
if build_frontend == "pip":
|
if build_frontend.name == "pip":
|
||||||
extra_flags += get_build_verbosity_extra_flags(build_options.build_verbosity)
|
extra_flags += get_build_verbosity_extra_flags(build_options.build_verbosity)
|
||||||
# Path.resolve() is needed. Without it pip wheel may try to fetch package from pypi.org
|
# Path.resolve() is needed. Without it pip wheel may try to fetch package from pypi.org
|
||||||
# see https://github.com/pypa/cibuildwheel/pull/369
|
# see https://github.com/pypa/cibuildwheel/pull/369
|
||||||
@@ -431,7 +434,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
|||||||
*extra_flags,
|
*extra_flags,
|
||||||
env=env,
|
env=env,
|
||||||
)
|
)
|
||||||
elif build_frontend == "build":
|
elif build_frontend.name == "build":
|
||||||
if not 0 <= build_options.build_verbosity < 2:
|
if not 0 <= build_options.build_verbosity < 2:
|
||||||
msg = f"build_verbosity {build_options.build_verbosity} is not supported for build frontend. Ignoring."
|
msg = f"build_verbosity {build_options.build_verbosity} is not supported for build frontend. Ignoring."
|
||||||
log.warning(msg)
|
log.warning(msg)
|
||||||
|
|||||||
@@ -4,6 +4,32 @@ title: Changelog
|
|||||||
|
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
### v2.16.1
|
||||||
|
|
||||||
|
_26 September 2023_
|
||||||
|
|
||||||
|
- 🛠 Updates the prerelease CPython 3.12 version to 3.12.0rc3 (#1625)
|
||||||
|
- 🛠 Only calls `linux32` in containers when necessary (#1599)
|
||||||
|
|
||||||
|
### v2.16.0
|
||||||
|
|
||||||
|
_18 September 2023_
|
||||||
|
|
||||||
|
- ✨ Add the ability to pass additional flags to a build frontend through the [CIBW_BUILD_FRONTEND](https://cibuildwheel.readthedocs.io/en/stable/options/#build-frontend) option (#1588).
|
||||||
|
- ✨ The environment variable SOURCE_DATE_EPOCH is now automatically passed through to container Linux builds (useful for [reproducible builds](https://reproducible-builds.org/docs/source-date-epoch/)!) (#1589)
|
||||||
|
- 🛠 Updates the prerelease CPython 3.12 version to 3.12.0rc2 (#1604)
|
||||||
|
- 🐛 Fix `requires_python` auto-detection from setup.py when the call to `setup()` is within an `if __name__ == "__main__" block (#1613)
|
||||||
|
- 🐛 Fix a bug that prevented building Linux wheels in Docker on a Windows host (#1573)
|
||||||
|
- 🐛 `--only` can now select prerelease-pythons (#1564)
|
||||||
|
- 📚 Docs & examples updates (#1582, #1593, #1598, #1615)
|
||||||
|
|
||||||
|
### v2.15.0
|
||||||
|
|
||||||
|
_8 August 2023_
|
||||||
|
|
||||||
|
- 🌟 CPython 3.12 wheels are now built by default - without the CIBW_PRERELEASE_PYTHONS flag. It's time to build and upload these wheels to PyPI! This release includes CPython 3.12.0rc1, which is guaranteed to be ABI compatible with the final release. (#1565)
|
||||||
|
- ✨ Adds musllinux_1_2 support - this allows packagers to build for musl-based Linux distributions on a more recent Alpine image, and a newer musl libc. (#1561)
|
||||||
|
|
||||||
### v2.14.1
|
### v2.14.1
|
||||||
|
|
||||||
_15 July 2023_
|
_15 July 2023_
|
||||||
|
|||||||
@@ -413,8 +413,9 @@
|
|||||||
|
|
||||||
- name: Tornado
|
- name: Tornado
|
||||||
gh: tornadoweb/tornado
|
gh: tornadoweb/tornado
|
||||||
ci: [travisci]
|
ci: [github]
|
||||||
os: [apple, linux]
|
os: [linux, apple, windows]
|
||||||
|
notes: Tornado is a Python web framework and asynchronous networking library. Uses stable ABI for a small C extension.
|
||||||
|
|
||||||
- name: pytorch-fairseq
|
- name: pytorch-fairseq
|
||||||
gh: pytorch/fairseq
|
gh: pytorch/fairseq
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ well as several useful actions. Alongside your existing job(s) that runs cibuild
|
|||||||
name: Make SDist
|
name: Make SDist
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Optional, use if you use setuptools_scm
|
fetch-depth: 0 # Optional, use if you use setuptools_scm
|
||||||
submodules: true # Optional, use if you have submodules
|
submodules: true # Optional, use if you have submodules
|
||||||
|
|||||||
+3
-3
@@ -159,7 +159,7 @@ There are two suggested methods for keeping cibuildwheel up to date that instead
|
|||||||
If you use GitHub Actions for builds, you can use cibuildwheel as an action:
|
If you use GitHub Actions for builds, you can use cibuildwheel as an action:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
uses: pypa/cibuildwheel@v2.14.1
|
uses: pypa/cibuildwheel@v2.16.1
|
||||||
```
|
```
|
||||||
|
|
||||||
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.
|
This is a composite step that just runs cibuildwheel using pipx. You can set command-line options as `with:` parameters, and use `env:` as normal.
|
||||||
@@ -181,7 +181,7 @@ The second option, and the only one that supports other CI systems, is using a `
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# requirements-cibw.txt
|
# requirements-cibw.txt
|
||||||
cibuildwheel==2.14.1
|
cibuildwheel==2.16.1
|
||||||
```
|
```
|
||||||
|
|
||||||
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:
|
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:
|
||||||
@@ -325,7 +325,7 @@ Solutions to this vary, but the simplest is to use pipx:
|
|||||||
# most runners have pipx preinstalled, but in case you don't
|
# most runners have pipx preinstalled, but in case you don't
|
||||||
python3 -m pip install pipx
|
python3 -m pip install pipx
|
||||||
|
|
||||||
pipx run cibuildwheel==2.14.1 --output-dir wheelhouse
|
pipx run cibuildwheel==2.16.1 --output-dir wheelhouse
|
||||||
pipx run twine upload wheelhouse/*.whl
|
pipx run twine upload wheelhouse/*.whl
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
+24
-5
@@ -504,9 +504,19 @@ This option can also be set using the [command-line option](#command-line) `--pr
|
|||||||
### `CIBW_BUILD_FRONTEND` {: #build-frontend}
|
### `CIBW_BUILD_FRONTEND` {: #build-frontend}
|
||||||
> Set the tool to use to build, either "pip" (default for now) or "build"
|
> Set the tool to use to build, either "pip" (default for now) or "build"
|
||||||
|
|
||||||
Choose which build backend to use. Can either be "pip", which will run
|
Options:
|
||||||
|
|
||||||
|
- `pip[;args: ...]`
|
||||||
|
- `build[;args: ...]`
|
||||||
|
|
||||||
|
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`.
|
`python -m pip wheel`, or "build", which will run `python -m build --wheel`.
|
||||||
|
|
||||||
|
You can specify extra arguments to pass to `pip wheel` or `build` using the
|
||||||
|
optional `args` option.
|
||||||
|
|
||||||
!!! tip
|
!!! tip
|
||||||
Until v2.0.0, [pip] was the only way to build wheels, and is still the
|
Until v2.0.0, [pip] was the only way to build wheels, and is still the
|
||||||
default. However, we expect that at some point in the future, cibuildwheel
|
default. However, we expect that at some point in the future, cibuildwheel
|
||||||
@@ -526,6 +536,9 @@ Choose which build backend to use. Can either be "pip", which will run
|
|||||||
|
|
||||||
# Ensure pip is used even if the default changes in the future
|
# Ensure pip is used even if the default changes in the future
|
||||||
CIBW_BUILD_FRONTEND: "pip"
|
CIBW_BUILD_FRONTEND: "pip"
|
||||||
|
|
||||||
|
# supply an extra argument to 'pip wheel'
|
||||||
|
CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation"
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! tab examples "pyproject.toml"
|
!!! tab examples "pyproject.toml"
|
||||||
@@ -537,6 +550,9 @@ Choose which build backend to use. Can either be "pip", which will run
|
|||||||
|
|
||||||
# Ensure pip is used even if the default changes in the future
|
# Ensure pip is used even if the default changes in the future
|
||||||
build-frontend = "pip"
|
build-frontend = "pip"
|
||||||
|
|
||||||
|
# supply an extra argument to 'pip wheel'
|
||||||
|
build-frontend = { name = "pip", args = ["--no-build-isolation"] }
|
||||||
```
|
```
|
||||||
|
|
||||||
### `CIBW_CONFIG_SETTINGS` {: #config-settings}
|
### `CIBW_CONFIG_SETTINGS` {: #config-settings}
|
||||||
@@ -664,6 +680,9 @@ A list of environment variables to pass into the linux container during the buil
|
|||||||
|
|
||||||
To specify more than one environment variable, separate the variable names by spaces.
|
To specify more than one environment variable, separate the variable names by spaces.
|
||||||
|
|
||||||
|
!!! note
|
||||||
|
cibuildwheel automatically passes the environment variable [`SOURCE_DATE_EPOCH`](https://reproducible-builds.org/docs/source-date-epoch/) if defined.
|
||||||
|
|
||||||
#### Examples
|
#### Examples
|
||||||
|
|
||||||
!!! tab examples "Environment passthrough"
|
!!! tab examples "Environment passthrough"
|
||||||
@@ -981,7 +1000,7 @@ Set an alternative Docker image to be used for building [manylinux / musllinux](
|
|||||||
For `CIBW_MANYLINUX_*_IMAGE`, the value of this option can either be set to `manylinux1`, `manylinux2010`, `manylinux2014`, `manylinux_2_24` or `manylinux_2_28` to use a pinned version of the [official manylinux images](https://github.com/pypa/manylinux). Alternatively, set these options to any other valid Docker image name. For PyPy, the `manylinux1` image is not available. For architectures other
|
For `CIBW_MANYLINUX_*_IMAGE`, the value of this option can either be set to `manylinux1`, `manylinux2010`, `manylinux2014`, `manylinux_2_24` or `manylinux_2_28` to use a pinned version of the [official manylinux images](https://github.com/pypa/manylinux). Alternatively, set these options to any other valid Docker image name. For PyPy, the `manylinux1` image is not available. For architectures other
|
||||||
than x86 (x86\_64 and i686) `manylinux2014`, `manylinux_2_24` or `manylinux_2_28` must be used, because the first version of the manylinux specification that supports additional architectures is `manylinux2014`. `manylinux_2_28` is not supported for `i686` architecture.
|
than x86 (x86\_64 and i686) `manylinux2014`, `manylinux_2_24` or `manylinux_2_28` must be used, because the first version of the manylinux specification that supports additional architectures is `manylinux2014`. `manylinux_2_28` is not supported for `i686` architecture.
|
||||||
|
|
||||||
For `CIBW_MUSLLINUX_*_IMAGE`, the value of this option can either be set to `musllinux_1_1` to use a pinned version of the [official musllinux images](https://github.com/pypa/musllinux). Alternatively, set these options to any other valid Docker image name.
|
For `CIBW_MUSLLINUX_*_IMAGE`, the value of this option can either be set to `musllinux_1_1` or `musllinux_1_2` to use a pinned version of the [official musllinux images](https://github.com/pypa/musllinux). Alternatively, set these options to any other valid Docker image name.
|
||||||
|
|
||||||
If this option is blank, it will fall though to the next available definition (environment variable -> pyproject.toml -> default).
|
If this option is blank, it will fall though to the next available definition (environment variable -> pyproject.toml -> default).
|
||||||
|
|
||||||
@@ -1345,11 +1364,11 @@ Platform-specific environment variables are also available:<br/>
|
|||||||
> Install your wheel for testing using `extras_require`
|
> Install your wheel for testing using `extras_require`
|
||||||
|
|
||||||
List of
|
List of
|
||||||
[extras_require](https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies)
|
[extras_require](https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#declaring-required-dependency)
|
||||||
options that should be included when installing the wheel prior to running the
|
options that should be included when installing the wheel prior to running the
|
||||||
tests. This can be used to avoid having to redefine test dependencies in
|
tests. This can be used to avoid having to redefine test dependencies in
|
||||||
`CIBW_TEST_REQUIRES` if they are already defined in `setup.py` or
|
`CIBW_TEST_REQUIRES` if they are already defined in `pyproject.toml`,
|
||||||
`setup.cfg`.
|
`setup.cfg` or `setup.py`.
|
||||||
|
|
||||||
Platform-specific environment variables are also available:<br/>
|
Platform-specific environment variables are also available:<br/>
|
||||||
`CIBW_TEST_EXTRAS_MACOS` | `CIBW_TEST_EXTRAS_WINDOWS` | `CIBW_TEST_EXTRAS_LINUX`
|
`CIBW_TEST_EXTRAS_MACOS` | `CIBW_TEST_EXTRAS_WINDOWS` | `CIBW_TEST_EXTRAS_LINUX`
|
||||||
|
|||||||
+4
-4
@@ -181,10 +181,10 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/
|
|||||||
os: [ubuntu-20.04, windows-2019, macos-11]
|
os: [ubuntu-20.04, windows-2019, macos-11]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build wheels
|
- name: Build wheels
|
||||||
run: pipx run cibuildwheel==2.14.1
|
run: pipx run cibuildwheel==2.16.1
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
@@ -213,13 +213,13 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/
|
|||||||
os: [ubuntu-20.04, windows-2019, macos-11]
|
os: [ubuntu-20.04, windows-2019, macos-11]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
# Used to host cibuildwheel
|
# Used to host cibuildwheel
|
||||||
- uses: actions/setup-python@v3
|
- uses: actions/setup-python@v3
|
||||||
|
|
||||||
- name: Install cibuildwheel
|
- name: Install cibuildwheel
|
||||||
run: python -m pip install cibuildwheel==2.14.1
|
run: python -m pip install cibuildwheel==2.16.1
|
||||||
|
|
||||||
- name: Build wheels
|
- name: Build wheels
|
||||||
run: python -m cibuildwheel --output-dir wheelhouse
|
run: python -m cibuildwheel --output-dir wheelhouse
|
||||||
|
|||||||
+27
-27
@@ -11,19 +11,19 @@ title: Working examples
|
|||||||
| [scikit-learn][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The machine learning library. A complex but clean config using many of cibuildwheel's features to build a large project with Cython and C++ extensions. |
|
| [scikit-learn][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The machine learning library. A complex but clean config using many of cibuildwheel's features to build a large project with Cython and C++ extensions. |
|
||||||
| [pytorch-fairseq][] | ![github icon][] | ![apple icon][] ![linux icon][] | Facebook AI Research Sequence-to-Sequence Toolkit written in Python. |
|
| [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. |
|
| [NumPy][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The fundamental package for scientific computing with Python. |
|
||||||
| [Tornado][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. |
|
| [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 |
|
| [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 |
|
| [NCNN][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | ncnn is a high-performance neural network inference framework optimized for the mobile platform |
|
||||||
|
| [MyPy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | The compiled version of MyPy using MyPyC. |
|
||||||
| [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. |
|
| [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. |
|
||||||
| [Kivy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Open source UI framework written in Python, running on Windows, Linux, macOS, Android and iOS |
|
| [Kivy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Open source UI framework written in Python, running on Windows, Linux, macOS, Android and iOS |
|
||||||
| [MyPy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | The compiled version of MyPy using MyPyC. |
|
|
||||||
| [duckdb][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | DuckDB is an in-process SQL OLAP Database Management System |
|
| [duckdb][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | DuckDB is an in-process SQL OLAP Database Management System |
|
||||||
| [MemRay][] | ![github icon][] | ![linux icon][] | Memray is a memory profiler for Python |
|
| [MemRay][] | ![github icon][] | ![linux icon][] | Memray is a memory profiler for Python |
|
||||||
| [uvloop][] | ![github icon][] | ![apple icon][] ![linux icon][] | Ultra fast asyncio event loop. |
|
| [uvloop][] | ![github icon][] | ![apple icon][] ![linux icon][] | Ultra fast asyncio event loop. |
|
||||||
| [psutil][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Cross-platform lib for process and system monitoring in Python |
|
| [psutil][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Cross-platform lib for process and system monitoring in Python |
|
||||||
|
| [Triton][] | ![github icon][] | ![linux icon][] | Self hosted runners |
|
||||||
| [vaex][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Out-of-Core hybrid Apache Arrow/NumPy DataFrame for Python, ML, visualization and exploration of big tabular data at a billion rows per second 🚀 |
|
| [vaex][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Out-of-Core hybrid Apache Arrow/NumPy DataFrame for Python, ML, visualization and exploration of big tabular data at a billion rows per second 🚀 |
|
||||||
| [Google Benchmark][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A microbenchmark support library |
|
| [Google Benchmark][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A microbenchmark support library |
|
||||||
| [Triton][] | ![github icon][] | ![linux icon][] | Self hosted runners |
|
|
||||||
| [Apache Beam][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Apache Beam is a unified programming model for Batch and Streaming data processing. |
|
| [Apache Beam][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Apache Beam is a unified programming model for Batch and Streaming data processing. |
|
||||||
| [PyGame][] | ![github icon][] | ![apple icon][] ![linux icon][] | 🐍🎮 pygame (the library) is a Free and Open Source python programming language library for making multimedia applications like games built on top of the excellent SDL library. C, Python, Native, OpenGL. |
|
| [PyGame][] | ![github icon][] | ![apple icon][] ![linux icon][] | 🐍🎮 pygame (the library) is a Free and Open Source python programming language library for making multimedia applications like games built on top of the excellent SDL library. C, Python, Native, OpenGL. |
|
||||||
| [asyncpg][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A fast PostgreSQL Database Client Library for Python/asyncio. |
|
| [asyncpg][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A fast PostgreSQL Database Client Library for Python/asyncio. |
|
||||||
@@ -31,8 +31,8 @@ title: Working examples
|
|||||||
| [scikit-image][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Image processing library. Uses cibuildwheel to build and test a project that uses Cython with platform-native code. |
|
| [scikit-image][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Image processing library. Uses cibuildwheel to build and test a project that uses Cython with platform-native code. |
|
||||||
| [twisted-iocpsupport][] | ![github icon][] | ![windows icon][] | A submodule of Twisted that hooks into native C APIs using Cython. |
|
| [twisted-iocpsupport][] | ![github icon][] | ![windows icon][] | A submodule of Twisted that hooks into native C APIs using Cython. |
|
||||||
| [PyOxidizer][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A modern Python application packaging and distribution tool |
|
| [PyOxidizer][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A modern Python application packaging and distribution tool |
|
||||||
| [websockets][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | Library for building WebSocket servers and clients. Mostly written in Python, with a small C 'speedups' extension module. |
|
|
||||||
| [cvxpy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A Python-embedded modeling language for convex optimization problems. |
|
| [cvxpy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A Python-embedded modeling language for convex optimization problems. |
|
||||||
|
| [websockets][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | Library for building WebSocket servers and clients. Mostly written in Python, with a small C 'speedups' extension module. |
|
||||||
| [River][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | 🌊 Online machine learning in Python |
|
| [River][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | 🌊 Online machine learning in Python |
|
||||||
| [UltraJSON][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Ultra fast JSON decoder and encoder written in C with Python bindings |
|
| [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. |
|
| [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. |
|
||||||
@@ -40,25 +40,25 @@ title: Working examples
|
|||||||
| [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. |
|
| [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. |
|
||||||
| [Confluent client for Kafka][] | ![travisci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | setup in `tools/wheels/build-wheels.bat` |
|
| [Confluent client for Kafka][] | ![travisci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | setup in `tools/wheels/build-wheels.bat` |
|
||||||
| [Implicit][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes GPU support for linux wheels |
|
| [Implicit][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes GPU support for linux wheels |
|
||||||
| [vispy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Main repository for Vispy |
|
|
||||||
| [Dependency Injector][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Dependency injection framework for Python, uses Windows TravisCI |
|
| [Dependency Injector][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Dependency injection framework for Python, uses Windows TravisCI |
|
||||||
|
| [vispy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Main repository for Vispy |
|
||||||
| [tinyobjloader][] | ![azurepipelines icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Tiny but powerful single file wavefront obj loader |
|
| [tinyobjloader][] | ![azurepipelines icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Tiny but powerful single file wavefront obj loader |
|
||||||
| [coverage.py][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The coverage tool for Python |
|
| [coverage.py][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The coverage tool for Python |
|
||||||
| [PyCryptodome][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A self-contained cryptographic library for Python |
|
| [PyCryptodome][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A self-contained cryptographic library for Python |
|
||||||
| [PyYAML][] | ![github icon][] | ![apple icon][] | Canonical source repository for PyYAML |
|
| [PyYAML][] | ![github icon][] | ![apple icon][] | Canonical source repository for PyYAML |
|
||||||
| [numexpr][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Fast numerical array expression evaluator for Python, NumPy, PyTables, pandas, bcolz and more |
|
|
||||||
| [Line Profiler][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Line-by-line profiling for Python |
|
| [Line Profiler][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Line-by-line profiling for Python |
|
||||||
|
| [numexpr][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Fast numerical array expression evaluator for Python, NumPy, PyTables, pandas, bcolz and more |
|
||||||
| [PyAV][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Pythonic bindings for FFmpeg's libraries. |
|
| [PyAV][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Pythonic bindings for FFmpeg's libraries. |
|
||||||
| [h5py][] | ![azurepipelines icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | HDF5 for Python -- The h5py package is a Pythonic interface to the HDF5 binary data format. |
|
| [h5py][] | ![azurepipelines icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | HDF5 for Python -- The h5py package is a Pythonic interface to the HDF5 binary data format. |
|
||||||
|
| [CTranslate2][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes libraries from the [Intel oneAPI toolkit](https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit.html) and CUDA kernels compiled for multiple GPU architectures. |
|
||||||
| [Wrapt][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python module for decorators, wrappers and monkey patching. |
|
| [Wrapt][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python module for decorators, wrappers and monkey patching. |
|
||||||
| [pikepdf][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python library for reading and writing PDF, powered by qpdf |
|
| [pikepdf][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python library for reading and writing PDF, powered by QPDF |
|
||||||
| [envd][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | 🏕️ Reproducible development environment for AI/ML |
|
| [envd][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | 🏕️ Reproducible development environment |
|
||||||
| [SimpleJSON][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | simplejson is a simple, fast, extensible JSON encoder/decoder for Python |
|
|
||||||
| [OpenColorIO][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A color management framework for visual effects and animation. |
|
| [OpenColorIO][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A color management framework for visual effects and animation. |
|
||||||
|
| [SimpleJSON][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | simplejson is a simple, fast, extensible JSON encoder/decoder for Python |
|
||||||
| [aioquic][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | QUIC and HTTP/3 implementation in Python |
|
| [aioquic][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | QUIC and HTTP/3 implementation in Python |
|
||||||
| [ruptures][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Extensive Cython + NumPy [pyproject.toml](https://github.com/deepcharles/ruptures/blob/master/pyproject.toml) example. |
|
| [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. |
|
| [OpenTimelineIO][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Open Source API and interchange format for editorial timeline information. |
|
||||||
| [CTranslate2][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes libraries from the [Intel oneAPI toolkit](https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit.html) and CUDA kernels compiled for multiple GPU architectures. |
|
|
||||||
| [PyTables][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python package to manage extremely large amounts of data |
|
| [PyTables][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python package to manage extremely large amounts of data |
|
||||||
| [Psycopg 3][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A modern implementation of a PostgreSQL adapter for Python |
|
| [Psycopg 3][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A modern implementation of a PostgreSQL adapter for Python |
|
||||||
| [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. |
|
| [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. |
|
||||||
@@ -66,18 +66,18 @@ title: Working examples
|
|||||||
| [google neuroglancer][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | WebGL-based viewer for volumetric data |
|
| [google neuroglancer][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | WebGL-based viewer for volumetric data |
|
||||||
| [AutoPy][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes a Windows Travis build. |
|
| [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 |
|
| [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 high-performance ML model serving framework, offers dynamic batching and CPU/GPU pipelines to fully exploit your compute machine |
|
||||||
| [Rtree][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Rtree: spatial index for Python GIS ¶ |
|
| [Rtree][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Rtree: spatial index for Python GIS ¶ |
|
||||||
| [mosec][] | ![github icon][] | ![linux icon][] ![apple icon][] | A high-performance serving framework for ML models, offers dynamic batching and multi-stage pipeline to fully exploit your compute machine |
|
|
||||||
| [markupsafe][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Safely add untrusted strings to HTML/XML markup. |
|
|
||||||
| [Picologging][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A high-performance logging library for Python. |
|
| [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. |
|
||||||
| [pybind11 cmake_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Example pybind11 module built with a CMake-based build system |
|
| [pybind11 cmake_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Example pybind11 module built with a CMake-based build system |
|
||||||
|
| [time-machine][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Time mocking library using only the CPython C API. |
|
||||||
| [KDEpy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Kernel Density Estimation in Python |
|
| [KDEpy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Kernel Density Estimation in Python |
|
||||||
| [python-rapidjson][] | ![travisci icon][] ![gitlab icon][] ![appveyor icon][] | ![windows icon][] ![linux icon][] | Python wrapper around rapidjson |
|
| [python-rapidjson][] | ![travisci icon][] ![gitlab icon][] ![appveyor icon][] | ![windows icon][] ![linux icon][] | Python wrapper around rapidjson |
|
||||||
| [time-machine][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Time mocking library using only the CPython C API. |
|
|
||||||
| [python-snappy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Python bindings for the snappy google library |
|
| [python-snappy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Python bindings for the snappy google library |
|
||||||
| [tgcalls][] | ![github icon][] | ![apple icon][] ![windows icon][] | Python `pybind11` binding to Telegram's WebRTC library with third party dependencies like `OpenSSL`, `MozJPEG`, `FFmpeg`, etc. |
|
| [tgcalls][] | ![github icon][] | ![apple icon][] ![windows icon][] | Python `pybind11` binding to Telegram's WebRTC library with third party dependencies like `OpenSSL`, `MozJPEG`, `FFmpeg`, etc. |
|
||||||
| [pybind11 python_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Example pybind11 module built with a Python-based build system |
|
|
||||||
| [dd-trace-py][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Uses custom alternate arch emulation on GitHub |
|
| [dd-trace-py][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Uses custom alternate arch emulation on GitHub |
|
||||||
|
| [pybind11 python_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Example pybind11 module built with a Python-based build system |
|
||||||
| [sourmash][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Quickly search, compare, and analyze genomic and metagenomic data sets. |
|
| [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 |
|
| [cyvcf2][] | ![github icon][] | ![apple icon][] ![linux icon][] | cython + htslib == fast VCF and BCF processing |
|
||||||
| [matrixprofile][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python 3 library making time series data mining tasks, utilizing matrix profile algorithms, accessible to everyone. |
|
| [matrixprofile][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python 3 library making time series data mining tasks, utilizing matrix profile algorithms, accessible to everyone. |
|
||||||
@@ -98,8 +98,8 @@ title: Working examples
|
|||||||
| [power-grid-model][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Python/C++ library for distribution power system analysis |
|
| [power-grid-model][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Python/C++ library for distribution power system analysis |
|
||||||
| [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. |
|
| [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. |
|
||||||
| [polaroid][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Full range of wheels for setuptools rust, with auto release and PyPI deploy. |
|
| [polaroid][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Full range of wheels for setuptools rust, with auto release and PyPI deploy. |
|
||||||
| [etebase-py][] | ![travisci icon][] | ![linux icon][] | Python bindings to a Rust library using `setuptools-rust`, and `sccache` for improved speed. |
|
|
||||||
| [pybind11 scikit_build_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | An example combining scikit-build and pybind11 |
|
| [pybind11 scikit_build_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | An example combining scikit-build and pybind11 |
|
||||||
|
| [etebase-py][] | ![travisci icon][] | ![linux icon][] | Python bindings to a Rust library using `setuptools-rust`, and `sccache` for improved speed. |
|
||||||
| [cf-units][] | ![github icon][] | ![apple icon][] ![linux icon][] | Units of measure as required by the Climate and Forecast (CF) Metadata Conventions |
|
| [cf-units][] | ![github icon][] | ![apple icon][] ![linux icon][] | Units of measure as required by the Climate and Forecast (CF) Metadata Conventions |
|
||||||
| [clang-format][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Scikit-build wrapper around LLVM's CMake, all platforms, generic wheels. |
|
| [clang-format][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Scikit-build wrapper around LLVM's CMake, all platforms, generic wheels. |
|
||||||
| [ninja][] | ![github icon][] ![travisci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Multitagged binary builds for all supported platforms, using cibw 2 config configuration. |
|
| [ninja][] | ![github icon][] ![travisci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Multitagged binary builds for all supported platforms, using cibw 2 config configuration. |
|
||||||
@@ -120,16 +120,16 @@ title: Working examples
|
|||||||
[Tornado]: https://github.com/tornadoweb/tornado
|
[Tornado]: https://github.com/tornadoweb/tornado
|
||||||
[Matplotlib]: https://github.com/matplotlib/matplotlib
|
[Matplotlib]: https://github.com/matplotlib/matplotlib
|
||||||
[NCNN]: https://github.com/Tencent/ncnn
|
[NCNN]: https://github.com/Tencent/ncnn
|
||||||
|
[MyPy]: https://github.com/mypyc/mypy_mypyc-wheels
|
||||||
[Prophet]: https://github.com/facebook/prophet
|
[Prophet]: https://github.com/facebook/prophet
|
||||||
[Kivy]: https://github.com/kivy/kivy
|
[Kivy]: https://github.com/kivy/kivy
|
||||||
[MyPy]: https://github.com/mypyc/mypy_mypyc-wheels
|
|
||||||
[duckdb]: https://github.com/duckdb/duckdb
|
[duckdb]: https://github.com/duckdb/duckdb
|
||||||
[MemRay]: https://github.com/bloomberg/memray
|
[MemRay]: https://github.com/bloomberg/memray
|
||||||
[uvloop]: https://github.com/MagicStack/uvloop
|
[uvloop]: https://github.com/MagicStack/uvloop
|
||||||
[psutil]: https://github.com/giampaolo/psutil
|
[psutil]: https://github.com/giampaolo/psutil
|
||||||
|
[Triton]: https://github.com/openai/triton
|
||||||
[vaex]: https://github.com/vaexio/vaex
|
[vaex]: https://github.com/vaexio/vaex
|
||||||
[Google Benchmark]: https://github.com/google/benchmark
|
[Google Benchmark]: https://github.com/google/benchmark
|
||||||
[Triton]: https://github.com/openai/triton
|
|
||||||
[Apache Beam]: https://github.com/apache/beam
|
[Apache Beam]: https://github.com/apache/beam
|
||||||
[PyGame]: https://github.com/pygame/pygame
|
[PyGame]: https://github.com/pygame/pygame
|
||||||
[asyncpg]: https://github.com/MagicStack/asyncpg
|
[asyncpg]: https://github.com/MagicStack/asyncpg
|
||||||
@@ -137,8 +137,8 @@ title: Working examples
|
|||||||
[scikit-image]: https://github.com/scikit-image/scikit-image
|
[scikit-image]: https://github.com/scikit-image/scikit-image
|
||||||
[twisted-iocpsupport]: https://github.com/twisted/twisted-iocpsupport
|
[twisted-iocpsupport]: https://github.com/twisted/twisted-iocpsupport
|
||||||
[PyOxidizer]: https://github.com/indygreg/PyOxidizer
|
[PyOxidizer]: https://github.com/indygreg/PyOxidizer
|
||||||
[websockets]: https://github.com/aaugustin/websockets
|
|
||||||
[cvxpy]: https://github.com/cvxpy/cvxpy
|
[cvxpy]: https://github.com/cvxpy/cvxpy
|
||||||
|
[websockets]: https://github.com/aaugustin/websockets
|
||||||
[River]: https://github.com/online-ml/river
|
[River]: https://github.com/online-ml/river
|
||||||
[UltraJSON]: https://github.com/ultrajson/ultrajson
|
[UltraJSON]: https://github.com/ultrajson/ultrajson
|
||||||
[OpenSpiel]: https://github.com/deepmind/open_spiel
|
[OpenSpiel]: https://github.com/deepmind/open_spiel
|
||||||
@@ -146,25 +146,25 @@ title: Working examples
|
|||||||
[pyzmq]: https://github.com/zeromq/pyzmq
|
[pyzmq]: https://github.com/zeromq/pyzmq
|
||||||
[Confluent client for Kafka]: https://github.com/confluentinc/confluent-kafka-python
|
[Confluent client for Kafka]: https://github.com/confluentinc/confluent-kafka-python
|
||||||
[Implicit]: https://github.com/benfred/implicit
|
[Implicit]: https://github.com/benfred/implicit
|
||||||
[vispy]: https://github.com/vispy/vispy
|
|
||||||
[Dependency Injector]: https://github.com/ets-labs/python-dependency-injector
|
[Dependency Injector]: https://github.com/ets-labs/python-dependency-injector
|
||||||
|
[vispy]: https://github.com/vispy/vispy
|
||||||
[tinyobjloader]: https://github.com/tinyobjloader/tinyobjloader
|
[tinyobjloader]: https://github.com/tinyobjloader/tinyobjloader
|
||||||
[coverage.py]: https://github.com/nedbat/coveragepy
|
[coverage.py]: https://github.com/nedbat/coveragepy
|
||||||
[PyCryptodome]: https://github.com/Legrandin/pycryptodome
|
[PyCryptodome]: https://github.com/Legrandin/pycryptodome
|
||||||
[PyYAML]: https://github.com/yaml/pyyaml
|
[PyYAML]: https://github.com/yaml/pyyaml
|
||||||
[numexpr]: https://github.com/pydata/numexpr
|
|
||||||
[Line Profiler]: https://github.com/pyutils/line_profiler
|
[Line Profiler]: https://github.com/pyutils/line_profiler
|
||||||
|
[numexpr]: https://github.com/pydata/numexpr
|
||||||
[PyAV]: https://github.com/PyAV-Org/PyAV
|
[PyAV]: https://github.com/PyAV-Org/PyAV
|
||||||
[h5py]: https://github.com/h5py/h5py
|
[h5py]: https://github.com/h5py/h5py
|
||||||
|
[CTranslate2]: https://github.com/OpenNMT/CTranslate2
|
||||||
[Wrapt]: https://github.com/GrahamDumpleton/wrapt
|
[Wrapt]: https://github.com/GrahamDumpleton/wrapt
|
||||||
[pikepdf]: https://github.com/pikepdf/pikepdf
|
[pikepdf]: https://github.com/pikepdf/pikepdf
|
||||||
[envd]: https://github.com/tensorchord/envd
|
[envd]: https://github.com/tensorchord/envd
|
||||||
[SimpleJSON]: https://github.com/simplejson/simplejson
|
|
||||||
[OpenColorIO]: https://github.com/AcademySoftwareFoundation/OpenColorIO
|
[OpenColorIO]: https://github.com/AcademySoftwareFoundation/OpenColorIO
|
||||||
|
[SimpleJSON]: https://github.com/simplejson/simplejson
|
||||||
[aioquic]: https://github.com/aiortc/aioquic
|
[aioquic]: https://github.com/aiortc/aioquic
|
||||||
[ruptures]: https://github.com/deepcharles/ruptures
|
[ruptures]: https://github.com/deepcharles/ruptures
|
||||||
[OpenTimelineIO]: https://github.com/PixarAnimationStudios/OpenTimelineIO
|
[OpenTimelineIO]: https://github.com/PixarAnimationStudios/OpenTimelineIO
|
||||||
[CTranslate2]: https://github.com/OpenNMT/CTranslate2
|
|
||||||
[PyTables]: https://github.com/PyTables/PyTables
|
[PyTables]: https://github.com/PyTables/PyTables
|
||||||
[Psycopg 3]: https://github.com/psycopg/psycopg
|
[Psycopg 3]: https://github.com/psycopg/psycopg
|
||||||
[Parselmouth]: https://github.com/YannickJadoul/Parselmouth
|
[Parselmouth]: https://github.com/YannickJadoul/Parselmouth
|
||||||
@@ -172,18 +172,18 @@ title: Working examples
|
|||||||
[google neuroglancer]: https://github.com/google/neuroglancer
|
[google neuroglancer]: https://github.com/google/neuroglancer
|
||||||
[AutoPy]: https://github.com/autopilot-rs/autopy
|
[AutoPy]: https://github.com/autopilot-rs/autopy
|
||||||
[H3-py]: https://github.com/uber/h3-py
|
[H3-py]: https://github.com/uber/h3-py
|
||||||
[Rtree]: https://github.com/Toblerity/rtree
|
|
||||||
[mosec]: https://github.com/mosecorg/mosec
|
[mosec]: https://github.com/mosecorg/mosec
|
||||||
[markupsafe]: https://github.com/pallets/markupsafe
|
[Rtree]: https://github.com/Toblerity/rtree
|
||||||
[Picologging]: https://github.com/microsoft/picologging
|
[Picologging]: https://github.com/microsoft/picologging
|
||||||
|
[markupsafe]: https://github.com/pallets/markupsafe
|
||||||
[pybind11 cmake_example]: https://github.com/pybind/cmake_example
|
[pybind11 cmake_example]: https://github.com/pybind/cmake_example
|
||||||
|
[time-machine]: https://github.com/adamchainz/time-machine
|
||||||
[KDEpy]: https://github.com/tommyod/KDEpy
|
[KDEpy]: https://github.com/tommyod/KDEpy
|
||||||
[python-rapidjson]: https://github.com/python-rapidjson/python-rapidjson
|
[python-rapidjson]: https://github.com/python-rapidjson/python-rapidjson
|
||||||
[time-machine]: https://github.com/adamchainz/time-machine
|
|
||||||
[python-snappy]: https://github.com/andrix/python-snappy
|
[python-snappy]: https://github.com/andrix/python-snappy
|
||||||
[tgcalls]: https://github.com/MarshalX/tgcalls
|
[tgcalls]: https://github.com/MarshalX/tgcalls
|
||||||
[pybind11 python_example]: https://github.com/pybind/python_example
|
|
||||||
[dd-trace-py]: https://github.com/DataDog/dd-trace-py
|
[dd-trace-py]: https://github.com/DataDog/dd-trace-py
|
||||||
|
[pybind11 python_example]: https://github.com/pybind/python_example
|
||||||
[sourmash]: https://github.com/dib-lab/sourmash
|
[sourmash]: https://github.com/dib-lab/sourmash
|
||||||
[cyvcf2]: https://github.com/brentp/cyvcf2
|
[cyvcf2]: https://github.com/brentp/cyvcf2
|
||||||
[matrixprofile]: https://github.com/matrix-profile-foundation/matrixprofile
|
[matrixprofile]: https://github.com/matrix-profile-foundation/matrixprofile
|
||||||
@@ -204,8 +204,8 @@ title: Working examples
|
|||||||
[power-grid-model]: https://github.com/alliander-opensource/power-grid-model
|
[power-grid-model]: https://github.com/alliander-opensource/power-grid-model
|
||||||
[Imagecodecs (fork)]: https://github.com/czaki/imagecodecs_build
|
[Imagecodecs (fork)]: https://github.com/czaki/imagecodecs_build
|
||||||
[polaroid]: https://github.com/daggy1234/polaroid
|
[polaroid]: https://github.com/daggy1234/polaroid
|
||||||
[etebase-py]: https://github.com/etesync/etebase-py
|
|
||||||
[pybind11 scikit_build_example]: https://github.com/pybind/scikit_build_example
|
[pybind11 scikit_build_example]: https://github.com/pybind/scikit_build_example
|
||||||
|
[etebase-py]: https://github.com/etesync/etebase-py
|
||||||
[cf-units]: https://github.com/SciTools/cf-units
|
[cf-units]: https://github.com/SciTools/cf-units
|
||||||
[clang-format]: https://github.com/ssciwr/clang-format-wheel
|
[clang-format]: https://github.com/ssciwr/clang-format-wheel
|
||||||
[ninja]: https://github.com/scikit-build/ninja-python-distributions
|
[ninja]: https://github.com/scikit-build/ninja-python-distributions
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ stack: python 3.7
|
|||||||
init:
|
init:
|
||||||
- cmd: set PATH=C:\Python37;C:\Python37\Scripts;%PATH%
|
- cmd: set PATH=C:\Python37;C:\Python37\Scripts;%PATH%
|
||||||
|
|
||||||
install: python -m pip install cibuildwheel==2.14.1
|
install: python -m pip install cibuildwheel==2.16.1
|
||||||
|
|
||||||
build_script: python -m cibuildwheel --output-dir wheelhouse
|
build_script: python -m cibuildwheel --output-dir wheelhouse
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ jobs:
|
|||||||
- bash: |
|
- bash: |
|
||||||
set -o errexit
|
set -o errexit
|
||||||
python3 -m pip install --upgrade pip
|
python3 -m pip install --upgrade pip
|
||||||
pip3 install cibuildwheel==2.14.1
|
pip3 install cibuildwheel==2.16.1
|
||||||
displayName: Install dependencies
|
displayName: Install dependencies
|
||||||
- bash: cibuildwheel --output-dir wheelhouse .
|
- bash: cibuildwheel --output-dir wheelhouse .
|
||||||
displayName: Build wheels
|
displayName: Build wheels
|
||||||
@@ -20,7 +20,7 @@ jobs:
|
|||||||
- bash: |
|
- bash: |
|
||||||
set -o errexit
|
set -o errexit
|
||||||
python3 -m pip install --upgrade pip
|
python3 -m pip install --upgrade pip
|
||||||
python3 -m pip install cibuildwheel==2.14.1
|
python3 -m pip install cibuildwheel==2.16.1
|
||||||
displayName: Install dependencies
|
displayName: Install dependencies
|
||||||
- bash: cibuildwheel --output-dir wheelhouse .
|
- bash: cibuildwheel --output-dir wheelhouse .
|
||||||
displayName: Build wheels
|
displayName: Build wheels
|
||||||
@@ -34,7 +34,7 @@ jobs:
|
|||||||
- bash: |
|
- bash: |
|
||||||
set -o errexit
|
set -o errexit
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install cibuildwheel==2.14.1
|
pip install cibuildwheel==2.16.1
|
||||||
displayName: Install dependencies
|
displayName: Install dependencies
|
||||||
- bash: cibuildwheel --output-dir wheelhouse .
|
- bash: cibuildwheel --output-dir wheelhouse .
|
||||||
displayName: Build wheels
|
displayName: Build wheels
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: Build the Linux wheels.
|
name: Build the Linux wheels.
|
||||||
command: |
|
command: |
|
||||||
pip3 install --user cibuildwheel==2.14.1
|
pip3 install --user cibuildwheel==2.16.1
|
||||||
cibuildwheel --output-dir wheelhouse
|
cibuildwheel --output-dir wheelhouse
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: wheelhouse/
|
path: wheelhouse/
|
||||||
@@ -28,7 +28,7 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: Build the Linux aarch64 wheels.
|
name: Build the Linux aarch64 wheels.
|
||||||
command: |
|
command: |
|
||||||
python3 -m pip install --user cibuildwheel==2.14.1
|
python3 -m pip install --user cibuildwheel==2.16.1
|
||||||
python3 -m cibuildwheel --output-dir wheelhouse
|
python3 -m cibuildwheel --output-dir wheelhouse
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: wheelhouse/
|
path: wheelhouse/
|
||||||
@@ -42,7 +42,7 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: Build the OS X wheels.
|
name: Build the OS X wheels.
|
||||||
command: |
|
command: |
|
||||||
pip3 install cibuildwheel==2.14.1
|
pip3 install cibuildwheel==2.16.1
|
||||||
cibuildwheel --output-dir wheelhouse
|
cibuildwheel --output-dir wheelhouse
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: wheelhouse/
|
path: wheelhouse/
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
build_and_store_wheels: &BUILD_AND_STORE_WHEELS
|
build_and_store_wheels: &BUILD_AND_STORE_WHEELS
|
||||||
install_cibuildwheel_script:
|
install_cibuildwheel_script:
|
||||||
- python -m pip install cibuildwheel==2.14.1
|
- python -m pip install cibuildwheel==2.16.1
|
||||||
run_cibuildwheel_script:
|
run_cibuildwheel_script:
|
||||||
- cibuildwheel
|
- cibuildwheel
|
||||||
wheels_artifacts:
|
wheels_artifacts:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
build_and_store_wheels: &BUILD_AND_STORE_WHEELS
|
build_and_store_wheels: &BUILD_AND_STORE_WHEELS
|
||||||
install_cibuildwheel_script:
|
install_cibuildwheel_script:
|
||||||
- python -m pip install cibuildwheel==2.14.1
|
- python -m pip install cibuildwheel==2.16.1
|
||||||
run_cibuildwheel_script:
|
run_cibuildwheel_script:
|
||||||
- cibuildwheel
|
- cibuildwheel
|
||||||
wheels_artifacts:
|
wheels_artifacts:
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ jobs:
|
|||||||
name: Build wheels on macos-11
|
name: Build wheels on macos-11
|
||||||
runs-on: macos-11
|
runs-on: macos-11
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build wheels
|
- name: Build wheels
|
||||||
uses: pypa/cibuildwheel@v2.14.1
|
uses: pypa/cibuildwheel@v2.16.1
|
||||||
env:
|
env:
|
||||||
CIBW_ARCHS_MACOS: x86_64 arm64
|
CIBW_ARCHS_MACOS: x86_64 arm64
|
||||||
|
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ jobs:
|
|||||||
os: [ubuntu-22.04, windows-2022, macos-11]
|
os: [ubuntu-22.04, windows-2022, macos-11]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build wheels
|
- name: Build wheels
|
||||||
uses: pypa/cibuildwheel@v2.14.1
|
uses: pypa/cibuildwheel@v2.16.1
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
@@ -32,7 +32,7 @@ jobs:
|
|||||||
name: Build source distribution
|
name: Build source distribution
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build sdist
|
- name: Build sdist
|
||||||
run: pipx run build --sdist
|
run: pipx run build --sdist
|
||||||
@@ -60,4 +60,4 @@ jobs:
|
|||||||
|
|
||||||
- uses: pypa/gh-action-pypi-publish@release/v1
|
- uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
with:
|
with:
|
||||||
# To test: repository_url: https://test.pypi.org/legacy/
|
# To test: repository-url: https://test.pypi.org/legacy/
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ jobs:
|
|||||||
os: [ubuntu-20.04, windows-2019, macos-11]
|
os: [ubuntu-20.04, windows-2019, macos-11]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build wheels
|
- name: Build wheels
|
||||||
uses: pypa/cibuildwheel@v2.14.1
|
uses: pypa/cibuildwheel@v2.16.1
|
||||||
# env:
|
# env:
|
||||||
# CIBW_SOME_OPTION: value
|
# CIBW_SOME_OPTION: value
|
||||||
# ...
|
# ...
|
||||||
|
|||||||
@@ -11,16 +11,16 @@ jobs:
|
|||||||
os: [ubuntu-20.04, windows-2019, macos-11]
|
os: [ubuntu-20.04, windows-2019, macos-11]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v3
|
||||||
with:
|
with:
|
||||||
platforms: all
|
platforms: all
|
||||||
|
|
||||||
- name: Build wheels
|
- name: Build wheels
|
||||||
uses: pypa/cibuildwheel@v2.14.1
|
uses: pypa/cibuildwheel@v2.16.1
|
||||||
env:
|
env:
|
||||||
# configure cibuildwheel to build native archs ('auto'), and some
|
# configure cibuildwheel to build native archs ('auto'), and some
|
||||||
# emulated ones
|
# emulated ones
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ linux:
|
|||||||
DOCKER_TLS_CERTDIR: ""
|
DOCKER_TLS_CERTDIR: ""
|
||||||
script:
|
script:
|
||||||
- curl -sSL https://get.docker.com/ | sh
|
- curl -sSL https://get.docker.com/ | sh
|
||||||
- python -m pip install cibuildwheel==2.14.1
|
- python -m pip install cibuildwheel==2.16.1
|
||||||
- cibuildwheel --output-dir wheelhouse
|
- cibuildwheel --output-dir wheelhouse
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
@@ -23,7 +23,7 @@ windows:
|
|||||||
before_script:
|
before_script:
|
||||||
- choco install python -y --version 3.8.6
|
- choco install python -y --version 3.8.6
|
||||||
- choco install git.install -y
|
- choco install git.install -y
|
||||||
- py -m pip install cibuildwheel==2.14.1
|
- py -m pip install cibuildwheel==2.16.1
|
||||||
script:
|
script:
|
||||||
- py -m cibuildwheel --output-dir wheelhouse --platform windows
|
- py -m cibuildwheel --output-dir wheelhouse --platform windows
|
||||||
artifacts:
|
artifacts:
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ linux:
|
|||||||
- curl -sSL https://get.docker.com/ | sh
|
- curl -sSL https://get.docker.com/ | sh
|
||||||
# Warning: This is extremely slow, be careful with how many wheels you build
|
# Warning: This is extremely slow, be careful with how many wheels you build
|
||||||
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||||
- python -m pip install cibuildwheel==2.14.1
|
- python -m pip install cibuildwheel==2.16.1
|
||||||
# Assuming your CI runner's default architecture is x86_64...
|
# Assuming your CI runner's default architecture is x86_64...
|
||||||
- cibuildwheel --output-dir wheelhouse --platform linux --archs aarch64
|
- cibuildwheel --output-dir wheelhouse --platform linux --archs aarch64
|
||||||
artifacts:
|
artifacts:
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ jobs:
|
|||||||
- ln -s /c/Python38/python.exe /c/Python38/python3.exe
|
- ln -s /c/Python38/python.exe /c/Python38/python3.exe
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- python3 -m pip install cibuildwheel==2.14.1
|
- python3 -m pip install cibuildwheel==2.16.1
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# build the wheels, put them into './dist'
|
# build the wheels, put them into './dist'
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
- ln -s /c/Python38/python.exe /c/Python38/python3.exe
|
- ln -s /c/Python38/python.exe /c/Python38/python3.exe
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- python3 -m pip install cibuildwheel==2.14.1
|
- python3 -m pip install cibuildwheel==2.16.1
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# build the wheels, put them into './wheelhouse'
|
# build the wheels, put them into './wheelhouse'
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ jobs:
|
|||||||
- stage: deploy
|
- stage: deploy
|
||||||
name: Build and deploy Linux wheels
|
name: Build and deploy Linux wheels
|
||||||
services: docker
|
services: docker
|
||||||
install: python3 -m pip install cibuildwheel==2.14.1 twine
|
install: python3 -m pip install cibuildwheel==2.16.1 twine
|
||||||
script: python3 -m cibuildwheel --output-dir wheelhouse
|
script: python3 -m cibuildwheel --output-dir wheelhouse
|
||||||
after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl
|
after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl
|
||||||
# Deploy on windows
|
# Deploy on windows
|
||||||
@@ -62,7 +62,7 @@ jobs:
|
|||||||
name: Build and deploy Windows wheels
|
name: Build and deploy Windows wheels
|
||||||
os: windows
|
os: windows
|
||||||
language: shell
|
language: shell
|
||||||
install: python3 -m pip install cibuildwheel==2.14.1 twine
|
install: python3 -m pip install cibuildwheel==2.16.1 twine
|
||||||
script: python3 -m cibuildwheel --output-dir wheelhouse
|
script: python3 -m cibuildwheel --output-dir wheelhouse
|
||||||
after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl
|
after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl
|
||||||
|
|
||||||
|
|||||||
@@ -161,3 +161,4 @@ flake8-unused-arguments.ignore-variadic-names = true
|
|||||||
|
|
||||||
[tool.ruff.per-file-ignores]
|
[tool.ruff.per-file-ignores]
|
||||||
"unit_test/*" = ["PLC1901"]
|
"unit_test/*" = ["PLC1901"]
|
||||||
|
"cibuildwheel/_compat/**.py" = ["TID251"]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = cibuildwheel
|
name = cibuildwheel
|
||||||
version = 2.14.1
|
version = 2.16.1
|
||||||
description = Build Python wheels on CI with minimal configuration.
|
description = Build Python wheels on CI with minimal configuration.
|
||||||
long_description = file: README.md
|
long_description = file: README.md
|
||||||
long_description_content_type = text/markdown
|
long_description_content_type = text/markdown
|
||||||
|
|||||||
@@ -1,7 +1,15 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
import subprocess
|
||||||
|
from typing import Generator
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
from cibuildwheel.util import detect_ci_provider
|
||||||
|
|
||||||
|
from .utils import platform
|
||||||
|
|
||||||
|
|
||||||
def pytest_addoption(parser) -> None:
|
def pytest_addoption(parser) -> None:
|
||||||
parser.addoption(
|
parser.addoption(
|
||||||
@@ -21,3 +29,25 @@ def pytest_addoption(parser) -> None:
|
|||||||
)
|
)
|
||||||
def build_frontend_env(request) -> dict[str, str]:
|
def build_frontend_env(request) -> dict[str, str]:
|
||||||
return request.param # type: ignore[no-any-return]
|
return request.param # type: ignore[no-any-return]
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture()
|
||||||
|
def docker_cleanup() -> Generator[None, None, None]:
|
||||||
|
def get_images() -> set[str]:
|
||||||
|
if detect_ci_provider() is None or platform != "linux":
|
||||||
|
return set()
|
||||||
|
images = subprocess.run(
|
||||||
|
["docker", "image", "ls", "--format", "{{json .ID}}"],
|
||||||
|
text=True,
|
||||||
|
check=True,
|
||||||
|
stdout=subprocess.PIPE,
|
||||||
|
).stdout
|
||||||
|
return {json.loads(image.strip()) for image in images.splitlines() if image.strip()}
|
||||||
|
|
||||||
|
images_before = get_images()
|
||||||
|
try:
|
||||||
|
yield
|
||||||
|
finally:
|
||||||
|
images_after = get_images()
|
||||||
|
for image in images_after - images_before:
|
||||||
|
subprocess.run(["docker", "rmi", image], check=False)
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
import subprocess
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
from . import utils
|
||||||
|
from .test_projects.c import new_c_project
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize("frontend_name", ["pip", "build"])
|
||||||
|
def test_build_frontend_args(tmp_path, capfd, frontend_name):
|
||||||
|
project = new_c_project()
|
||||||
|
project_dir = tmp_path / "project"
|
||||||
|
project.generate(project_dir)
|
||||||
|
|
||||||
|
# the build will fail because the frontend is called with '-h' - it prints the help message
|
||||||
|
with pytest.raises(subprocess.CalledProcessError):
|
||||||
|
utils.cibuildwheel_run(
|
||||||
|
project_dir,
|
||||||
|
add_env={
|
||||||
|
"CIBW_BUILD": "cp311-*",
|
||||||
|
"CIBW_BUILD_FRONTEND": f"{frontend_name}; args: -h",
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
captured = capfd.readouterr()
|
||||||
|
print(captured.out)
|
||||||
|
|
||||||
|
# check that the help message was printed
|
||||||
|
if frontend_name == "pip":
|
||||||
|
assert "Usage:" in captured.out
|
||||||
|
assert "Wheel Options:" in captured.out
|
||||||
|
else:
|
||||||
|
assert "usage:" in captured.out
|
||||||
|
assert "A simple, correct Python build frontend." in captured.out
|
||||||
@@ -23,6 +23,7 @@ dockcross_only_project = test_projects.new_c_project(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.usefixtures("docker_cleanup")
|
||||||
def test(tmp_path):
|
def test(tmp_path):
|
||||||
if utils.platform != "linux":
|
if utils.platform != "linux":
|
||||||
pytest.skip("the test is only relevant to the linux build")
|
pytest.skip("the test is only relevant to the linux build")
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ project_with_manylinux_symbols = test_projects.new_c_project(
|
|||||||
"manylinux_image",
|
"manylinux_image",
|
||||||
["manylinux1", "manylinux2010", "manylinux2014", "manylinux_2_24", "manylinux_2_28"],
|
["manylinux1", "manylinux2010", "manylinux2014", "manylinux_2_24", "manylinux_2_28"],
|
||||||
)
|
)
|
||||||
|
@pytest.mark.usefixtures("docker_cleanup")
|
||||||
def test(manylinux_image, tmp_path):
|
def test(manylinux_image, tmp_path):
|
||||||
if utils.platform != "linux":
|
if utils.platform != "linux":
|
||||||
pytest.skip("the container image test is only relevant to the linux build")
|
pytest.skip("the container image test is only relevant to the linux build")
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import textwrap
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
from . import test_projects, utils
|
||||||
|
|
||||||
|
project_with_manylinux_symbols = test_projects.new_c_project(
|
||||||
|
spam_c_top_level_add=textwrap.dedent(
|
||||||
|
r"""
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#if defined(__GLIBC_PREREQ)
|
||||||
|
#error "Must not run on a glibc linux environment"
|
||||||
|
#endif
|
||||||
|
"""
|
||||||
|
),
|
||||||
|
spam_c_function_add=textwrap.dedent(
|
||||||
|
r"""
|
||||||
|
sts = 0;
|
||||||
|
"""
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
"musllinux_image",
|
||||||
|
["musllinux_1_1", "musllinux_1_2"],
|
||||||
|
)
|
||||||
|
@pytest.mark.usefixtures("docker_cleanup")
|
||||||
|
def test(musllinux_image, tmp_path):
|
||||||
|
if utils.platform != "linux":
|
||||||
|
pytest.skip("the container image test is only relevant to the linux build")
|
||||||
|
|
||||||
|
project_dir = tmp_path / "project"
|
||||||
|
project_with_manylinux_symbols.generate(project_dir)
|
||||||
|
|
||||||
|
# build the wheels
|
||||||
|
add_env = {
|
||||||
|
"CIBW_BUILD": "*-musllinux*",
|
||||||
|
"CIBW_MUSLLINUX_X86_64_IMAGE": musllinux_image,
|
||||||
|
"CIBW_MUSLLINUX_I686_IMAGE": musllinux_image,
|
||||||
|
"CIBW_MUSLLINUX_AARCH64_IMAGE": musllinux_image,
|
||||||
|
"CIBW_MUSLLINUX_PPC64LE_IMAGE": musllinux_image,
|
||||||
|
"CIBW_MUSLLINUX_S390X_IMAGE": musllinux_image,
|
||||||
|
}
|
||||||
|
|
||||||
|
actual_wheels = utils.cibuildwheel_run(project_dir, add_env=add_env)
|
||||||
|
expected_wheels = utils.expected_wheels(
|
||||||
|
"spam",
|
||||||
|
"0.1.0",
|
||||||
|
manylinux_versions=[],
|
||||||
|
musllinux_versions=[musllinux_image],
|
||||||
|
)
|
||||||
|
assert set(actual_wheels) == set(expected_wheels)
|
||||||
+8
-7
@@ -205,13 +205,14 @@ def expected_wheels(
|
|||||||
if machine_arch == "x86_64":
|
if machine_arch == "x86_64":
|
||||||
architectures.append("i686")
|
architectures.append("i686")
|
||||||
|
|
||||||
platform_tags = [
|
if len(manylinux_versions) > 0:
|
||||||
".".join(
|
platform_tags = [
|
||||||
f"{manylinux_version}_{architecture}"
|
".".join(
|
||||||
for manylinux_version in manylinux_versions
|
f"{manylinux_version}_{architecture}"
|
||||||
)
|
for manylinux_version in manylinux_versions
|
||||||
for architecture in architectures
|
)
|
||||||
]
|
for architecture in architectures
|
||||||
|
]
|
||||||
if len(musllinux_versions) > 0 and not python_abi_tag.startswith("pp"):
|
if len(musllinux_versions) > 0 and not python_abi_tag.startswith("pp"):
|
||||||
platform_tags.extend(
|
platform_tags.extend(
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ def test_build():
|
|||||||
assert build_selector("cp37-manylinux_x86_64")
|
assert build_selector("cp37-manylinux_x86_64")
|
||||||
assert build_selector("cp310-manylinux_x86_64")
|
assert build_selector("cp310-manylinux_x86_64")
|
||||||
assert build_selector("cp311-manylinux_x86_64")
|
assert build_selector("cp311-manylinux_x86_64")
|
||||||
assert not build_selector("cp312-manylinux_x86_64")
|
assert build_selector("cp312-manylinux_x86_64")
|
||||||
assert build_selector("pp36-manylinux_x86_64")
|
assert build_selector("pp36-manylinux_x86_64")
|
||||||
assert build_selector("pp37-manylinux_x86_64")
|
assert build_selector("pp37-manylinux_x86_64")
|
||||||
assert build_selector("cp36-manylinux_i686")
|
assert build_selector("cp36-manylinux_i686")
|
||||||
@@ -32,7 +32,7 @@ def test_build():
|
|||||||
assert build_selector("cp37-win_amd64")
|
assert build_selector("cp37-win_amd64")
|
||||||
assert build_selector("cp310-win_amd64")
|
assert build_selector("cp310-win_amd64")
|
||||||
assert build_selector("cp311-win_amd64")
|
assert build_selector("cp311-win_amd64")
|
||||||
assert not build_selector("cp312-win_amd64")
|
assert build_selector("cp312-win_amd64")
|
||||||
assert not build_selector("pp36-win_amd64")
|
assert not build_selector("pp36-win_amd64")
|
||||||
assert not build_selector("pp37-win_amd64")
|
assert not build_selector("pp37-win_amd64")
|
||||||
|
|
||||||
|
|||||||
@@ -62,8 +62,9 @@ def test_linux_container_split(tmp_path: Path, monkeypatch):
|
|||||||
"cp36-manylinux_x86_64",
|
"cp36-manylinux_x86_64",
|
||||||
"cp37-manylinux_x86_64",
|
"cp37-manylinux_x86_64",
|
||||||
"cp311-manylinux_x86_64",
|
"cp311-manylinux_x86_64",
|
||||||
|
"cp312-manylinux_x86_64",
|
||||||
]
|
]
|
||||||
assert before_alls(build_steps[0]) == ["", "", ""]
|
assert before_alls(build_steps[0]) == ["", "", "", ""]
|
||||||
|
|
||||||
assert build_steps[1].container_image == "other_container_image"
|
assert build_steps[1].container_image == "other_container_image"
|
||||||
assert identifiers(build_steps[1]) == ["cp38-manylinux_x86_64", "cp310-manylinux_x86_64"]
|
assert identifiers(build_steps[1]) == ["cp38-manylinux_x86_64", "cp310-manylinux_x86_64"]
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ def test_defaults(platform, intercepted_build_args):
|
|||||||
if isinstance(repair_wheel_default, list):
|
if isinstance(repair_wheel_default, list):
|
||||||
repair_wheel_default = " && ".join(repair_wheel_default)
|
repair_wheel_default = " && ".join(repair_wheel_default)
|
||||||
assert build_options.repair_command == repair_wheel_default
|
assert build_options.repair_command == repair_wheel_default
|
||||||
assert build_options.build_frontend == defaults["build-frontend"]
|
assert build_options.build_frontend is None
|
||||||
|
|
||||||
if platform == "linux":
|
if platform == "linux":
|
||||||
assert build_options.manylinux_images
|
assert build_options.manylinux_images
|
||||||
|
|||||||
@@ -214,6 +214,7 @@ def test_only_argument(intercepted_build_args, monkeypatch, only, plat):
|
|||||||
assert options.globals.build_selector.skip_config == ""
|
assert options.globals.build_selector.skip_config == ""
|
||||||
assert options.platform == plat
|
assert options.platform == plat
|
||||||
assert options.globals.architectures == Architecture.all_archs(plat)
|
assert options.globals.architectures == Architecture.all_archs(plat)
|
||||||
|
assert options.globals.build_selector.prerelease_pythons is True
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("only", ("cp311-manylxinux_x86_64", "some_linux_thing"))
|
@pytest.mark.parametrize("only", ("cp311-manylxinux_x86_64", "some_linux_thing"))
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
import random
|
import random
|
||||||
@@ -13,33 +14,49 @@ import tomli_w
|
|||||||
|
|
||||||
from cibuildwheel.environment import EnvironmentAssignmentBash
|
from cibuildwheel.environment import EnvironmentAssignmentBash
|
||||||
from cibuildwheel.oci_container import OCIContainer, OCIContainerEngineConfig
|
from cibuildwheel.oci_container import OCIContainer, OCIContainerEngineConfig
|
||||||
|
from cibuildwheel.util import detect_ci_provider
|
||||||
|
|
||||||
# Test utilities
|
# Test utilities
|
||||||
|
|
||||||
# for these tests we use manylinux2014 images, because they're available on
|
# for these tests we use manylinux2014 images, because they're available on
|
||||||
# multi architectures and include python3.8
|
# multi architectures and include python3.8
|
||||||
|
DEFAULT_IMAGE_TEMPLATE = "quay.io/pypa/manylinux2014_{machine}:2023-09-04-0828984"
|
||||||
pm = platform.machine()
|
pm = platform.machine()
|
||||||
if pm == "x86_64":
|
if pm in {"x86_64", "ppc64le", "s390x"}:
|
||||||
DEFAULT_IMAGE = "quay.io/pypa/manylinux2014_x86_64:2020-05-17-2f8ac3b"
|
DEFAULT_IMAGE = DEFAULT_IMAGE_TEMPLATE.format(machine=pm)
|
||||||
elif pm in {"aarch64", "arm64"}:
|
elif pm in {"aarch64", "arm64"}:
|
||||||
DEFAULT_IMAGE = "quay.io/pypa/manylinux2014_aarch64:2020-05-17-2f8ac3b"
|
DEFAULT_IMAGE = DEFAULT_IMAGE_TEMPLATE.format(machine="aarch64")
|
||||||
elif pm == "ppc64le":
|
|
||||||
DEFAULT_IMAGE = "quay.io/pypa/manylinux2014_ppc64le:2020-05-17-2f8ac3b"
|
|
||||||
elif pm == "s390x":
|
|
||||||
DEFAULT_IMAGE = "quay.io/pypa/manylinux2014_s390x:2020-05-17-2f8ac3b"
|
|
||||||
else:
|
else:
|
||||||
DEFAULT_IMAGE = ""
|
DEFAULT_IMAGE = ""
|
||||||
|
|
||||||
PODMAN = OCIContainerEngineConfig(name="podman")
|
PODMAN = OCIContainerEngineConfig(name="podman")
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(params=["docker", "podman"])
|
@pytest.fixture(params=["docker", "podman"], scope="module")
|
||||||
def container_engine(request):
|
def container_engine(request):
|
||||||
if request.param == "docker" and not request.config.getoption("--run-docker"):
|
if request.param == "docker" and not request.config.getoption("--run-docker"):
|
||||||
pytest.skip("need --run-docker option to run")
|
pytest.skip("need --run-docker option to run")
|
||||||
if request.param == "podman" and not request.config.getoption("--run-podman"):
|
if request.param == "podman" and not request.config.getoption("--run-podman"):
|
||||||
pytest.skip("need --run-podman option to run")
|
pytest.skip("need --run-podman option to run")
|
||||||
return OCIContainerEngineConfig(name=request.param)
|
|
||||||
|
def get_images() -> set[str]:
|
||||||
|
if detect_ci_provider() is None:
|
||||||
|
return set()
|
||||||
|
images = subprocess.run(
|
||||||
|
[request.param, "image", "ls", "--format", "{{json .ID}}"],
|
||||||
|
text=True,
|
||||||
|
check=True,
|
||||||
|
stdout=subprocess.PIPE,
|
||||||
|
).stdout
|
||||||
|
return {json.loads(image.strip()) for image in images.splitlines() if image.strip()}
|
||||||
|
|
||||||
|
images_before = get_images()
|
||||||
|
try:
|
||||||
|
yield OCIContainerEngineConfig(name=request.param)
|
||||||
|
finally:
|
||||||
|
images_after = get_images()
|
||||||
|
for image in images_after - images_before:
|
||||||
|
subprocess.run([request.param, "rmi", image], check=False)
|
||||||
|
|
||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
@@ -72,6 +89,17 @@ def test_environment(container_engine):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def test_environment_pass(container_engine, monkeypatch):
|
||||||
|
monkeypatch.setenv("CIBUILDWHEEL", "1")
|
||||||
|
monkeypatch.setenv("SOURCE_DATE_EPOCH", "1489957071")
|
||||||
|
with OCIContainer(engine=container_engine, image=DEFAULT_IMAGE) as container:
|
||||||
|
assert container.call(["sh", "-c", "echo $CIBUILDWHEEL"], capture_output=True) == "1\n"
|
||||||
|
assert (
|
||||||
|
container.call(["sh", "-c", "echo $SOURCE_DATE_EPOCH"], capture_output=True)
|
||||||
|
== "1489957071\n"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def test_cwd(container_engine):
|
def test_cwd(container_engine):
|
||||||
with OCIContainer(
|
with OCIContainer(
|
||||||
engine=container_engine, image=DEFAULT_IMAGE, cwd="/cibuildwheel/working_directory"
|
engine=container_engine, image=DEFAULT_IMAGE, cwd="/cibuildwheel/working_directory"
|
||||||
@@ -221,10 +249,9 @@ def test_environment_executor(container_engine):
|
|||||||
assert assignment.evaluated_value({}, container.environment_executor) == "42"
|
assert assignment.evaluated_value({}, container.environment_executor) == "42"
|
||||||
|
|
||||||
|
|
||||||
def test_podman_vfs(tmp_path: Path, monkeypatch, request):
|
def test_podman_vfs(tmp_path: Path, monkeypatch, container_engine):
|
||||||
# Tests podman VFS, for the podman in docker use-case
|
if container_engine.name != "podman":
|
||||||
if not request.config.getoption("--run-podman"):
|
pytest.skip("only runs with podman")
|
||||||
pytest.skip("need --run-podman option to run")
|
|
||||||
|
|
||||||
# create the VFS configuration
|
# create the VFS configuration
|
||||||
vfs_path = tmp_path / "podman_vfs"
|
vfs_path = tmp_path / "podman_vfs"
|
||||||
@@ -300,9 +327,9 @@ def test_podman_vfs(tmp_path: Path, monkeypatch, request):
|
|||||||
subprocess.run(["podman", "unshare", "rm", "-rf", vfs_path], check=True)
|
subprocess.run(["podman", "unshare", "rm", "-rf", vfs_path], check=True)
|
||||||
|
|
||||||
|
|
||||||
def test_create_args_volume(tmp_path: Path, request):
|
def test_create_args_volume(tmp_path: Path, container_engine):
|
||||||
if not request.config.getoption("--run-docker"):
|
if container_engine.name != "docker":
|
||||||
pytest.skip("need --run-docker option to run")
|
pytest.skip("only runs with docker")
|
||||||
|
|
||||||
if "CIRCLECI" in os.environ or "GITLAB_CI" in os.environ:
|
if "CIRCLECI" in os.environ or "GITLAB_CI" in os.environ:
|
||||||
pytest.skip(
|
pytest.skip(
|
||||||
@@ -367,3 +394,24 @@ def test_parse_engine_config(config, name, create_args):
|
|||||||
engine_config = OCIContainerEngineConfig.from_config_string(config)
|
engine_config = OCIContainerEngineConfig.from_config_string(config)
|
||||||
assert engine_config.name == name
|
assert engine_config.name == name
|
||||||
assert engine_config.create_args == create_args
|
assert engine_config.create_args == create_args
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(pm != "x86_64", reason="Only runs on x86_64")
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
("image", "shell_args"),
|
||||||
|
[
|
||||||
|
(DEFAULT_IMAGE_TEMPLATE.format(machine="i686"), ["/bin/bash"]),
|
||||||
|
(DEFAULT_IMAGE_TEMPLATE.format(machine="x86_64"), ["linux32", "/bin/bash"]),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
def test_enforce_32_bit(container_engine, image, shell_args):
|
||||||
|
with OCIContainer(engine=container_engine, image=image, enforce_32_bit=True) as container:
|
||||||
|
assert container.call(["uname", "-m"], capture_output=True).strip() == "i686"
|
||||||
|
container_args = subprocess.run(
|
||||||
|
f"{container.engine.name} inspect -f '{{{{json .Args }}}}' {container.name}",
|
||||||
|
shell=True,
|
||||||
|
check=True,
|
||||||
|
stdout=subprocess.PIPE,
|
||||||
|
text=True,
|
||||||
|
).stdout
|
||||||
|
assert json.loads(container_args) == shell_args
|
||||||
|
|||||||
@@ -13,7 +13,19 @@ import pytest
|
|||||||
from cibuildwheel import linux, util
|
from cibuildwheel import linux, util
|
||||||
from cibuildwheel.__main__ import main
|
from cibuildwheel.__main__ import main
|
||||||
|
|
||||||
ALL_IDS = {"cp36", "cp37", "cp38", "cp39", "cp310", "cp311", "pp37", "pp38", "pp39", "pp310"}
|
ALL_IDS = {
|
||||||
|
"cp36",
|
||||||
|
"cp37",
|
||||||
|
"cp38",
|
||||||
|
"cp39",
|
||||||
|
"cp310",
|
||||||
|
"cp311",
|
||||||
|
"cp312",
|
||||||
|
"pp37",
|
||||||
|
"pp38",
|
||||||
|
"pp39",
|
||||||
|
"pp310",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture()
|
@pytest.fixture()
|
||||||
@@ -60,7 +72,7 @@ def test_build_default_launches(monkeypatch):
|
|||||||
kwargs = build_in_container.call_args_list[0][1]
|
kwargs = build_in_container.call_args_list[0][1]
|
||||||
assert "quay.io/pypa/manylinux2014_x86_64" in kwargs["container"]["image"]
|
assert "quay.io/pypa/manylinux2014_x86_64" in kwargs["container"]["image"]
|
||||||
assert kwargs["container"]["cwd"] == PurePosixPath("/project")
|
assert kwargs["container"]["cwd"] == PurePosixPath("/project")
|
||||||
assert not kwargs["container"]["simulate_32_bit"]
|
assert not kwargs["container"]["enforce_32_bit"]
|
||||||
|
|
||||||
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
||||||
assert identifiers == {f"{x}-manylinux_x86_64" for x in ALL_IDS}
|
assert identifiers == {f"{x}-manylinux_x86_64" for x in ALL_IDS}
|
||||||
@@ -68,7 +80,7 @@ def test_build_default_launches(monkeypatch):
|
|||||||
kwargs = build_in_container.call_args_list[1][1]
|
kwargs = build_in_container.call_args_list[1][1]
|
||||||
assert "quay.io/pypa/manylinux2014_i686" in kwargs["container"]["image"]
|
assert "quay.io/pypa/manylinux2014_i686" in kwargs["container"]["image"]
|
||||||
assert kwargs["container"]["cwd"] == PurePosixPath("/project")
|
assert kwargs["container"]["cwd"] == PurePosixPath("/project")
|
||||||
assert kwargs["container"]["simulate_32_bit"]
|
assert kwargs["container"]["enforce_32_bit"]
|
||||||
|
|
||||||
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
||||||
assert identifiers == {f"{x}-manylinux_i686" for x in ALL_IDS}
|
assert identifiers == {f"{x}-manylinux_i686" for x in ALL_IDS}
|
||||||
@@ -76,7 +88,7 @@ def test_build_default_launches(monkeypatch):
|
|||||||
kwargs = build_in_container.call_args_list[2][1]
|
kwargs = build_in_container.call_args_list[2][1]
|
||||||
assert "quay.io/pypa/musllinux_1_1_x86_64" in kwargs["container"]["image"]
|
assert "quay.io/pypa/musllinux_1_1_x86_64" in kwargs["container"]["image"]
|
||||||
assert kwargs["container"]["cwd"] == PurePosixPath("/project")
|
assert kwargs["container"]["cwd"] == PurePosixPath("/project")
|
||||||
assert not kwargs["container"]["simulate_32_bit"]
|
assert not kwargs["container"]["enforce_32_bit"]
|
||||||
|
|
||||||
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
||||||
assert identifiers == {
|
assert identifiers == {
|
||||||
@@ -86,7 +98,7 @@ def test_build_default_launches(monkeypatch):
|
|||||||
kwargs = build_in_container.call_args_list[3][1]
|
kwargs = build_in_container.call_args_list[3][1]
|
||||||
assert "quay.io/pypa/musllinux_1_1_i686" in kwargs["container"]["image"]
|
assert "quay.io/pypa/musllinux_1_1_i686" in kwargs["container"]["image"]
|
||||||
assert kwargs["container"]["cwd"] == PurePosixPath("/project")
|
assert kwargs["container"]["cwd"] == PurePosixPath("/project")
|
||||||
assert kwargs["container"]["simulate_32_bit"]
|
assert kwargs["container"]["enforce_32_bit"]
|
||||||
|
|
||||||
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
||||||
assert identifiers == {f"{x}-musllinux_i686" for x in ALL_IDS if "pp" not in x}
|
assert identifiers == {f"{x}-musllinux_i686" for x in ALL_IDS if "pp" not in x}
|
||||||
@@ -101,13 +113,15 @@ def test_build_with_override_launches(monkeypatch, tmp_path):
|
|||||||
cibw_toml.write_text(
|
cibw_toml.write_text(
|
||||||
"""
|
"""
|
||||||
[tool.cibuildwheel]
|
[tool.cibuildwheel]
|
||||||
manylinux-x86_64-image = "manylinux_2_24"
|
manylinux-x86_64-image = "manylinux_2_28"
|
||||||
|
musllinux-x86_64-image = "musllinux_1_2"
|
||||||
|
|
||||||
# Before Python 3.10, use manylinux2014
|
# Before Python 3.10, use manylinux2014, musllinux_1_1
|
||||||
[[tool.cibuildwheel.overrides]]
|
[[tool.cibuildwheel.overrides]]
|
||||||
select = "cp3?-*"
|
select = "cp3?-*"
|
||||||
manylinux-x86_64-image = "manylinux2014"
|
manylinux-x86_64-image = "manylinux2014"
|
||||||
manylinux-i686-image = "manylinux2014"
|
manylinux-i686-image = "manylinux2014"
|
||||||
|
musllinux-x86_64-image = "musllinux_1_1"
|
||||||
|
|
||||||
[[tool.cibuildwheel.overrides]]
|
[[tool.cibuildwheel.overrides]]
|
||||||
select = "cp36-manylinux_x86_64"
|
select = "cp36-manylinux_x86_64"
|
||||||
@@ -122,12 +136,12 @@ before-all = "true"
|
|||||||
|
|
||||||
build_in_container = typing.cast(mock.Mock, linux.build_in_container)
|
build_in_container = typing.cast(mock.Mock, linux.build_in_container)
|
||||||
|
|
||||||
assert build_in_container.call_count == 6
|
assert build_in_container.call_count == 7
|
||||||
|
|
||||||
kwargs = build_in_container.call_args_list[0][1]
|
kwargs = build_in_container.call_args_list[0][1]
|
||||||
assert "quay.io/pypa/manylinux2014_x86_64" in kwargs["container"]["image"]
|
assert "quay.io/pypa/manylinux2014_x86_64" in kwargs["container"]["image"]
|
||||||
assert kwargs["container"]["cwd"] == PurePosixPath("/project")
|
assert kwargs["container"]["cwd"] == PurePosixPath("/project")
|
||||||
assert not kwargs["container"]["simulate_32_bit"]
|
assert not kwargs["container"]["enforce_32_bit"]
|
||||||
|
|
||||||
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
||||||
assert identifiers == {"cp36-manylinux_x86_64"}
|
assert identifiers == {"cp36-manylinux_x86_64"}
|
||||||
@@ -136,28 +150,29 @@ before-all = "true"
|
|||||||
kwargs = build_in_container.call_args_list[1][1]
|
kwargs = build_in_container.call_args_list[1][1]
|
||||||
assert "quay.io/pypa/manylinux2014_x86_64" in kwargs["container"]["image"]
|
assert "quay.io/pypa/manylinux2014_x86_64" in kwargs["container"]["image"]
|
||||||
assert kwargs["container"]["cwd"] == PurePosixPath("/project")
|
assert kwargs["container"]["cwd"] == PurePosixPath("/project")
|
||||||
assert not kwargs["container"]["simulate_32_bit"]
|
assert not kwargs["container"]["enforce_32_bit"]
|
||||||
|
|
||||||
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
||||||
assert identifiers == {
|
assert identifiers == {
|
||||||
f"{x}-manylinux_x86_64"
|
f"{x}-manylinux_x86_64"
|
||||||
for x in ALL_IDS - {"cp36", "cp310", "cp311", "pp37", "pp38", "pp39", "pp310"}
|
for x in ALL_IDS - {"cp36", "cp310", "cp311", "cp312", "pp37", "pp38", "pp39", "pp310"}
|
||||||
}
|
}
|
||||||
assert kwargs["options"].build_options("cp37-manylinux_x86_64").before_all == ""
|
assert kwargs["options"].build_options("cp37-manylinux_x86_64").before_all == ""
|
||||||
|
|
||||||
kwargs = build_in_container.call_args_list[2][1]
|
kwargs = build_in_container.call_args_list[2][1]
|
||||||
assert "quay.io/pypa/manylinux_2_24_x86_64" in kwargs["container"]["image"]
|
assert "quay.io/pypa/manylinux_2_28_x86_64" in kwargs["container"]["image"]
|
||||||
assert kwargs["container"]["cwd"] == PurePosixPath("/project")
|
assert kwargs["container"]["cwd"] == PurePosixPath("/project")
|
||||||
assert not kwargs["container"]["simulate_32_bit"]
|
assert not kwargs["container"]["enforce_32_bit"]
|
||||||
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
||||||
assert identifiers == {
|
assert identifiers == {
|
||||||
f"{x}-manylinux_x86_64" for x in ["cp310", "cp311", "pp37", "pp38", "pp39", "pp310"]
|
f"{x}-manylinux_x86_64"
|
||||||
|
for x in ["cp310", "cp311", "cp312", "pp37", "pp38", "pp39", "pp310"]
|
||||||
}
|
}
|
||||||
|
|
||||||
kwargs = build_in_container.call_args_list[3][1]
|
kwargs = build_in_container.call_args_list[3][1]
|
||||||
assert "quay.io/pypa/manylinux2014_i686" in kwargs["container"]["image"]
|
assert "quay.io/pypa/manylinux2014_i686" in kwargs["container"]["image"]
|
||||||
assert kwargs["container"]["cwd"] == PurePosixPath("/project")
|
assert kwargs["container"]["cwd"] == PurePosixPath("/project")
|
||||||
assert kwargs["container"]["simulate_32_bit"]
|
assert kwargs["container"]["enforce_32_bit"]
|
||||||
|
|
||||||
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
||||||
assert identifiers == {f"{x}-manylinux_i686" for x in ALL_IDS}
|
assert identifiers == {f"{x}-manylinux_i686" for x in ALL_IDS}
|
||||||
@@ -165,17 +180,26 @@ before-all = "true"
|
|||||||
kwargs = build_in_container.call_args_list[4][1]
|
kwargs = build_in_container.call_args_list[4][1]
|
||||||
assert "quay.io/pypa/musllinux_1_1_x86_64" in kwargs["container"]["image"]
|
assert "quay.io/pypa/musllinux_1_1_x86_64" in kwargs["container"]["image"]
|
||||||
assert kwargs["container"]["cwd"] == PurePosixPath("/project")
|
assert kwargs["container"]["cwd"] == PurePosixPath("/project")
|
||||||
assert not kwargs["container"]["simulate_32_bit"]
|
assert not kwargs["container"]["enforce_32_bit"]
|
||||||
|
|
||||||
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
||||||
assert identifiers == {
|
assert identifiers == {
|
||||||
f"{x}-musllinux_x86_64" for x in ALL_IDS for x in ALL_IDS if "pp" not in x
|
f"{x}-musllinux_x86_64" for x in ALL_IDS & {"cp36", "cp37", "cp38", "cp39"} if "pp" not in x
|
||||||
}
|
}
|
||||||
|
|
||||||
kwargs = build_in_container.call_args_list[5][1]
|
kwargs = build_in_container.call_args_list[5][1]
|
||||||
|
assert "quay.io/pypa/musllinux_1_2_x86_64" in kwargs["container"]["image"]
|
||||||
|
assert kwargs["container"]["cwd"] == PurePosixPath("/project")
|
||||||
|
assert not kwargs["container"]["enforce_32_bit"]
|
||||||
|
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
||||||
|
assert identifiers == {
|
||||||
|
f"{x}-musllinux_x86_64" for x in ALL_IDS - {"cp36", "cp37", "cp38", "cp39"} if "pp" not in x
|
||||||
|
}
|
||||||
|
|
||||||
|
kwargs = build_in_container.call_args_list[6][1]
|
||||||
assert "quay.io/pypa/musllinux_1_1_i686" in kwargs["container"]["image"]
|
assert "quay.io/pypa/musllinux_1_1_i686" in kwargs["container"]["image"]
|
||||||
assert kwargs["container"]["cwd"] == PurePosixPath("/project")
|
assert kwargs["container"]["cwd"] == PurePosixPath("/project")
|
||||||
assert kwargs["container"]["simulate_32_bit"]
|
assert kwargs["container"]["enforce_32_bit"]
|
||||||
|
|
||||||
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
||||||
assert identifiers == {f"{x}-musllinux_i686" for x in ALL_IDS if "pp" not in x}
|
assert identifiers == {f"{x}-musllinux_i686" for x in ALL_IDS if "pp" not in x}
|
||||||
|
|||||||
@@ -253,3 +253,57 @@ def test_container_engine_option(tmp_path: Path, toml_assignment, result_name, r
|
|||||||
|
|
||||||
assert parsed_container_engine.name == result_name
|
assert parsed_container_engine.name == result_name
|
||||||
assert parsed_container_engine.create_args == result_create_args
|
assert parsed_container_engine.create_args == result_create_args
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
("toml_assignment", "result_name", "result_args"),
|
||||||
|
[
|
||||||
|
(
|
||||||
|
"",
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
'build-frontend = "build"',
|
||||||
|
"build",
|
||||||
|
[],
|
||||||
|
),
|
||||||
|
(
|
||||||
|
'build-frontend = {name = "build"}',
|
||||||
|
"build",
|
||||||
|
[],
|
||||||
|
),
|
||||||
|
(
|
||||||
|
'build-frontend = "pip; args: --some-option"',
|
||||||
|
"pip",
|
||||||
|
["--some-option"],
|
||||||
|
),
|
||||||
|
(
|
||||||
|
'build-frontend = {name = "pip", args = ["--some-option"]}',
|
||||||
|
"pip",
|
||||||
|
["--some-option"],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
def test_build_frontend_option(tmp_path: Path, toml_assignment, result_name, result_args):
|
||||||
|
args = CommandLineArguments.defaults()
|
||||||
|
args.package_dir = tmp_path
|
||||||
|
|
||||||
|
tmp_path.joinpath("pyproject.toml").write_text(
|
||||||
|
textwrap.dedent(
|
||||||
|
f"""\
|
||||||
|
[tool.cibuildwheel]
|
||||||
|
{toml_assignment}
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
options = Options(platform="linux", command_line_arguments=args, env={})
|
||||||
|
parsed_build_frontend = options.build_options(identifier=None).build_frontend
|
||||||
|
|
||||||
|
if toml_assignment:
|
||||||
|
assert parsed_build_frontend is not None
|
||||||
|
assert parsed_build_frontend.name == result_name
|
||||||
|
assert parsed_build_frontend.args == result_args
|
||||||
|
else:
|
||||||
|
assert parsed_build_frontend is None
|
||||||
|
|||||||
@@ -26,6 +26,72 @@ def test_read_setup_py_simple(tmp_path):
|
|||||||
assert get_requires_python_str(tmp_path) == "1.23"
|
assert get_requires_python_str(tmp_path) == "1.23"
|
||||||
|
|
||||||
|
|
||||||
|
def test_read_setup_py_if_main(tmp_path):
|
||||||
|
with open(tmp_path / "setup.py", "w") as f:
|
||||||
|
f.write(
|
||||||
|
dedent(
|
||||||
|
"""
|
||||||
|
from setuptools import setup
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
setup(
|
||||||
|
name = "hello",
|
||||||
|
other = 23,
|
||||||
|
example = ["item", "other"],
|
||||||
|
python_requires = "1.23",
|
||||||
|
)
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
assert setup_py_python_requires(tmp_path.joinpath("setup.py").read_text()) == "1.23"
|
||||||
|
assert get_requires_python_str(tmp_path) == "1.23"
|
||||||
|
|
||||||
|
|
||||||
|
def test_read_setup_py_if_main_reversed(tmp_path):
|
||||||
|
with open(tmp_path / "setup.py", "w") as f:
|
||||||
|
f.write(
|
||||||
|
dedent(
|
||||||
|
"""
|
||||||
|
from setuptools import setup
|
||||||
|
|
||||||
|
if "__main__" == __name__:
|
||||||
|
setup(
|
||||||
|
name = "hello",
|
||||||
|
other = 23,
|
||||||
|
example = ["item", "other"],
|
||||||
|
python_requires = "1.23",
|
||||||
|
)
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
assert setup_py_python_requires(tmp_path.joinpath("setup.py").read_text()) == "1.23"
|
||||||
|
assert get_requires_python_str(tmp_path) == "1.23"
|
||||||
|
|
||||||
|
|
||||||
|
def test_read_setup_py_if_invalid(tmp_path):
|
||||||
|
with open(tmp_path / "setup.py", "w") as f:
|
||||||
|
f.write(
|
||||||
|
dedent(
|
||||||
|
"""
|
||||||
|
from setuptools import setup
|
||||||
|
|
||||||
|
if True:
|
||||||
|
setup(
|
||||||
|
name = "hello",
|
||||||
|
other = 23,
|
||||||
|
example = ["item", "other"],
|
||||||
|
python_requires = "1.23",
|
||||||
|
)
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
assert not setup_py_python_requires(tmp_path.joinpath("setup.py").read_text())
|
||||||
|
assert not get_requires_python_str(tmp_path)
|
||||||
|
|
||||||
|
|
||||||
def test_read_setup_py_full(tmp_path):
|
def test_read_setup_py_full(tmp_path):
|
||||||
with open(tmp_path / "setup.py", "w", encoding="utf8") as f:
|
with open(tmp_path / "setup.py", "w", encoding="utf8") as f:
|
||||||
f.write(
|
f.write(
|
||||||
|
|||||||
Reference in New Issue
Block a user