Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fff9ec32ed | ||
|
|
f4291e7492 | ||
|
|
9da4ede616 | ||
|
|
77d3a5f98e | ||
|
|
9535d168fa | ||
|
|
70fae8d0b7 | ||
|
|
7699db3017 | ||
|
|
6dceb29008 | ||
|
|
035f5a2297 | ||
|
|
951d453a2e | ||
|
|
b05d91ee01 | ||
|
|
cbffaf76d2 | ||
|
|
46a7bf14dc | ||
|
|
1e2942dd68 | ||
|
|
de4fe44dc8 | ||
|
|
96e0efe076 | ||
|
|
84ffe27f78 | ||
|
|
129137d894 | ||
|
|
35a8d6486e | ||
|
|
74c99e0d93 | ||
|
|
86248929ed | ||
|
|
5fee29256d | ||
|
|
d4af0ac229 | ||
|
|
7da7df1efc | ||
|
|
9deb1b6794 | ||
|
|
271c5fe6e4 | ||
|
|
c716cfaeb8 | ||
|
|
28ad6e4b40 | ||
|
|
13599a1a10 | ||
|
|
a1bebe5362 | ||
|
|
687981060f | ||
|
|
29cb13893f | ||
|
|
099d397aee | ||
|
|
d7a6d04353 | ||
|
|
72222654f4 | ||
|
|
7a8b8012ff | ||
|
|
0ccf1dc016 | ||
|
|
ba11212a13 | ||
|
|
6d0890e7e0 | ||
|
|
cf7586ce7e | ||
|
|
137dc1a2cf | ||
|
|
1646b08659 | ||
|
|
a873dd9cbf | ||
|
|
e8ba0d49ed | ||
|
|
f0feaffbaa | ||
|
|
80a54b0226 | ||
|
|
76dba0b9ba | ||
|
|
391249a1ca | ||
|
|
0954ffaa65 | ||
|
|
753cbd1ca5 | ||
|
|
825d89818a | ||
|
|
62a06d28b5 | ||
|
|
647b509c74 | ||
|
|
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 | ||
|
|
f21bb8376a | ||
|
|
a5b2e543e5 | ||
|
|
bd9675d05b | ||
|
|
661ba2d0de | ||
|
|
66b46d0868 | ||
|
|
b0a5c951f5 | ||
|
|
f5960020cd | ||
|
|
8bfc92df50 | ||
|
|
9afee48243 | ||
|
|
7f6fe8a031 | ||
|
|
c824c7e87a | ||
|
|
f44d2784f8 | ||
|
|
740f081606 | ||
|
|
8c6ff25315 | ||
|
|
b77cedba39 | ||
|
|
6415878631 | ||
|
|
ac34701e98 | ||
|
|
4b19db8454 | ||
|
|
af42be1f3b | ||
|
|
aeb0a3ee83 | ||
|
|
33f02f2e1d | ||
|
|
062a745fc9 | ||
|
|
b8a3cfa4f9 | ||
|
|
cee0848b49 | ||
|
|
2b769c9052 | ||
|
|
8f569c42ec | ||
|
|
28b03782f8 | ||
|
|
5ef9f081bd | ||
|
|
1ce209198a | ||
|
|
3192cdcbfa | ||
|
|
983347f370 | ||
|
|
b1929b7eaf | ||
|
|
0a7800c9d9 | ||
|
|
43cb682c24 | ||
|
|
c9e0981955 | ||
|
|
aae0524f8a | ||
|
|
ada476e3c1 | ||
|
|
0ecddd92b6 | ||
|
|
f35d309173 | ||
|
|
3160e8dbca | ||
|
|
012ae48172 | ||
|
|
1c3b8e112e | ||
|
|
ca7b0f75c6 | ||
|
|
8d126bc281 | ||
|
|
2ca5ff2dcd | ||
|
|
7d45cf3dac | ||
|
|
f6edc817df | ||
|
|
3fa6615e92 | ||
|
|
d9ca5fa476 | ||
|
|
89aea5681c | ||
|
|
dd4c36f68a | ||
|
|
3cf96726f6 | ||
|
|
ed320412b0 | ||
|
|
567fe2a923 | ||
|
|
c7643f08e7 | ||
|
|
96cffc2c7c | ||
|
|
cc0bb5da34 | ||
|
|
5be1d17d5f |
@@ -1,3 +1,5 @@
|
||||
skip: changesIncludeOnly('docs/*', '.pre-commit-config.yaml')
|
||||
|
||||
run_tests: &RUN_TESTS
|
||||
install_cibuildwheel_script:
|
||||
- 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:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build SDist and wheel
|
||||
run: pipx run build
|
||||
|
||||
@@ -7,6 +7,7 @@ on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- .pre-commit-config.yaml
|
||||
workflow_dispatch:
|
||||
# allow manual runs on branches without a PR
|
||||
|
||||
@@ -19,7 +20,7 @@ jobs:
|
||||
name: Linters (mypy, flake8, etc.)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.x"
|
||||
@@ -41,10 +42,10 @@ jobs:
|
||||
python_version: ['3.11']
|
||||
include:
|
||||
- os: ubuntu-22.04
|
||||
python_version: '3.7'
|
||||
python_version: '3.8'
|
||||
timeout-minutes: 180
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v4
|
||||
name: Install Python ${{ matrix.python_version }}
|
||||
with:
|
||||
@@ -61,6 +62,13 @@ jobs:
|
||||
sudo apt-get update
|
||||
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
|
||||
run: |
|
||||
python -m pip install ".[test]"
|
||||
@@ -92,7 +100,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 180
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.x"
|
||||
@@ -102,7 +110,7 @@ jobs:
|
||||
|
||||
- name: Set up QEMU
|
||||
id: qemu
|
||||
uses: docker/setup-qemu-action@v2
|
||||
uses: docker/setup-qemu-action@v3
|
||||
with:
|
||||
platforms: all
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
if: github.repository_owner == 'pypa' || github.event_name != 'schedule'
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: wntrblm/nox@2023.04.22
|
||||
with:
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
|
||||
# we use this step to grab a Github App auth token, so that PRs generated by this workflow
|
||||
# run the GHA tests.
|
||||
- uses: tibdex/github-app-token@v1
|
||||
- uses: tibdex/github-app-token@v2
|
||||
id: generate-token
|
||||
if: github.ref == 'refs/heads/main' && github.repository == 'pypa/cibuildwheel'
|
||||
with:
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
name: Update the vX.Y tag
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [released]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
TAG_NAME:
|
||||
description: 'Tag name that the major.minor tag will point to'
|
||||
required: true
|
||||
|
||||
env:
|
||||
TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
|
||||
|
||||
jobs:
|
||||
update_tag:
|
||||
name: Update the major.minor tag to include the ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} changes
|
||||
environment:
|
||||
name: releaseNewActionVersion
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Update the ${{ env.TAG_NAME }} tag
|
||||
id: update-major-minor-tag
|
||||
uses: joerick/update-vX.Y-tag-action@v1.0
|
||||
with:
|
||||
source-tag: ${{ env.TAG_NAME }}
|
||||
+16
-15
@@ -13,33 +13,34 @@ repos:
|
||||
- id: mixed-line-ending
|
||||
- id: trailing-whitespace
|
||||
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 23.3.0
|
||||
- repo: https://github.com/psf/black-pre-commit-mirror
|
||||
rev: 23.9.1
|
||||
hooks:
|
||||
- id: black
|
||||
|
||||
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
||||
rev: v0.0.269
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.0.292
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: ["--fix", "--show-fixes"]
|
||||
|
||||
- repo: https://github.com/asottile/setup-cfg-fmt
|
||||
rev: v2.2.0
|
||||
rev: v2.5.0
|
||||
hooks:
|
||||
- id: setup-cfg-fmt
|
||||
args: [--include-version-classifiers, --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
|
||||
rev: v1.3.0
|
||||
rev: v1.5.1
|
||||
hooks:
|
||||
- id: mypy
|
||||
name: mypy 3.7 on cibuildwheel/
|
||||
exclude: ^cibuildwheel/resources/.*py$
|
||||
args: ["--python-version=3.7"]
|
||||
name: mypy 3.8 on cibuildwheel/
|
||||
exclude: ^cibuildwheel/resources/.*py|bin/generate_schema.py$
|
||||
args: ["--python-version=3.8"]
|
||||
additional_dependencies: &mypy-dependencies
|
||||
- bracex
|
||||
- nox
|
||||
- packaging~=21.0
|
||||
- packaging
|
||||
- pygithub
|
||||
- rich
|
||||
- tomli
|
||||
@@ -49,7 +50,7 @@ repos:
|
||||
- types-jinja2
|
||||
- types-pyyaml
|
||||
- types-requests
|
||||
- bracex
|
||||
- validate-pyproject
|
||||
- id: mypy
|
||||
name: mypy 3.11
|
||||
exclude: ^cibuildwheel/resources/.*py$
|
||||
@@ -57,7 +58,7 @@ repos:
|
||||
additional_dependencies: *mypy-dependencies
|
||||
|
||||
- repo: https://github.com/shellcheck-py/shellcheck-py
|
||||
rev: v0.9.0.2
|
||||
rev: v0.9.0.6
|
||||
hooks:
|
||||
- id: shellcheck
|
||||
|
||||
@@ -77,8 +78,8 @@ repos:
|
||||
files: ^docs/changelog.md$
|
||||
|
||||
- repo: https://github.com/codespell-project/codespell
|
||||
rev: v2.2.4
|
||||
rev: v2.2.6
|
||||
hooks:
|
||||
- id: codespell
|
||||
args: ["-L", "sur"]
|
||||
args: ["-L", "sur", "-w"]
|
||||
exclude: ^docs/working-examples\.md$ # Autogenerated
|
||||
|
||||
+7
-3
@@ -2,13 +2,17 @@
|
||||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
||||
version: 2
|
||||
|
||||
mkdocs:
|
||||
configuration: mkdocs.yml
|
||||
build:
|
||||
os: ubuntu-22.04
|
||||
tools:
|
||||
python: "3.11"
|
||||
|
||||
python:
|
||||
version: 3.8
|
||||
install:
|
||||
- method: pip
|
||||
path: .
|
||||
extra_requirements:
|
||||
- docs
|
||||
|
||||
mkdocs:
|
||||
configuration: mkdocs.yml
|
||||
|
||||
+11
-13
@@ -8,21 +8,21 @@ branches:
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- name: Linux | x86_64 + i686 | Python 3.7
|
||||
python: 3.7
|
||||
- name: Linux | x86_64 + i686 | Python 3.9
|
||||
python: 3.9
|
||||
services: docker
|
||||
env: PYTHON=python
|
||||
|
||||
- name: Linux | arm64 | Python 3.7
|
||||
python: 3.7
|
||||
- name: Linux | arm64 | Python 3.9
|
||||
python: 3.9
|
||||
services: docker
|
||||
arch: arm64-graviton2
|
||||
group: edge
|
||||
virt: vm
|
||||
env: PYTHON=python
|
||||
|
||||
- name: Linux | ppc64le | Python 3.7
|
||||
python: 3.7
|
||||
- name: Linux | ppc64le | Python 3.9
|
||||
python: 3.9
|
||||
services: docker
|
||||
arch: ppc64le
|
||||
allow_failure: True
|
||||
@@ -32,18 +32,16 @@ jobs:
|
||||
# c.f. https://travis-ci.community/t/running-out-of-disk-space-quota-when-using-docker-on-ppc64le/11634
|
||||
- PYTEST_ADDOPTS='-k "not test_manylinuxXXXX_only"'
|
||||
|
||||
- name: Windows | x86_64 | Python 3.7
|
||||
- name: Windows | x86_64 | Python 3.9
|
||||
os: windows
|
||||
language: shell
|
||||
before_install:
|
||||
- choco upgrade python3 -y --version 3.7.9 --limit-output
|
||||
# Update root certificates to fix SSL error; see http://www.chawn.com/RootCerts.htm
|
||||
- powershell "md C:\temp\certs; CertUtil -generateSSTFromWU C:\temp\certs\RootStore.sst; Get-ChildItem -Path C:\\temp\certs\Rootstore.sst | Import-Certificate -CertStoreLocation Cert:\\LocalMachine\\Root\\ | out-null"
|
||||
- choco upgrade python3 -y --version 3.9.13 --limit-output --params "/InstallDir:C:\\Python39"
|
||||
env:
|
||||
- PYTHON=C:\\Python37\\python
|
||||
- PYTHON=C:\\Python39\\python
|
||||
|
||||
- name: Linux | s390x | Python 3.7
|
||||
python: 3.7
|
||||
- name: Linux | s390x | Python 3.9
|
||||
python: 3.9
|
||||
services: docker
|
||||
arch: s390x
|
||||
env: PYTHON=python
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
This is a summary of the Python versions and platforms covered by the different CI platforms:
|
||||
|
||||
| | 3.7 | 3.8 | 3.9 | 3.10 | 3.11 |
|
||||
|---------|-----------|---------------------------------------|-----------|-----------|----------------|
|
||||
| Linux | Travis CI | AppVeyor¹ / Azure Pipelines / GitLab¹ | CircleCI¹ | Cirrus CI | GitHub Actions |
|
||||
| macOS | Travis CI | AppVeyor¹ / Azure Pipelines | CircleCI¹ | Cirrus CI | GitHub Actions |
|
||||
| Windows | Travis CI | AppVeyor¹ / Azure Pipelines / GitLab¹ | | Cirrus CI | GitHub Actions |
|
||||
| | 3.8 | 3.9 | 3.10 | 3.11 |
|
||||
|---------|--------------------------------------------------------|-----------------------|-----------|----------------|
|
||||
| Linux | AppVeyor¹ / Azure Pipelines / GitLab¹ / GitHub Actions | CircleCI¹ / Travis CI | Cirrus CI | GitHub Actions |
|
||||
| macOS | AppVeyor¹ / Azure Pipelines | CircleCI¹ / Travis CI | Cirrus CI | GitHub Actions |
|
||||
| Windows | AppVeyor¹ / Azure Pipelines / GitLab¹ | Travis CI | Cirrus CI | GitHub Actions |
|
||||
|
||||
> ¹ Runs a reduced set of tests to reduce CI load
|
||||
|
||||
Non-x86 architectures are covered on Travis CI using Python 3.7.
|
||||
Non-x86 architectures are covered on Travis CI using Python 3.9.
|
||||
|
||||
@@ -24,23 +24,24 @@ What does it do?
|
||||
----------------
|
||||
|
||||
| | macOS Intel | macOS Apple Silicon | Windows 64bit | Windows 32bit | Windows Arm64 | manylinux<br/>musllinux x86_64 | manylinux<br/>musllinux i686 | manylinux<br/>musllinux aarch64 | manylinux<br/>musllinux ppc64le | manylinux<br/>musllinux s390x |
|
||||
|---------------|----|-----|-----|-----|-----|----|-----|----|-----|-----|
|
||||
| CPython 3.6 | ✅ | N/A | ✅ | ✅ | N/A | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| CPython 3.7 | ✅ | N/A | ✅ | ✅ | N/A | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| CPython 3.8 | ✅ | ✅ | ✅ | ✅ | N/A | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| CPython 3.9 | ✅ | ✅ | ✅ | ✅ | ✅² | ✅³ | ✅ | ✅ | ✅ | ✅ |
|
||||
| CPython 3.10 | ✅ | ✅ | ✅ | ✅ | ✅² | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| CPython 3.11 | ✅ | ✅ | ✅ | ✅ | ✅² | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| CPython 3.12⁵ | ✅ | ✅ | ✅ | ✅ | ✅² | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| PyPy 3.7 v7.3 | ✅ | N/A | ✅ | N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A |
|
||||
| PyPy 3.8 v7.3 | ✅ | ✅⁴ | ✅ | N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A |
|
||||
| PyPy 3.9 v7.3 | ✅ | ✅⁴ | ✅ | N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A |
|
||||
|----------------|----|-----|-----|-----|-----|----|-----|----|-----|-----|
|
||||
| CPython 3.6 | ✅ | N/A | ✅ | ✅ | N/A | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| CPython 3.7 | ✅ | N/A | ✅ | ✅ | N/A | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| CPython 3.8 | ✅ | ✅ | ✅ | ✅ | N/A | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| CPython 3.9 | ✅ | ✅ | ✅ | ✅ | ✅² | ✅³ | ✅ | ✅ | ✅ | ✅ |
|
||||
| CPython 3.10 | ✅ | ✅ | ✅ | ✅ | ✅² | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| CPython 3.11 | ✅ | ✅ | ✅ | ✅ | ✅² | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| CPython 3.12⁵ | ✅ | ✅ | ✅ | ✅ | ✅² | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| PyPy 3.7 v7.3 | ✅ | N/A | ✅ | N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A |
|
||||
| PyPy 3.8 v7.3 | ✅ | ✅⁴ | ✅ | N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A |
|
||||
| PyPy 3.9 v7.3 | ✅ | ✅⁴ | ✅ | N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A |
|
||||
| PyPy 3.10 v7.3 | ✅ | ✅⁴ | ✅ | N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A |
|
||||
|
||||
<sup>¹ PyPy is only supported for manylinux wheels.</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>⁴ 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
|
||||
- Works on GitHub Actions, Azure Pipelines, Travis CI, AppVeyor, CircleCI, GitLab CI, and Cirrus CI
|
||||
@@ -90,13 +91,13 @@ jobs:
|
||||
os: [ubuntu-20.04, windows-2019, macOS-11]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Used to host cibuildwheel
|
||||
- uses: actions/setup-python@v3
|
||||
|
||||
- name: Install cibuildwheel
|
||||
run: python -m pip install cibuildwheel==2.13.0
|
||||
run: python -m pip install cibuildwheel==2.16.2
|
||||
|
||||
- name: Build wheels
|
||||
run: python -m cibuildwheel --output-dir wheelhouse
|
||||
@@ -160,26 +161,26 @@ Here are some repos that use cibuildwheel.
|
||||
| Name | CI | OS | Notes |
|
||||
|-----------------------------------|----|----|:------|
|
||||
| [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. |
|
||||
| [NumPy][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The fundamental package for scientific computing with Python. |
|
||||
| [pytorch-fairseq][] | ![github icon][] | ![apple icon][] ![linux icon][] | Facebook AI Research Sequence-to-Sequence Toolkit written in Python. |
|
||||
| [Tornado][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. |
|
||||
| [NumPy][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The fundamental package for scientific computing with Python. |
|
||||
| [Tornado][] | ![github icon][] | ![linux icon][] ![apple icon][] ![windows icon][] | Tornado is a Python web framework and asynchronous networking library. Uses stable ABI for a small C extension. |
|
||||
| [Matplotlib][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The venerable Matplotlib, a Python library with C++ portions |
|
||||
| [NCNN][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | ncnn is a high-performance neural network inference framework optimized for the mobile platform |
|
||||
| [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 |
|
||||
| [MyPy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | The compiled version of MyPy using MyPyC. |
|
||||
| [MemRay][] | ![github icon][] | ![linux icon][] | Memray is a memory profiler for Python |
|
||||
| [Kivy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Open source UI framework written in Python, running on Windows, Linux, macOS, Android and iOS |
|
||||
| [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
|
||||
[NumPy]: https://github.com/numpy/numpy
|
||||
[pytorch-fairseq]: https://github.com/pytorch/fairseq
|
||||
[NumPy]: https://github.com/numpy/numpy
|
||||
[Tornado]: https://github.com/tornadoweb/tornado
|
||||
[Matplotlib]: https://github.com/matplotlib/matplotlib
|
||||
[NCNN]: https://github.com/Tencent/ncnn
|
||||
[Prophet]: https://github.com/facebook/prophet
|
||||
[Kivy]: https://github.com/kivy/kivy
|
||||
[MyPy]: https://github.com/mypyc/mypy_mypyc-wheels
|
||||
[MemRay]: https://github.com/bloomberg/memray
|
||||
[Kivy]: https://github.com/kivy/kivy
|
||||
[duckdb]: https://github.com/duckdb/duckdb
|
||||
|
||||
[appveyor icon]: docs/data/readme_icons/appveyor.svg
|
||||
[github icon]: docs/data/readme_icons/github.svg
|
||||
@@ -212,42 +213,48 @@ Changelog
|
||||
|
||||
<!-- this section was generated by bin/update_readme_changelog.py -- do not edit manually -->
|
||||
|
||||
### v2.13.0
|
||||
### v2.16.2
|
||||
|
||||
_28 May 2023_
|
||||
_3 October 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.
|
||||
- 🛠 Updates CPython 3.12 version to 3.12.0, final release (#1635)
|
||||
- ✨ Adds a debug option [`CIBW_DEBUG_KEEP_CONTAINER`](https://cibuildwheel.readthedocs.io/en/stable/options/#cibw_debug_keep_container) to stop cibuildwheel deleting build containers after the build finishes. (#1620)
|
||||
- 📚 Adds support for `[tool.cibuildwheel]` checking by adding a schema compatible with the [validate-pyproject](https://github.com/abravalheri/validate-pyproject/) tool (#1622, #1628, #1629)
|
||||
- 🐛 Fix parsing of `CIBW_CONTAINER_ENGINE` and `CIBW_BUILD_FRONTEND` options to not break arguments on `:` characters (#1621)
|
||||
- 🐛 Fix the evaluation order of `CIBW_ENVIRONMENT` and `CIBW_ENVIRONMENT_PASS` so that `CIBW_ENVIRONMENT` assignments can reference environment variables passed through from the host machine. (#1617)
|
||||
- 🛠 Supports manylinux images' deferred installation of interpreters through the `manylinux-interpreters` tool (#1630)
|
||||
|
||||
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)
|
||||
### v2.16.1
|
||||
|
||||
- ✨ 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)
|
||||
_26 September 2023_
|
||||
|
||||
### v2.12.3
|
||||
- 🛠 Updates the prerelease CPython 3.12 version to 3.12.0rc3 (#1625)
|
||||
- 🛠 Only calls `linux32` in containers when necessary (#1599)
|
||||
|
||||
_19 April 2023_
|
||||
### v2.16.0
|
||||
|
||||
- 🐛 Fix an import error when running on Python 3.7. (#1479)
|
||||
_18 September 2023_
|
||||
|
||||
### v2.12.2
|
||||
- ✨ 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)
|
||||
|
||||
_18 April 2023_
|
||||
### v2.15.0
|
||||
|
||||
- 🐛 Fix a bug that caused an extra empty config-setting to be passed to the backend when CIBW_BUILD_FRONTEND is set to `build`. (#1474)
|
||||
- 🐛 Fix a crash that occurred when overwriting an existing wheel on Windows. (#1464)
|
||||
- 🛠 Pinned version updates, including CPython 3.10.11, 3.11.3, pip 23.1 and wheel 0.40.0.
|
||||
_8 August 2023_
|
||||
|
||||
### v2.12.1
|
||||
- 🌟 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)
|
||||
|
||||
_11 March 2023_
|
||||
### v2.14.1
|
||||
|
||||
- 🐛 Fix a bug that prevented the use of CIBW_CONFIG_SETTINGS with the 'pip' build backend. (#1430)
|
||||
_15 July 2023_
|
||||
|
||||
### v2.12.0
|
||||
|
||||
_16 Jan 2023_
|
||||
|
||||
- ✨ Adds support for PyPy arm64 wheels. This means that you can build PyPy wheels for Apple Silicon machines. Cross-compilation is not supported for these wheels, so you'll have to build on an Apple Silicon machine. (#1372)
|
||||
- 🛠 Pinned version updates, including PyPy to v7.3.11 and setuptools to 66.0.0.
|
||||
- 🛠 Updates the prerelease CPython 3.12 version to 3.12.0b4 (#1550)
|
||||
|
||||
<!-- END bin/update_readme_changelog.py -->
|
||||
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ runs:
|
||||
- uses: actions/setup-python@v4
|
||||
id: python
|
||||
with:
|
||||
python-version: "3.7 - 3.11"
|
||||
python-version: "3.8 - 3.11"
|
||||
update-environment: false
|
||||
|
||||
# Redirecting stderr to stdout to fix interleaving issue in Actions.
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
pr:
|
||||
paths:
|
||||
exclude:
|
||||
- docs/*
|
||||
- .pre-commit-config.yaml
|
||||
|
||||
jobs:
|
||||
- job: linux_38
|
||||
timeoutInMinutes: 120
|
||||
|
||||
+3
-2
@@ -60,7 +60,7 @@ def bump_version() -> None:
|
||||
print(e)
|
||||
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
|
||||
|
||||
if repo_has_uncommitted_changes:
|
||||
@@ -142,7 +142,8 @@ def bump_version() -> None:
|
||||
"pre-commit",
|
||||
"run",
|
||||
"--files=docs/changelog.md",
|
||||
]
|
||||
],
|
||||
check=False,
|
||||
)
|
||||
|
||||
# run pre-commit to check that no errors occurred on the second run
|
||||
|
||||
Executable
+260
@@ -0,0 +1,260 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import copy
|
||||
import json
|
||||
from typing import Any
|
||||
|
||||
import yaml
|
||||
|
||||
starter = """
|
||||
$id: https://github.com/pypa/cibuildwheel/blob/main/cibuildwheel/resources/cibuildwheel.schema.json
|
||||
$schema: http://json-schema.org/draft-07/schema
|
||||
additionalProperties: false
|
||||
description: cibuildwheel's settings.
|
||||
type: object
|
||||
properties:
|
||||
archs:
|
||||
description: Change the architectures built on your machine by default.
|
||||
type: string_array
|
||||
before-all:
|
||||
description: Execute a shell command on the build system before any wheels are built.
|
||||
type: string_array
|
||||
before-build:
|
||||
description: Execute a shell command preparing each wheel's build.
|
||||
type: string_array
|
||||
before-test:
|
||||
description: Execute a shell command before testing each wheel.
|
||||
type: string_array
|
||||
build:
|
||||
default: ['*']
|
||||
description: Choose the Python versions to build.
|
||||
type: string_array
|
||||
build-frontend:
|
||||
default: default
|
||||
description: Set the tool to use to build, either "pip" (default for now) or "build"
|
||||
oneOf:
|
||||
- enum: [pip, build, default]
|
||||
- type: string
|
||||
pattern: '^pip; ?args:'
|
||||
- type: string
|
||||
pattern: '^build; ?args:'
|
||||
- type: object
|
||||
additionalProperties: false
|
||||
required: [name]
|
||||
properties:
|
||||
name:
|
||||
enum: [pip, build]
|
||||
args:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
build-verbosity:
|
||||
type: integer
|
||||
minimum: -3
|
||||
maximum: 3
|
||||
default: 0
|
||||
description: Increase/decrease the output of pip wheel.
|
||||
config-settings:
|
||||
description: Specify config-settings for the build backend.
|
||||
type: string_table_array
|
||||
container-engine:
|
||||
oneOf:
|
||||
- enum: [docker, podman]
|
||||
- type: string
|
||||
pattern: '^docker; ?create_args:'
|
||||
- type: string
|
||||
pattern: '^podman; ?create_args:'
|
||||
- type: object
|
||||
additionalProperties: false
|
||||
required: [name]
|
||||
properties:
|
||||
name:
|
||||
enum: [docker, podman]
|
||||
create-args:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
dependency-versions:
|
||||
default: pinned
|
||||
description: Specify how cibuildwheel controls the versions of the tools it uses
|
||||
type: string
|
||||
environment:
|
||||
description: Set environment variables needed during the build.
|
||||
type: string_table
|
||||
environment-pass:
|
||||
description: Set environment variables on the host to pass-through to the container
|
||||
during the build.
|
||||
type: string_array
|
||||
manylinux-aarch64-image:
|
||||
type: string
|
||||
description: Specify alternative manylinux / musllinux container images
|
||||
manylinux-i686-image:
|
||||
type: string
|
||||
description: Specify alternative manylinux / musllinux container images
|
||||
manylinux-ppc64le-image:
|
||||
type: string
|
||||
description: Specify alternative manylinux / musllinux container images
|
||||
manylinux-pypy_aarch64-image:
|
||||
type: string
|
||||
description: Specify alternative manylinux / musllinux container images
|
||||
manylinux-pypy_i686-image:
|
||||
type: string
|
||||
description: Specify alternative manylinux / musllinux container images
|
||||
manylinux-pypy_x86_64-image:
|
||||
type: string
|
||||
description: Specify alternative manylinux / musllinux container images
|
||||
manylinux-s390x-image:
|
||||
type: string
|
||||
description: Specify alternative manylinux / musllinux container images
|
||||
manylinux-x86_64-image:
|
||||
type: string
|
||||
description: Specify alternative manylinux / musllinux container images
|
||||
musllinux-aarch64-image:
|
||||
type: string
|
||||
description: Specify alternative manylinux / musllinux container images
|
||||
musllinux-i686-image:
|
||||
type: string
|
||||
description: Specify alternative manylinux / musllinux container images
|
||||
musllinux-ppc64le-image:
|
||||
type: string
|
||||
description: Specify alternative manylinux / musllinux container images
|
||||
musllinux-s390x-image:
|
||||
type: string
|
||||
description: Specify alternative manylinux / musllinux container images
|
||||
musllinux-x86_64-image:
|
||||
type: string
|
||||
description: Specify alternative manylinux / musllinux container images
|
||||
repair-wheel-command:
|
||||
type: string_array
|
||||
description: Execute a shell command to repair each built wheel.
|
||||
skip:
|
||||
description: Choose the Python versions to skip.
|
||||
type: string_array
|
||||
test-command:
|
||||
description: Execute a shell command to test each built wheel.
|
||||
type: string_array
|
||||
test-extras:
|
||||
description: Install your wheel for testing using `extras_require`
|
||||
type: string_array
|
||||
test-requires:
|
||||
description: Install Python dependencies before running the tests
|
||||
type: string_array
|
||||
test-skip:
|
||||
description: Skip running tests on some builds.
|
||||
type: string_array
|
||||
"""
|
||||
|
||||
schema = yaml.safe_load(starter)
|
||||
|
||||
string_array = yaml.safe_load(
|
||||
"""
|
||||
- type: string
|
||||
- type: array
|
||||
items:
|
||||
type: string
|
||||
"""
|
||||
)
|
||||
|
||||
string_table_array = yaml.safe_load(
|
||||
"""
|
||||
- type: string
|
||||
- type: object
|
||||
additionalProperties: false
|
||||
patternProperties:
|
||||
.+:
|
||||
oneOf:
|
||||
- type: string
|
||||
- type: array
|
||||
items:
|
||||
type: string
|
||||
"""
|
||||
)
|
||||
|
||||
string_table = yaml.safe_load(
|
||||
"""
|
||||
- type: string
|
||||
- type: object
|
||||
additionalProperties: false
|
||||
patternProperties:
|
||||
.+:
|
||||
- type: string
|
||||
"""
|
||||
)
|
||||
|
||||
for value in schema["properties"].values():
|
||||
match value:
|
||||
case {"type": "string_array"}:
|
||||
del value["type"]
|
||||
value["oneOf"] = string_array
|
||||
case {"type": "string_table"}:
|
||||
del value["type"]
|
||||
value["oneOf"] = string_table
|
||||
case {"type": "string_table_array"}:
|
||||
del value["type"]
|
||||
value["oneOf"] = string_table_array
|
||||
|
||||
overrides = yaml.safe_load(
|
||||
"""
|
||||
type: array
|
||||
description: An overrides array
|
||||
items:
|
||||
type: object
|
||||
required: ["select"]
|
||||
minProperties: 2
|
||||
additionalProperties: false
|
||||
properties:
|
||||
select: {}
|
||||
"""
|
||||
)
|
||||
|
||||
for key, value in schema["properties"].items():
|
||||
value["title"] = f'CIBW_{key.replace("-", "_").upper()}'
|
||||
|
||||
non_global_options = {k: {"$ref": f"#/properties/{k}"} for k in schema["properties"]}
|
||||
del non_global_options["build"]
|
||||
del non_global_options["skip"]
|
||||
del non_global_options["container-engine"]
|
||||
del non_global_options["test-skip"]
|
||||
|
||||
overrides["items"]["properties"]["select"]["oneOf"] = string_array
|
||||
overrides["items"]["properties"] |= non_global_options.copy()
|
||||
|
||||
del overrides["items"]["properties"]["archs"]
|
||||
|
||||
not_linux = non_global_options.copy()
|
||||
|
||||
del not_linux["environment-pass"]
|
||||
for key in list(not_linux):
|
||||
if "linux-" in key:
|
||||
del not_linux[key]
|
||||
|
||||
|
||||
def as_object(d: dict[str, Any]) -> dict[str, Any]:
|
||||
return {
|
||||
"type": "object",
|
||||
"additionalProperties": False,
|
||||
"properties": copy.deepcopy(d),
|
||||
}
|
||||
|
||||
|
||||
oses = {
|
||||
"linux": as_object(non_global_options),
|
||||
"windows": as_object(not_linux),
|
||||
"macos": as_object(not_linux),
|
||||
}
|
||||
|
||||
oses["linux"]["properties"]["repair-wheel-command"] = {
|
||||
**schema["properties"]["repair-wheel-command"],
|
||||
"default": "auditwheel repair -w {dest_dir} {wheel}",
|
||||
}
|
||||
oses["macos"]["properties"]["repair-wheel-command"] = {
|
||||
**schema["properties"]["repair-wheel-command"],
|
||||
"default": "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}",
|
||||
}
|
||||
|
||||
del oses["linux"]["properties"]["dependency-versions"]
|
||||
|
||||
schema["properties"]["overrides"] = overrides
|
||||
schema["properties"] |= oses
|
||||
|
||||
print(json.dumps(schema, indent=2))
|
||||
@@ -12,13 +12,13 @@ from subprocess import run
|
||||
import click
|
||||
|
||||
|
||||
def shell(cmd, **kwargs):
|
||||
return run([cmd], shell=True, **kwargs)
|
||||
def shell(cmd, *, check: bool, **kwargs):
|
||||
return run([cmd], shell=True, check=check, **kwargs)
|
||||
|
||||
|
||||
def git_repo_has_changes():
|
||||
unstaged_changes = shell("git diff-index --quiet HEAD --").returncode != 0
|
||||
staged_changes = shell("git diff-index --quiet --cached HEAD --").returncode != 0
|
||||
unstaged_changes = shell("git diff-index --quiet HEAD --", check=False).returncode != 0
|
||||
staged_changes = shell("git diff-index --quiet --cached HEAD --", check=False).returncode != 0
|
||||
return unstaged_changes or staged_changes
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ def main():
|
||||
print("Done.")
|
||||
finally:
|
||||
# remove any local changes
|
||||
shell("git checkout -- .")
|
||||
shell("git checkout -- .", check=True)
|
||||
shell(f"git checkout {previous_branch}", check=True)
|
||||
shell(f"git branch -D --force {branch_name}", check=True)
|
||||
|
||||
|
||||
@@ -16,13 +16,13 @@ from urllib.parse import quote
|
||||
import click
|
||||
|
||||
|
||||
def shell(cmd, **kwargs):
|
||||
return run([cmd], shell=True, **kwargs)
|
||||
def shell(cmd, *, check: bool, **kwargs):
|
||||
return run([cmd], shell=True, check=check, **kwargs)
|
||||
|
||||
|
||||
def git_repo_has_changes():
|
||||
unstaged_changes = shell("git diff-index --quiet HEAD --").returncode != 0
|
||||
staged_changes = shell("git diff-index --quiet --cached HEAD --").returncode != 0
|
||||
unstaged_changes = shell("git diff-index --quiet HEAD --", check=False).returncode != 0
|
||||
staged_changes = shell("git diff-index --quiet --cached HEAD --", check=False).returncode != 0
|
||||
return unstaged_changes or staged_changes
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ def run_example_ci_configs(config_files=None):
|
||||
finally:
|
||||
# remove any local changes
|
||||
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 branch -D --force {branch_name}", check=True)
|
||||
|
||||
|
||||
+5
-1
@@ -24,4 +24,8 @@ if __name__ == "__main__":
|
||||
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", "ppc64le", "quay.io/pypa/musllinux_1_1_ppc64le", 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()
|
||||
|
||||
@@ -19,7 +19,7 @@ except ImportError:
|
||||
|
||||
|
||||
def main():
|
||||
subprocess.run(["mkdocs", "build"])
|
||||
subprocess.run(["mkdocs", "build"], check=True)
|
||||
|
||||
hti = Html2Image(custom_flags=["--force-device-scale-factor=2"])
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import difflib
|
||||
import logging
|
||||
from collections.abc import Mapping, MutableMapping
|
||||
from pathlib import Path
|
||||
from typing import Any, Union
|
||||
from typing import Any, Final, Literal, TypedDict, Union
|
||||
|
||||
import click
|
||||
import requests
|
||||
@@ -18,7 +18,6 @@ from rich.logging import RichHandler
|
||||
from rich.syntax import Syntax
|
||||
|
||||
from cibuildwheel._compat import tomllib
|
||||
from cibuildwheel._compat.typing import Final, Literal, TypedDict
|
||||
from cibuildwheel.extra import dump_python_configurations
|
||||
|
||||
log = logging.getLogger("cibw")
|
||||
@@ -129,7 +128,7 @@ class PyPyVersions:
|
||||
|
||||
def update_version_windows(self, spec: Specifier) -> ConfigWinCP:
|
||||
releases = [r for r in self.releases if spec.contains(r["python_version"])]
|
||||
releases = sorted(releases, key=lambda r: r["pypy_version"]) # type: ignore[no-any-return]
|
||||
releases = sorted(releases, key=lambda r: r["pypy_version"])
|
||||
releases = [r for r in releases if self.get_arch_file(r)]
|
||||
|
||||
if not releases:
|
||||
@@ -156,7 +155,7 @@ class PyPyVersions:
|
||||
raise RuntimeError(msg)
|
||||
|
||||
releases = [r for r in self.releases if spec.contains(r["python_version"])]
|
||||
releases = sorted(releases, key=lambda r: r["pypy_version"]) # type: ignore[no-any-return]
|
||||
releases = sorted(releases, key=lambda r: r["pypy_version"])
|
||||
|
||||
if not releases:
|
||||
msg = f"PyPy macOS {self.arch} not found for {spec}!"
|
||||
|
||||
@@ -7,6 +7,7 @@ import logging
|
||||
import subprocess
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from typing import Final
|
||||
|
||||
import click
|
||||
import rich
|
||||
@@ -15,7 +16,6 @@ from rich.logging import RichHandler
|
||||
from rich.syntax import Syntax
|
||||
|
||||
from cibuildwheel._compat import tomllib
|
||||
from cibuildwheel._compat.typing import Final
|
||||
|
||||
log = logging.getLogger("cibw")
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
from __future__ import annotations
|
||||
|
||||
__version__ = "2.13.0"
|
||||
__version__ = "2.16.2"
|
||||
|
||||
@@ -10,13 +10,14 @@ import typing
|
||||
from collections.abc import Iterable, Sequence, Set
|
||||
from pathlib import Path
|
||||
from tempfile import mkdtemp
|
||||
from typing import Protocol
|
||||
|
||||
import cibuildwheel
|
||||
import cibuildwheel.linux
|
||||
import cibuildwheel.macos
|
||||
import cibuildwheel.util
|
||||
import cibuildwheel.windows
|
||||
from cibuildwheel._compat.typing import Protocol, assert_never
|
||||
from cibuildwheel._compat.typing import assert_never
|
||||
from cibuildwheel.architecture import Architecture, allowed_architectures_check
|
||||
from cibuildwheel.logger import log
|
||||
from cibuildwheel.options import CommandLineArguments, Options, compute_options
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import typing
|
||||
from collections.abc import Callable
|
||||
from threading import RLock
|
||||
from typing import Any, Generic, TypeVar
|
||||
|
||||
__all__ = ["cached_property"]
|
||||
|
||||
_NOT_FOUND = object()
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
|
||||
class cached_property(Generic[_T]):
|
||||
def __init__(self, func: Callable[[Any], _T]):
|
||||
self.func = func
|
||||
self.attrname: str | None = None
|
||||
self.__doc__ = func.__doc__
|
||||
self.lock = RLock()
|
||||
|
||||
def __set_name__(self, owner: type[Any], name: str) -> None:
|
||||
if self.attrname is None:
|
||||
self.attrname = name
|
||||
elif name != self.attrname:
|
||||
msg = f"Cannot assign the same cached_property to two different names ({self.attrname!r} and {name!r})."
|
||||
raise TypeError(msg)
|
||||
|
||||
@typing.overload
|
||||
def __get__(self, instance: None, owner: type[Any] | None = ...) -> cached_property[_T]:
|
||||
...
|
||||
|
||||
@typing.overload
|
||||
def __get__(self, instance: object, owner: type[Any] | None = ...) -> _T:
|
||||
...
|
||||
|
||||
def __get__(self, instance: object | None, owner: type[Any] | None = None) -> Any:
|
||||
if instance is None:
|
||||
return self
|
||||
if self.attrname is None:
|
||||
msg = "Cannot use cached_property instance without calling __set_name__ on it."
|
||||
raise TypeError(msg)
|
||||
try:
|
||||
cache = instance.__dict__
|
||||
except AttributeError: # not all objects have __dict__ (e.g. class defines slots)
|
||||
msg = (
|
||||
f"No '__dict__' attribute on {type(instance).__name__!r} "
|
||||
f"instance to cache {self.attrname!r} property."
|
||||
)
|
||||
raise TypeError(msg) from None
|
||||
val = cache.get(self.attrname, _NOT_FOUND)
|
||||
if val is _NOT_FOUND:
|
||||
with self.lock:
|
||||
# check if another thread filled cache while we awaited lock
|
||||
val = cache.get(self.attrname, _NOT_FOUND)
|
||||
if val is _NOT_FOUND:
|
||||
val = self.func(instance)
|
||||
try:
|
||||
cache[self.attrname] = val
|
||||
except TypeError:
|
||||
msg = (
|
||||
f"The '__dict__' attribute on {type(instance).__name__!r} instance "
|
||||
f"does not support item assignment for caching {self.attrname!r} property."
|
||||
)
|
||||
raise TypeError(msg) from None
|
||||
return val
|
||||
@@ -1,10 +0,0 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
from functools import cached_property
|
||||
else:
|
||||
from ._functools_cached_property_38 import cached_property
|
||||
|
||||
__all__ = ("cached_property",)
|
||||
@@ -3,8 +3,8 @@ from __future__ import annotations
|
||||
import sys
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
from tomllib import load # noqa: TID251
|
||||
from tomllib import load, loads
|
||||
else:
|
||||
from tomli import load # noqa: TID251
|
||||
from tomli import load, loads
|
||||
|
||||
__all__ = ("load",)
|
||||
__all__ = ["load", "loads"]
|
||||
|
||||
@@ -2,23 +2,12 @@ from __future__ import annotations
|
||||
|
||||
import sys
|
||||
|
||||
if sys.version_info < (3, 8):
|
||||
from typing_extensions import Final, Literal, OrderedDict, Protocol, TypedDict
|
||||
else:
|
||||
from typing import Final, Literal, OrderedDict, Protocol, TypedDict # noqa: TID251
|
||||
|
||||
if sys.version_info < (3, 11):
|
||||
from typing_extensions import NotRequired, assert_never
|
||||
else:
|
||||
from typing import NotRequired, assert_never # noqa: TID251
|
||||
from typing import NotRequired, assert_never
|
||||
|
||||
__all__ = (
|
||||
"Final",
|
||||
"Literal",
|
||||
"Protocol",
|
||||
"Protocol",
|
||||
"TypedDict",
|
||||
"OrderedDict",
|
||||
"assert_never",
|
||||
"NotRequired",
|
||||
)
|
||||
|
||||
@@ -6,8 +6,9 @@ import re
|
||||
import sys
|
||||
from collections.abc import Set
|
||||
from enum import Enum
|
||||
from typing import Final, Literal
|
||||
|
||||
from ._compat.typing import Final, Literal, assert_never
|
||||
from ._compat.typing import assert_never
|
||||
from .typing import PlatformName
|
||||
|
||||
PRETTY_NAMES: Final[dict[PlatformName, str]] = {
|
||||
|
||||
@@ -2,13 +2,12 @@ from __future__ import annotations
|
||||
|
||||
import dataclasses
|
||||
from collections.abc import Mapping, Sequence
|
||||
from typing import Any
|
||||
from typing import Any, Protocol
|
||||
|
||||
import bashlex
|
||||
import bashlex.errors
|
||||
|
||||
from . import bashlex_eval
|
||||
from ._compat.typing import Protocol
|
||||
|
||||
|
||||
class EnvironmentParseError(Exception):
|
||||
@@ -125,8 +124,12 @@ class ParsedEnvironment:
|
||||
|
||||
return environment
|
||||
|
||||
def add(self, name: str, value: str) -> None:
|
||||
self.assignments.append(EnvironmentAssignmentRaw(name=name, value=value))
|
||||
def add(self, name: str, value: str, prepend: bool = False) -> None:
|
||||
assignment = EnvironmentAssignmentRaw(name=name, value=value)
|
||||
if prepend:
|
||||
self.assignments.insert(0, assignment)
|
||||
else:
|
||||
self.assignments.append(assignment)
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"{self.__class__.__name__}({[repr(a) for a in self.assignments]!r})"
|
||||
|
||||
@@ -6,8 +6,7 @@ from __future__ import annotations
|
||||
|
||||
from collections.abc import Mapping, Sequence
|
||||
from io import StringIO
|
||||
|
||||
from ._compat.typing import Protocol
|
||||
from typing import Protocol
|
||||
|
||||
__all__ = ("Printable", "dump_python_configurations")
|
||||
|
||||
|
||||
+21
-9
@@ -6,9 +6,9 @@ import textwrap
|
||||
from collections.abc import Iterable, Iterator, Sequence, Set
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path, PurePath, PurePosixPath
|
||||
from typing import Tuple
|
||||
from typing import OrderedDict, Tuple
|
||||
|
||||
from ._compat.typing import OrderedDict, assert_never
|
||||
from ._compat.typing import assert_never
|
||||
from .architecture import Architecture
|
||||
from .logger import log
|
||||
from .oci_container import OCIContainer
|
||||
@@ -16,9 +16,9 @@ from .options import Options
|
||||
from .typing import PathOrStr
|
||||
from .util import (
|
||||
AlreadyBuiltWheelError,
|
||||
BuildFrontendConfig,
|
||||
BuildSelector,
|
||||
NonPlatformWheelError,
|
||||
build_frontend_or_default,
|
||||
find_compatible_wheel,
|
||||
get_build_verbosity_extra_flags,
|
||||
prepare_command,
|
||||
@@ -117,10 +117,20 @@ def check_all_python_exist(
|
||||
*, platform_configs: Iterable[PythonConfiguration], container: OCIContainer
|
||||
) -> None:
|
||||
exist = True
|
||||
has_manylinux_interpreters = True
|
||||
messages = []
|
||||
|
||||
try:
|
||||
# use capture_output to keep quiet
|
||||
container.call(["manylinux-interpreters", "--help"], capture_output=True)
|
||||
except subprocess.CalledProcessError:
|
||||
has_manylinux_interpreters = False
|
||||
|
||||
for config in platform_configs:
|
||||
python_path = config.path / "bin" / "python"
|
||||
try:
|
||||
if has_manylinux_interpreters:
|
||||
container.call(["manylinux-interpreters", "ensure", config.path.name])
|
||||
container.call(["test", "-x", python_path])
|
||||
except subprocess.CalledProcessError:
|
||||
messages.append(
|
||||
@@ -177,7 +187,7 @@ def build_in_container(
|
||||
for config in platform_configs:
|
||||
log.build_start(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] = []
|
||||
|
||||
@@ -185,7 +195,7 @@ def build_in_container(
|
||||
constraints_file = build_options.dependency_constraints.get_for_python_version(
|
||||
config.version
|
||||
)
|
||||
container_constraints_file = PurePath("/constraints.txt")
|
||||
container_constraints_file = PurePosixPath("/constraints.txt")
|
||||
|
||||
container.copy_into(constraints_file, container_constraints_file)
|
||||
dependency_constraint_flags = ["-c", container_constraints_file]
|
||||
@@ -243,9 +253,10 @@ def build_in_container(
|
||||
container.call(["rm", "-rf", 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)
|
||||
container.call(
|
||||
[
|
||||
@@ -260,7 +271,7 @@ def build_in_container(
|
||||
],
|
||||
env=env,
|
||||
)
|
||||
elif build_frontend == "build":
|
||||
elif build_frontend.name == "build":
|
||||
if not 0 <= build_options.build_verbosity < 2:
|
||||
msg = f"build_verbosity {build_options.build_verbosity} is not supported for build frontend. Ignoring."
|
||||
log.warning(msg)
|
||||
@@ -349,6 +360,7 @@ def build_in_container(
|
||||
build_options.test_command,
|
||||
project=container_project_path,
|
||||
package=container_package_dir,
|
||||
wheel=wheel_to_test,
|
||||
)
|
||||
test_cwd = testing_temp_dir / "test_cwd"
|
||||
container.call(["mkdir", "-p", test_cwd])
|
||||
@@ -421,7 +433,7 @@ def build(options: Options, tmp_path: Path) -> None: # noqa: ARG001
|
||||
|
||||
with OCIContainer(
|
||||
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,
|
||||
engine=options.globals.container_engine,
|
||||
) as container:
|
||||
|
||||
@@ -5,9 +5,8 @@ import os
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
from typing import IO, AnyStr, Tuple
|
||||
from typing import IO, AnyStr, Final, Tuple
|
||||
|
||||
from ._compat.typing import Final
|
||||
from .util import CIProvider, detect_ci_provider
|
||||
|
||||
FoldPattern = Tuple[str, str]
|
||||
|
||||
+14
-10
@@ -12,11 +12,11 @@ import typing
|
||||
from collections.abc import Sequence, Set
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from typing import Tuple
|
||||
from typing import Literal, Tuple
|
||||
|
||||
from filelock import FileLock
|
||||
|
||||
from ._compat.typing import Literal, assert_never
|
||||
from ._compat.typing import assert_never
|
||||
from .architecture import Architecture
|
||||
from .environment import ParsedEnvironment
|
||||
from .logger import log
|
||||
@@ -25,10 +25,10 @@ from .typing import PathOrStr
|
||||
from .util import (
|
||||
CIBW_CACHE_PATH,
|
||||
AlreadyBuiltWheelError,
|
||||
BuildFrontend,
|
||||
BuildFrontendConfig,
|
||||
BuildFrontendName,
|
||||
BuildSelector,
|
||||
NonPlatformWheelError,
|
||||
build_frontend_or_default,
|
||||
call,
|
||||
detect_ci_provider,
|
||||
download,
|
||||
@@ -165,7 +165,7 @@ def setup_python(
|
||||
python_configuration: PythonConfiguration,
|
||||
dependency_constraint_flags: Sequence[PathOrStr],
|
||||
environment: ParsedEnvironment,
|
||||
build_frontend: BuildFrontend,
|
||||
build_frontend: BuildFrontendName,
|
||||
) -> dict[str, str]:
|
||||
tmp.mkdir()
|
||||
implementation_id = python_configuration.identifier.split("-")[0]
|
||||
@@ -334,7 +334,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
|
||||
for config in python_configurations:
|
||||
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)
|
||||
|
||||
identifier_tmp_dir = tmp_path / config.identifier
|
||||
@@ -357,7 +357,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
config,
|
||||
dependency_constraint_flags,
|
||||
build_options.environment,
|
||||
build_frontend,
|
||||
build_frontend.name,
|
||||
)
|
||||
|
||||
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...")
|
||||
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)
|
||||
# Path.resolve() is needed. Without it pip wheel may try to fetch package from pypi.org
|
||||
# see https://github.com/pypa/cibuildwheel/pull/369
|
||||
@@ -395,7 +398,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
*extra_flags,
|
||||
env=env,
|
||||
)
|
||||
elif build_frontend == "build":
|
||||
elif build_frontend.name == "build":
|
||||
if not 0 <= build_options.build_verbosity < 2:
|
||||
msg = f"build_verbosity {build_options.build_verbosity} is not supported for build frontend. Ignoring."
|
||||
log.warning(msg)
|
||||
@@ -599,6 +602,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
build_options.test_command,
|
||||
project=Path(".").resolve(),
|
||||
package=build_options.package_dir.resolve(),
|
||||
wheel=repaired_wheel,
|
||||
)
|
||||
|
||||
test_cwd = identifier_tmp_dir / "test_cwd"
|
||||
|
||||
@@ -14,11 +14,16 @@ from collections.abc import Mapping, Sequence
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path, PurePath, PurePosixPath
|
||||
from types import TracebackType
|
||||
from typing import IO, Dict
|
||||
from typing import IO, Dict, Literal
|
||||
|
||||
from ._compat.typing import Literal
|
||||
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,
|
||||
strtobool,
|
||||
)
|
||||
|
||||
ContainerEngineName = Literal["docker", "podman"]
|
||||
|
||||
@@ -30,7 +35,9 @@ class OCIContainerEngineConfig:
|
||||
|
||||
@staticmethod
|
||||
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"])
|
||||
if name not in {"docker", "podman"}:
|
||||
msg = f"unknown container engine {name}"
|
||||
@@ -84,7 +91,7 @@ class OCIContainer:
|
||||
self,
|
||||
*,
|
||||
image: str,
|
||||
simulate_32_bit: bool = False,
|
||||
enforce_32_bit: bool = False,
|
||||
cwd: PathOrStr | None = None,
|
||||
engine: OCIContainerEngineConfig = DEFAULT_ENGINE,
|
||||
):
|
||||
@@ -93,7 +100,7 @@ class OCIContainer:
|
||||
raise ValueError(msg)
|
||||
|
||||
self.image = image
|
||||
self.simulate_32_bit = simulate_32_bit
|
||||
self.enforce_32_bit = enforce_32_bit
|
||||
self.cwd = cwd
|
||||
self.name: str | None = None
|
||||
self.engine = engine
|
||||
@@ -109,13 +116,24 @@ class OCIContainer:
|
||||
if detect_ci_provider() == CIProvider.travis_ci and platform.machine() == "ppc64le":
|
||||
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(
|
||||
[
|
||||
self.engine.name,
|
||||
"create",
|
||||
"--env=CIBUILDWHEEL",
|
||||
"--env=SOURCE_DATE_EPOCH",
|
||||
f"--name={self.name}",
|
||||
"--interactive",
|
||||
"--volume=/:/host", # ignored on CircleCI
|
||||
@@ -176,12 +194,14 @@ class OCIContainer:
|
||||
|
||||
assert isinstance(self.name, str)
|
||||
|
||||
subprocess.run(
|
||||
[self.engine.name, "rm", "--force", "-v", self.name],
|
||||
stdout=subprocess.DEVNULL,
|
||||
check=False,
|
||||
)
|
||||
self.name = None
|
||||
keep_container = strtobool(os.environ.get("CIBW_DEBUG_KEEP_CONTAINER", ""))
|
||||
if not keep_container:
|
||||
subprocess.run(
|
||||
[self.engine.name, "rm", "--force", "-v", self.name],
|
||||
stdout=subprocess.DEVNULL,
|
||||
check=False,
|
||||
)
|
||||
self.name = None
|
||||
|
||||
def copy_into(self, from_path: Path, to_path: PurePath) -> None:
|
||||
# `docker cp` causes 'no space left on device' error when
|
||||
|
||||
+21
-18
@@ -12,12 +12,12 @@ import textwrap
|
||||
import traceback
|
||||
from collections.abc import Callable, Generator, Iterable, Iterator, Mapping, Set
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, List, Union
|
||||
from typing import Any, Dict, List, Literal, TypedDict, Union
|
||||
|
||||
from packaging.specifiers import SpecifierSet
|
||||
|
||||
from ._compat import tomllib
|
||||
from ._compat.typing import Literal, NotRequired, TypedDict
|
||||
from ._compat.typing import NotRequired
|
||||
from .architecture import Architecture
|
||||
from .environment import EnvironmentParseError, ParsedEnvironment, parse_environment
|
||||
from .logger import log
|
||||
@@ -27,7 +27,7 @@ from .typing import PLATFORMS, PlatformName
|
||||
from .util import (
|
||||
MANYLINUX_ARCHS,
|
||||
MUSLLINUX_ARCHS,
|
||||
BuildFrontend,
|
||||
BuildFrontendConfig,
|
||||
BuildSelector,
|
||||
DependencyConstraints,
|
||||
TestSelector,
|
||||
@@ -92,7 +92,7 @@ class BuildOptions:
|
||||
test_requires: list[str]
|
||||
test_extras: str
|
||||
build_verbosity: int
|
||||
build_frontend: BuildFrontend | Literal["default"]
|
||||
build_frontend: BuildFrontendConfig | None
|
||||
config_settings: str
|
||||
|
||||
@property
|
||||
@@ -165,7 +165,7 @@ def _dig_first(*pairs: tuple[Mapping[str, Setting], str], ignore_empty: bool = F
|
||||
if key in dict_like:
|
||||
value = dict_like[key]
|
||||
|
||||
if ignore_empty and value == "": # noqa: PLC1901
|
||||
if ignore_empty and value == "":
|
||||
continue
|
||||
|
||||
return value
|
||||
@@ -450,6 +450,7 @@ class Options:
|
||||
build_config = args.only
|
||||
skip_config = ""
|
||||
architectures = Architecture.all_archs(self.platform)
|
||||
prerelease_pythons = True
|
||||
|
||||
build_selector = BuildSelector(
|
||||
build_config=build_config,
|
||||
@@ -487,7 +488,6 @@ class Options:
|
||||
with self.reader.identifier(identifier):
|
||||
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", table={"item": '{k}="{v}"', "sep": " "}
|
||||
)
|
||||
@@ -505,17 +505,20 @@ class Options:
|
||||
test_extras = self.reader.get("test-extras", sep=",")
|
||||
build_verbosity_str = self.reader.get("build-verbosity")
|
||||
|
||||
build_frontend: BuildFrontend | Literal["default"]
|
||||
if build_frontend_str == "build":
|
||||
build_frontend = "build"
|
||||
elif build_frontend_str == "pip":
|
||||
build_frontend = "pip"
|
||||
elif build_frontend_str == "default":
|
||||
build_frontend = "default"
|
||||
build_frontend_str = self.reader.get(
|
||||
"build-frontend",
|
||||
env_plat=False,
|
||||
table={"item": "{k}:{v}", "sep": "; ", "quote": shlex.quote},
|
||||
)
|
||||
build_frontend: BuildFrontendConfig | None
|
||||
if not build_frontend_str or build_frontend_str == "default":
|
||||
build_frontend = None
|
||||
else:
|
||||
msg = f"cibuildwheel: Unrecognised build frontend {build_frontend_str!r}, only 'pip' and 'build' are supported"
|
||||
print(msg, file=sys.stderr)
|
||||
sys.exit(2)
|
||||
try:
|
||||
build_frontend = BuildFrontendConfig.from_config_string(build_frontend_str)
|
||||
except ValueError as e:
|
||||
print(f"cibuildwheel: {e}", file=sys.stderr)
|
||||
sys.exit(2)
|
||||
|
||||
try:
|
||||
environment = parse_environment(environment_config)
|
||||
@@ -529,9 +532,9 @@ class Options:
|
||||
|
||||
# Pass through environment variables
|
||||
if self.platform == "linux":
|
||||
for env_var_name in environment_pass:
|
||||
for env_var_name in reversed(environment_pass):
|
||||
with contextlib.suppress(KeyError):
|
||||
environment.add(env_var_name, self.env[env_var_name])
|
||||
environment.add(env_var_name, self.env[env_var_name], prepend=True)
|
||||
|
||||
if dependency_versions == "pinned":
|
||||
dependency_constraints: None | (
|
||||
|
||||
@@ -3,23 +3,46 @@ from __future__ import annotations
|
||||
import ast
|
||||
import configparser
|
||||
import contextlib
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from ._compat import tomllib
|
||||
|
||||
if sys.version_info < (3, 8):
|
||||
Constant = ast.Str
|
||||
|
||||
def get_constant(x: ast.Str) -> str:
|
||||
return x.s
|
||||
def get_parent(node: ast.AST | None, depth: int = 1) -> ast.AST | None:
|
||||
for _ in range(depth):
|
||||
node = getattr(node, "parent", None)
|
||||
return node
|
||||
|
||||
else:
|
||||
Constant = ast.Constant
|
||||
|
||||
def get_constant(x: ast.Constant) -> Any:
|
||||
return x.value
|
||||
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):
|
||||
@@ -33,15 +56,24 @@ class Analyzer(ast.NodeVisitor):
|
||||
super().visit(node)
|
||||
|
||||
def visit_keyword(self, node: ast.keyword) -> None:
|
||||
# Must not be nested except for if __name__ == "__main__"
|
||||
|
||||
self.generic_visit(node)
|
||||
# Must not be nested in an if or other structure
|
||||
# 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 (
|
||||
node.arg == "python_requires"
|
||||
and not hasattr(node.parent.parent.parent, "parent") # type: ignore[attr-defined]
|
||||
and isinstance(node.value, Constant)
|
||||
and isinstance(node.value, ast.Constant)
|
||||
and (unnested or name_main_unnested)
|
||||
):
|
||||
self.requires_python = get_constant(node.value)
|
||||
self.requires_python = node.value.value
|
||||
|
||||
|
||||
def setup_py_python_requires(content: str) -> str | None:
|
||||
|
||||
@@ -17,6 +17,7 @@ python_configurations = [
|
||||
{ identifier = "pp37-manylinux_x86_64", version = "3.7", path_str = "/opt/python/pp37-pypy37_pp73" },
|
||||
{ identifier = "pp38-manylinux_x86_64", version = "3.8", path_str = "/opt/python/pp38-pypy38_pp73" },
|
||||
{ identifier = "pp39-manylinux_x86_64", version = "3.9", path_str = "/opt/python/pp39-pypy39_pp73" },
|
||||
{ identifier = "pp310-manylinux_x86_64", version = "3.10", path_str = "/opt/python/pp310-pypy310_pp73" },
|
||||
{ identifier = "cp36-manylinux_aarch64", version = "3.6", path_str = "/opt/python/cp36-cp36m" },
|
||||
{ identifier = "cp37-manylinux_aarch64", version = "3.7", path_str = "/opt/python/cp37-cp37m" },
|
||||
{ identifier = "cp38-manylinux_aarch64", version = "3.8", path_str = "/opt/python/cp38-cp38" },
|
||||
@@ -41,9 +42,11 @@ python_configurations = [
|
||||
{ identifier = "pp37-manylinux_aarch64", version = "3.7", path_str = "/opt/python/pp37-pypy37_pp73" },
|
||||
{ identifier = "pp38-manylinux_aarch64", version = "3.8", path_str = "/opt/python/pp38-pypy38_pp73" },
|
||||
{ identifier = "pp39-manylinux_aarch64", version = "3.9", path_str = "/opt/python/pp39-pypy39_pp73" },
|
||||
{ identifier = "pp310-manylinux_aarch64", version = "3.10", path_str = "/opt/python/pp310-pypy310_pp73" },
|
||||
{ identifier = "pp37-manylinux_i686", version = "3.7", path_str = "/opt/python/pp37-pypy37_pp73" },
|
||||
{ identifier = "pp38-manylinux_i686", version = "3.8", path_str = "/opt/python/pp38-pypy38_pp73" },
|
||||
{ identifier = "pp39-manylinux_i686", version = "3.9", path_str = "/opt/python/pp39-pypy39_pp73" },
|
||||
{ identifier = "pp310-manylinux_i686", version = "3.10", path_str = "/opt/python/pp310-pypy310_pp73" },
|
||||
{ identifier = "cp36-musllinux_x86_64", version = "3.6", path_str = "/opt/python/cp36-cp36m" },
|
||||
{ identifier = "cp37-musllinux_x86_64", version = "3.7", path_str = "/opt/python/cp37-cp37m" },
|
||||
{ identifier = "cp38-musllinux_x86_64", version = "3.8", path_str = "/opt/python/cp38-cp38" },
|
||||
@@ -94,17 +97,19 @@ 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_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 = "cp311-macosx_x86_64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.3/python-3.11.3-macos11.pkg" },
|
||||
{ identifier = "cp311-macosx_arm64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.3/python-3.11.3-macos11.pkg" },
|
||||
{ identifier = "cp311-macosx_universal2", version = "3.11", url = "https://www.python.org/ftp/python/3.11.3/python-3.11.3-macos11.pkg" },
|
||||
{ identifier = "cp312-macosx_x86_64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.0/python-3.12.0b1-macos11.pkg" },
|
||||
{ identifier = "cp312-macosx_arm64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.0/python-3.12.0b1-macos11.pkg" },
|
||||
{ identifier = "cp312-macosx_universal2", version = "3.12", url = "https://www.python.org/ftp/python/3.12.0/python-3.12.0b1-macos11.pkg" },
|
||||
{ identifier = "cp311-macosx_x86_64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.6/python-3.11.6-macos11.pkg" },
|
||||
{ identifier = "cp311-macosx_arm64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.6/python-3.11.6-macos11.pkg" },
|
||||
{ identifier = "cp311-macosx_universal2", version = "3.11", url = "https://www.python.org/ftp/python/3.11.6/python-3.11.6-macos11.pkg" },
|
||||
{ identifier = "cp312-macosx_x86_64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.0/python-3.12.0-macos11.pkg" },
|
||||
{ identifier = "cp312-macosx_arm64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.0/python-3.12.0-macos11.pkg" },
|
||||
{ identifier = "cp312-macosx_universal2", version = "3.12", url = "https://www.python.org/ftp/python/3.12.0/python-3.12.0-macos11.pkg" },
|
||||
{ identifier = "pp37-macosx_x86_64", version = "3.7", url = "https://downloads.python.org/pypy/pypy3.7-v7.3.9-osx64.tar.bz2" },
|
||||
{ identifier = "pp38-macosx_x86_64", version = "3.8", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-macos_x86_64.tar.bz2" },
|
||||
{ identifier = "pp38-macosx_arm64", version = "3.8", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-macos_arm64.tar.bz2" },
|
||||
{ identifier = "pp39-macosx_x86_64", version = "3.9", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.11-macos_x86_64.tar.bz2" },
|
||||
{ identifier = "pp39-macosx_arm64", version = "3.9", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.11-macos_arm64.tar.bz2" },
|
||||
{ identifier = "pp39-macosx_x86_64", version = "3.9", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.13-macos_x86_64.tar.bz2" },
|
||||
{ identifier = "pp39-macosx_arm64", version = "3.9", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.13-macos_arm64.tar.bz2" },
|
||||
{ identifier = "pp310-macosx_x86_64", version = "3.10", url = "https://downloads.python.org/pypy/pypy3.10-v7.3.13-macos_x86_64.tar.bz2" },
|
||||
{ identifier = "pp310-macosx_arm64", version = "3.10", url = "https://downloads.python.org/pypy/pypy3.10-v7.3.13-macos_arm64.tar.bz2" },
|
||||
]
|
||||
|
||||
[windows]
|
||||
@@ -119,15 +124,16 @@ python_configurations = [
|
||||
{ identifier = "cp39-win_amd64", version = "3.9.13", arch = "64" },
|
||||
{ identifier = "cp310-win32", version = "3.10.11", arch = "32" },
|
||||
{ identifier = "cp310-win_amd64", version = "3.10.11", arch = "64" },
|
||||
{ identifier = "cp311-win32", version = "3.11.3", arch = "32" },
|
||||
{ identifier = "cp311-win_amd64", version = "3.11.3", arch = "64" },
|
||||
{ identifier = "cp312-win32", version = "3.12.0-b1", arch = "32" },
|
||||
{ identifier = "cp312-win_amd64", version = "3.12.0-b1", arch = "64" },
|
||||
{ identifier = "cp311-win32", version = "3.11.6", arch = "32" },
|
||||
{ identifier = "cp311-win_amd64", version = "3.11.6", arch = "64" },
|
||||
{ identifier = "cp312-win32", version = "3.12.0", arch = "32" },
|
||||
{ identifier = "cp312-win_amd64", version = "3.12.0", arch = "64" },
|
||||
{ identifier = "cp39-win_arm64", version = "3.9.10", arch = "ARM64" },
|
||||
{ identifier = "cp310-win_arm64", version = "3.10.11", arch = "ARM64" },
|
||||
{ identifier = "cp311-win_arm64", version = "3.11.3", arch = "ARM64" },
|
||||
{ identifier = "cp312-win_arm64", version = "3.12.0-b1", arch = "ARM64" },
|
||||
{ identifier = "cp311-win_arm64", version = "3.11.6", arch = "ARM64" },
|
||||
{ identifier = "cp312-win_arm64", version = "3.12.0", arch = "ARM64" },
|
||||
{ identifier = "pp37-win_amd64", version = "3.7", arch = "64", url = "https://downloads.python.org/pypy/pypy3.7-v7.3.9-win64.zip" },
|
||||
{ identifier = "pp38-win_amd64", version = "3.8", arch = "64", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-win64.zip" },
|
||||
{ identifier = "pp39-win_amd64", version = "3.9", arch = "64", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.11-win64.zip" },
|
||||
{ identifier = "pp39-win_amd64", version = "3.9", arch = "64", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.13-win64.zip" },
|
||||
{ identifier = "pp310-win_amd64", version = "3.10", arch = "64", url = "https://downloads.python.org/pypy/pypy3.10-v7.3.13-win64.zip" },
|
||||
]
|
||||
|
||||
@@ -0,0 +1,707 @@
|
||||
{
|
||||
"$id": "https://github.com/pypa/cibuildwheel/blob/main/cibuildwheel/resources/cibuildwheel.schema.json",
|
||||
"$schema": "http://json-schema.org/draft-07/schema",
|
||||
"additionalProperties": false,
|
||||
"description": "cibuildwheel's settings.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"archs": {
|
||||
"description": "Change the architectures built on your machine by default.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "CIBW_ARCHS"
|
||||
},
|
||||
"before-all": {
|
||||
"description": "Execute a shell command on the build system before any wheels are built.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "CIBW_BEFORE_ALL"
|
||||
},
|
||||
"before-build": {
|
||||
"description": "Execute a shell command preparing each wheel's build.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "CIBW_BEFORE_BUILD"
|
||||
},
|
||||
"before-test": {
|
||||
"description": "Execute a shell command before testing each wheel.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "CIBW_BEFORE_TEST"
|
||||
},
|
||||
"build": {
|
||||
"default": [
|
||||
"*"
|
||||
],
|
||||
"description": "Choose the Python versions to build.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "CIBW_BUILD"
|
||||
},
|
||||
"build-frontend": {
|
||||
"default": "default",
|
||||
"description": "Set the tool to use to build, either \"pip\" (default for now) or \"build\"",
|
||||
"oneOf": [
|
||||
{
|
||||
"enum": [
|
||||
"pip",
|
||||
"build",
|
||||
"default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^pip; ?args:"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^build; ?args:"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"enum": [
|
||||
"pip",
|
||||
"build"
|
||||
]
|
||||
},
|
||||
"args": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "CIBW_BUILD_FRONTEND"
|
||||
},
|
||||
"build-verbosity": {
|
||||
"type": "integer",
|
||||
"minimum": -3,
|
||||
"maximum": 3,
|
||||
"default": 0,
|
||||
"description": "Increase/decrease the output of pip wheel.",
|
||||
"title": "CIBW_BUILD_VERBOSITY"
|
||||
},
|
||||
"config-settings": {
|
||||
"description": "Specify config-settings for the build backend.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"patternProperties": {
|
||||
".+": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "CIBW_CONFIG_SETTINGS"
|
||||
},
|
||||
"container-engine": {
|
||||
"oneOf": [
|
||||
{
|
||||
"enum": [
|
||||
"docker",
|
||||
"podman"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^docker; ?create_args:"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^podman; ?create_args:"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"enum": [
|
||||
"docker",
|
||||
"podman"
|
||||
]
|
||||
},
|
||||
"create-args": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "CIBW_CONTAINER_ENGINE"
|
||||
},
|
||||
"dependency-versions": {
|
||||
"default": "pinned",
|
||||
"description": "Specify how cibuildwheel controls the versions of the tools it uses",
|
||||
"type": "string",
|
||||
"title": "CIBW_DEPENDENCY_VERSIONS"
|
||||
},
|
||||
"environment": {
|
||||
"description": "Set environment variables needed during the build.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"patternProperties": {
|
||||
".+": [
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "CIBW_ENVIRONMENT"
|
||||
},
|
||||
"environment-pass": {
|
||||
"description": "Set environment variables on the host to pass-through to the container during the build.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "CIBW_ENVIRONMENT_PASS"
|
||||
},
|
||||
"manylinux-aarch64-image": {
|
||||
"type": "string",
|
||||
"description": "Specify alternative manylinux / musllinux container images",
|
||||
"title": "CIBW_MANYLINUX_AARCH64_IMAGE"
|
||||
},
|
||||
"manylinux-i686-image": {
|
||||
"type": "string",
|
||||
"description": "Specify alternative manylinux / musllinux container images",
|
||||
"title": "CIBW_MANYLINUX_I686_IMAGE"
|
||||
},
|
||||
"manylinux-ppc64le-image": {
|
||||
"type": "string",
|
||||
"description": "Specify alternative manylinux / musllinux container images",
|
||||
"title": "CIBW_MANYLINUX_PPC64LE_IMAGE"
|
||||
},
|
||||
"manylinux-pypy_aarch64-image": {
|
||||
"type": "string",
|
||||
"description": "Specify alternative manylinux / musllinux container images",
|
||||
"title": "CIBW_MANYLINUX_PYPY_AARCH64_IMAGE"
|
||||
},
|
||||
"manylinux-pypy_i686-image": {
|
||||
"type": "string",
|
||||
"description": "Specify alternative manylinux / musllinux container images",
|
||||
"title": "CIBW_MANYLINUX_PYPY_I686_IMAGE"
|
||||
},
|
||||
"manylinux-pypy_x86_64-image": {
|
||||
"type": "string",
|
||||
"description": "Specify alternative manylinux / musllinux container images",
|
||||
"title": "CIBW_MANYLINUX_PYPY_X86_64_IMAGE"
|
||||
},
|
||||
"manylinux-s390x-image": {
|
||||
"type": "string",
|
||||
"description": "Specify alternative manylinux / musllinux container images",
|
||||
"title": "CIBW_MANYLINUX_S390X_IMAGE"
|
||||
},
|
||||
"manylinux-x86_64-image": {
|
||||
"type": "string",
|
||||
"description": "Specify alternative manylinux / musllinux container images",
|
||||
"title": "CIBW_MANYLINUX_X86_64_IMAGE"
|
||||
},
|
||||
"musllinux-aarch64-image": {
|
||||
"type": "string",
|
||||
"description": "Specify alternative manylinux / musllinux container images",
|
||||
"title": "CIBW_MUSLLINUX_AARCH64_IMAGE"
|
||||
},
|
||||
"musllinux-i686-image": {
|
||||
"type": "string",
|
||||
"description": "Specify alternative manylinux / musllinux container images",
|
||||
"title": "CIBW_MUSLLINUX_I686_IMAGE"
|
||||
},
|
||||
"musllinux-ppc64le-image": {
|
||||
"type": "string",
|
||||
"description": "Specify alternative manylinux / musllinux container images",
|
||||
"title": "CIBW_MUSLLINUX_PPC64LE_IMAGE"
|
||||
},
|
||||
"musllinux-s390x-image": {
|
||||
"type": "string",
|
||||
"description": "Specify alternative manylinux / musllinux container images",
|
||||
"title": "CIBW_MUSLLINUX_S390X_IMAGE"
|
||||
},
|
||||
"musllinux-x86_64-image": {
|
||||
"type": "string",
|
||||
"description": "Specify alternative manylinux / musllinux container images",
|
||||
"title": "CIBW_MUSLLINUX_X86_64_IMAGE"
|
||||
},
|
||||
"repair-wheel-command": {
|
||||
"description": "Execute a shell command to repair each built wheel.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "CIBW_REPAIR_WHEEL_COMMAND"
|
||||
},
|
||||
"skip": {
|
||||
"description": "Choose the Python versions to skip.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "CIBW_SKIP"
|
||||
},
|
||||
"test-command": {
|
||||
"description": "Execute a shell command to test each built wheel.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "CIBW_TEST_COMMAND"
|
||||
},
|
||||
"test-extras": {
|
||||
"description": "Install your wheel for testing using `extras_require`",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "CIBW_TEST_EXTRAS"
|
||||
},
|
||||
"test-requires": {
|
||||
"description": "Install Python dependencies before running the tests",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "CIBW_TEST_REQUIRES"
|
||||
},
|
||||
"test-skip": {
|
||||
"description": "Skip running tests on some builds.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "CIBW_TEST_SKIP"
|
||||
},
|
||||
"overrides": {
|
||||
"type": "array",
|
||||
"description": "An overrides array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"select"
|
||||
],
|
||||
"minProperties": 2,
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"select": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"before-all": {
|
||||
"$ref": "#/properties/before-all"
|
||||
},
|
||||
"before-build": {
|
||||
"$ref": "#/properties/before-build"
|
||||
},
|
||||
"before-test": {
|
||||
"$ref": "#/properties/before-test"
|
||||
},
|
||||
"build-frontend": {
|
||||
"$ref": "#/properties/build-frontend"
|
||||
},
|
||||
"build-verbosity": {
|
||||
"$ref": "#/properties/build-verbosity"
|
||||
},
|
||||
"config-settings": {
|
||||
"$ref": "#/properties/config-settings"
|
||||
},
|
||||
"dependency-versions": {
|
||||
"$ref": "#/properties/dependency-versions"
|
||||
},
|
||||
"environment": {
|
||||
"$ref": "#/properties/environment"
|
||||
},
|
||||
"environment-pass": {
|
||||
"$ref": "#/properties/environment-pass"
|
||||
},
|
||||
"manylinux-aarch64-image": {
|
||||
"$ref": "#/properties/manylinux-aarch64-image"
|
||||
},
|
||||
"manylinux-i686-image": {
|
||||
"$ref": "#/properties/manylinux-i686-image"
|
||||
},
|
||||
"manylinux-ppc64le-image": {
|
||||
"$ref": "#/properties/manylinux-ppc64le-image"
|
||||
},
|
||||
"manylinux-pypy_aarch64-image": {
|
||||
"$ref": "#/properties/manylinux-pypy_aarch64-image"
|
||||
},
|
||||
"manylinux-pypy_i686-image": {
|
||||
"$ref": "#/properties/manylinux-pypy_i686-image"
|
||||
},
|
||||
"manylinux-pypy_x86_64-image": {
|
||||
"$ref": "#/properties/manylinux-pypy_x86_64-image"
|
||||
},
|
||||
"manylinux-s390x-image": {
|
||||
"$ref": "#/properties/manylinux-s390x-image"
|
||||
},
|
||||
"manylinux-x86_64-image": {
|
||||
"$ref": "#/properties/manylinux-x86_64-image"
|
||||
},
|
||||
"musllinux-aarch64-image": {
|
||||
"$ref": "#/properties/musllinux-aarch64-image"
|
||||
},
|
||||
"musllinux-i686-image": {
|
||||
"$ref": "#/properties/musllinux-i686-image"
|
||||
},
|
||||
"musllinux-ppc64le-image": {
|
||||
"$ref": "#/properties/musllinux-ppc64le-image"
|
||||
},
|
||||
"musllinux-s390x-image": {
|
||||
"$ref": "#/properties/musllinux-s390x-image"
|
||||
},
|
||||
"musllinux-x86_64-image": {
|
||||
"$ref": "#/properties/musllinux-x86_64-image"
|
||||
},
|
||||
"repair-wheel-command": {
|
||||
"$ref": "#/properties/repair-wheel-command"
|
||||
},
|
||||
"test-command": {
|
||||
"$ref": "#/properties/test-command"
|
||||
},
|
||||
"test-extras": {
|
||||
"$ref": "#/properties/test-extras"
|
||||
},
|
||||
"test-requires": {
|
||||
"$ref": "#/properties/test-requires"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"linux": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"archs": {
|
||||
"$ref": "#/properties/archs"
|
||||
},
|
||||
"before-all": {
|
||||
"$ref": "#/properties/before-all"
|
||||
},
|
||||
"before-build": {
|
||||
"$ref": "#/properties/before-build"
|
||||
},
|
||||
"before-test": {
|
||||
"$ref": "#/properties/before-test"
|
||||
},
|
||||
"build-frontend": {
|
||||
"$ref": "#/properties/build-frontend"
|
||||
},
|
||||
"build-verbosity": {
|
||||
"$ref": "#/properties/build-verbosity"
|
||||
},
|
||||
"config-settings": {
|
||||
"$ref": "#/properties/config-settings"
|
||||
},
|
||||
"environment": {
|
||||
"$ref": "#/properties/environment"
|
||||
},
|
||||
"environment-pass": {
|
||||
"$ref": "#/properties/environment-pass"
|
||||
},
|
||||
"manylinux-aarch64-image": {
|
||||
"$ref": "#/properties/manylinux-aarch64-image"
|
||||
},
|
||||
"manylinux-i686-image": {
|
||||
"$ref": "#/properties/manylinux-i686-image"
|
||||
},
|
||||
"manylinux-ppc64le-image": {
|
||||
"$ref": "#/properties/manylinux-ppc64le-image"
|
||||
},
|
||||
"manylinux-pypy_aarch64-image": {
|
||||
"$ref": "#/properties/manylinux-pypy_aarch64-image"
|
||||
},
|
||||
"manylinux-pypy_i686-image": {
|
||||
"$ref": "#/properties/manylinux-pypy_i686-image"
|
||||
},
|
||||
"manylinux-pypy_x86_64-image": {
|
||||
"$ref": "#/properties/manylinux-pypy_x86_64-image"
|
||||
},
|
||||
"manylinux-s390x-image": {
|
||||
"$ref": "#/properties/manylinux-s390x-image"
|
||||
},
|
||||
"manylinux-x86_64-image": {
|
||||
"$ref": "#/properties/manylinux-x86_64-image"
|
||||
},
|
||||
"musllinux-aarch64-image": {
|
||||
"$ref": "#/properties/musllinux-aarch64-image"
|
||||
},
|
||||
"musllinux-i686-image": {
|
||||
"$ref": "#/properties/musllinux-i686-image"
|
||||
},
|
||||
"musllinux-ppc64le-image": {
|
||||
"$ref": "#/properties/musllinux-ppc64le-image"
|
||||
},
|
||||
"musllinux-s390x-image": {
|
||||
"$ref": "#/properties/musllinux-s390x-image"
|
||||
},
|
||||
"musllinux-x86_64-image": {
|
||||
"$ref": "#/properties/musllinux-x86_64-image"
|
||||
},
|
||||
"repair-wheel-command": {
|
||||
"description": "Execute a shell command to repair each built wheel.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "CIBW_REPAIR_WHEEL_COMMAND",
|
||||
"default": "auditwheel repair -w {dest_dir} {wheel}"
|
||||
},
|
||||
"test-command": {
|
||||
"$ref": "#/properties/test-command"
|
||||
},
|
||||
"test-extras": {
|
||||
"$ref": "#/properties/test-extras"
|
||||
},
|
||||
"test-requires": {
|
||||
"$ref": "#/properties/test-requires"
|
||||
}
|
||||
}
|
||||
},
|
||||
"windows": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"archs": {
|
||||
"$ref": "#/properties/archs"
|
||||
},
|
||||
"before-all": {
|
||||
"$ref": "#/properties/before-all"
|
||||
},
|
||||
"before-build": {
|
||||
"$ref": "#/properties/before-build"
|
||||
},
|
||||
"before-test": {
|
||||
"$ref": "#/properties/before-test"
|
||||
},
|
||||
"build-frontend": {
|
||||
"$ref": "#/properties/build-frontend"
|
||||
},
|
||||
"build-verbosity": {
|
||||
"$ref": "#/properties/build-verbosity"
|
||||
},
|
||||
"config-settings": {
|
||||
"$ref": "#/properties/config-settings"
|
||||
},
|
||||
"dependency-versions": {
|
||||
"$ref": "#/properties/dependency-versions"
|
||||
},
|
||||
"environment": {
|
||||
"$ref": "#/properties/environment"
|
||||
},
|
||||
"repair-wheel-command": {
|
||||
"$ref": "#/properties/repair-wheel-command"
|
||||
},
|
||||
"test-command": {
|
||||
"$ref": "#/properties/test-command"
|
||||
},
|
||||
"test-extras": {
|
||||
"$ref": "#/properties/test-extras"
|
||||
},
|
||||
"test-requires": {
|
||||
"$ref": "#/properties/test-requires"
|
||||
}
|
||||
}
|
||||
},
|
||||
"macos": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"archs": {
|
||||
"$ref": "#/properties/archs"
|
||||
},
|
||||
"before-all": {
|
||||
"$ref": "#/properties/before-all"
|
||||
},
|
||||
"before-build": {
|
||||
"$ref": "#/properties/before-build"
|
||||
},
|
||||
"before-test": {
|
||||
"$ref": "#/properties/before-test"
|
||||
},
|
||||
"build-frontend": {
|
||||
"$ref": "#/properties/build-frontend"
|
||||
},
|
||||
"build-verbosity": {
|
||||
"$ref": "#/properties/build-verbosity"
|
||||
},
|
||||
"config-settings": {
|
||||
"$ref": "#/properties/config-settings"
|
||||
},
|
||||
"dependency-versions": {
|
||||
"$ref": "#/properties/dependency-versions"
|
||||
},
|
||||
"environment": {
|
||||
"$ref": "#/properties/environment"
|
||||
},
|
||||
"repair-wheel-command": {
|
||||
"description": "Execute a shell command to repair each built wheel.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "CIBW_REPAIR_WHEEL_COMMAND",
|
||||
"default": "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
|
||||
},
|
||||
"test-command": {
|
||||
"$ref": "#/properties/test-command"
|
||||
},
|
||||
"test-extras": {
|
||||
"$ref": "#/properties/test-extras"
|
||||
},
|
||||
"test-requires": {
|
||||
"$ref": "#/properties/test-requires"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,23 +6,23 @@
|
||||
#
|
||||
delocate==0.10.4
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.6
|
||||
distlib==0.3.7
|
||||
# via virtualenv
|
||||
filelock==3.12.0
|
||||
filelock==3.12.4
|
||||
# via virtualenv
|
||||
packaging==23.1
|
||||
packaging==23.2
|
||||
# via delocate
|
||||
platformdirs==3.5.1
|
||||
platformdirs==3.11.0
|
||||
# via virtualenv
|
||||
typing-extensions==4.6.2
|
||||
typing-extensions==4.8.0
|
||||
# via delocate
|
||||
virtualenv==20.23.0
|
||||
virtualenv==20.24.5
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
wheel==0.40.0
|
||||
wheel==0.41.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
# 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
|
||||
setuptools==67.8.0
|
||||
setuptools==68.2.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -6,23 +6,23 @@
|
||||
#
|
||||
delocate==0.10.4
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.6
|
||||
distlib==0.3.7
|
||||
# via virtualenv
|
||||
filelock==3.12.0
|
||||
filelock==3.12.4
|
||||
# via virtualenv
|
||||
packaging==23.1
|
||||
packaging==23.2
|
||||
# via delocate
|
||||
platformdirs==3.5.1
|
||||
platformdirs==3.11.0
|
||||
# via virtualenv
|
||||
typing-extensions==4.6.2
|
||||
typing-extensions==4.8.0
|
||||
# via delocate
|
||||
virtualenv==20.23.0
|
||||
virtualenv==20.24.5
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
wheel==0.40.0
|
||||
wheel==0.41.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
# 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
|
||||
setuptools==67.8.0
|
||||
setuptools==68.2.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -6,23 +6,23 @@
|
||||
#
|
||||
delocate==0.10.4
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.6
|
||||
distlib==0.3.7
|
||||
# via virtualenv
|
||||
filelock==3.12.0
|
||||
filelock==3.12.4
|
||||
# via virtualenv
|
||||
packaging==23.1
|
||||
packaging==23.2
|
||||
# via delocate
|
||||
platformdirs==3.5.1
|
||||
platformdirs==3.11.0
|
||||
# via virtualenv
|
||||
typing-extensions==4.6.2
|
||||
typing-extensions==4.8.0
|
||||
# via delocate
|
||||
virtualenv==20.23.0
|
||||
virtualenv==20.24.5
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
wheel==0.40.0
|
||||
wheel==0.41.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
# 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
|
||||
setuptools==67.8.0
|
||||
setuptools==68.2.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -6,30 +6,30 @@
|
||||
#
|
||||
delocate==0.10.4
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.6
|
||||
distlib==0.3.7
|
||||
# via virtualenv
|
||||
filelock==3.12.0
|
||||
filelock==3.12.2
|
||||
# via virtualenv
|
||||
importlib-metadata==6.6.0
|
||||
importlib-metadata==6.7.0
|
||||
# via virtualenv
|
||||
packaging==23.1
|
||||
packaging==23.2
|
||||
# via delocate
|
||||
platformdirs==3.5.1
|
||||
platformdirs==3.11.0
|
||||
# via virtualenv
|
||||
typing-extensions==4.6.2
|
||||
typing-extensions==4.7.1
|
||||
# via
|
||||
# delocate
|
||||
# importlib-metadata
|
||||
# platformdirs
|
||||
virtualenv==20.23.0
|
||||
virtualenv==20.24.5
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
wheel==0.40.0
|
||||
wheel==0.41.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
zipp==3.15.0
|
||||
# via importlib-metadata
|
||||
|
||||
# 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
|
||||
setuptools==67.8.0
|
||||
setuptools==68.0.0
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -6,23 +6,23 @@
|
||||
#
|
||||
delocate==0.10.4
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.6
|
||||
distlib==0.3.7
|
||||
# via virtualenv
|
||||
filelock==3.12.0
|
||||
filelock==3.12.4
|
||||
# via virtualenv
|
||||
packaging==23.1
|
||||
packaging==23.2
|
||||
# via delocate
|
||||
platformdirs==3.5.1
|
||||
platformdirs==3.11.0
|
||||
# via virtualenv
|
||||
typing-extensions==4.6.2
|
||||
typing-extensions==4.8.0
|
||||
# via delocate
|
||||
virtualenv==20.23.0
|
||||
virtualenv==20.24.5
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
wheel==0.40.0
|
||||
wheel==0.41.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
# 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
|
||||
setuptools==67.8.0
|
||||
setuptools==68.2.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -6,23 +6,23 @@
|
||||
#
|
||||
delocate==0.10.4
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.6
|
||||
distlib==0.3.7
|
||||
# via virtualenv
|
||||
filelock==3.12.0
|
||||
filelock==3.12.4
|
||||
# via virtualenv
|
||||
packaging==23.1
|
||||
packaging==23.2
|
||||
# via delocate
|
||||
platformdirs==3.5.1
|
||||
platformdirs==3.11.0
|
||||
# via virtualenv
|
||||
typing-extensions==4.6.2
|
||||
typing-extensions==4.8.0
|
||||
# via delocate
|
||||
virtualenv==20.23.0
|
||||
virtualenv==20.24.5
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
wheel==0.40.0
|
||||
wheel==0.41.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
# 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
|
||||
setuptools==67.8.0
|
||||
setuptools==68.2.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -6,23 +6,23 @@
|
||||
#
|
||||
delocate==0.10.4
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
distlib==0.3.6
|
||||
distlib==0.3.7
|
||||
# via virtualenv
|
||||
filelock==3.12.0
|
||||
filelock==3.12.4
|
||||
# via virtualenv
|
||||
packaging==23.1
|
||||
packaging==23.2
|
||||
# via delocate
|
||||
platformdirs==3.5.1
|
||||
platformdirs==3.11.0
|
||||
# via virtualenv
|
||||
typing-extensions==4.6.2
|
||||
typing-extensions==4.8.0
|
||||
# via delocate
|
||||
virtualenv==20.23.0
|
||||
virtualenv==20.24.5
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
wheel==0.40.0
|
||||
wheel==0.41.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
# 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
|
||||
setuptools==67.8.0
|
||||
setuptools==68.2.2
|
||||
# via -r cibuildwheel/resources/constraints.in
|
||||
|
||||
@@ -9,7 +9,7 @@ config-settings = {}
|
||||
dependency-versions = "pinned"
|
||||
environment = {}
|
||||
environment-pass = []
|
||||
build-verbosity = ""
|
||||
build-verbosity = 0
|
||||
|
||||
before-all = ""
|
||||
before-build = ""
|
||||
|
||||
@@ -1,49 +1,54 @@
|
||||
[x86_64]
|
||||
manylinux1 = quay.io/pypa/manylinux1_x86_64:2023-05-01-496eb35
|
||||
manylinux1 = quay.io/pypa/manylinux1_x86_64:2023-10-01-4095a57
|
||||
manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2023-05-24-3bf828e
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2023-10-03-72cdc42
|
||||
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-05-24-3bf828e
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2023-05-24-3bf828e
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2023-10-03-72cdc42
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2023-10-03-72cdc42
|
||||
musllinux_1_2 = quay.io/pypa/musllinux_1_2_x86_64:2023-10-03-72cdc42
|
||||
|
||||
[i686]
|
||||
manylinux1 = quay.io/pypa/manylinux1_i686:2023-05-01-496eb35
|
||||
manylinux1 = quay.io/pypa/manylinux1_i686:2023-10-01-4095a57
|
||||
manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_i686:2023-05-24-3bf828e
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_i686:2023-10-03-72cdc42
|
||||
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-05-24-3bf828e
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2023-10-03-72cdc42
|
||||
musllinux_1_2 = quay.io/pypa/musllinux_1_2_i686:2023-10-03-72cdc42
|
||||
|
||||
[pypy_x86_64]
|
||||
manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2023-05-24-3bf828e
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2023-10-03-72cdc42
|
||||
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-05-24-3bf828e
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2023-10-03-72cdc42
|
||||
|
||||
[pypy_i686]
|
||||
manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_i686:2023-05-24-3bf828e
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_i686:2023-10-03-72cdc42
|
||||
manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-12-26-0d38463
|
||||
|
||||
[aarch64]
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2023-05-24-3bf828e
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2023-10-03-72cdc42
|
||||
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-05-24-3bf828e
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2023-05-24-3bf828e
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2023-10-03-72cdc42
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2023-10-03-72cdc42
|
||||
musllinux_1_2 = quay.io/pypa/musllinux_1_2_aarch64:2023-10-03-72cdc42
|
||||
|
||||
[ppc64le]
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2023-05-24-3bf828e
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2023-10-03-72cdc42
|
||||
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-05-24-3bf828e
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2023-05-24-3bf828e
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2023-10-03-72cdc42
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2023-10-03-72cdc42
|
||||
musllinux_1_2 = quay.io/pypa/musllinux_1_2_ppc64le:2023-10-03-72cdc42
|
||||
|
||||
[s390x]
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_s390x:2023-05-24-3bf828e
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_s390x:2023-10-03-72cdc42
|
||||
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-05-24-3bf828e
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2023-05-24-3bf828e
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_s390x:2023-10-03-72cdc42
|
||||
musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2023-10-03-72cdc42
|
||||
musllinux_1_2 = quay.io/pypa/musllinux_1_2_s390x:2023-10-03-72cdc42
|
||||
|
||||
[pypy_aarch64]
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2023-05-24-3bf828e
|
||||
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2023-10-03-72cdc42
|
||||
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-05-24-3bf828e
|
||||
manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2023-10-03-72cdc42
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
DIR = Path(__file__).parent.resolve()
|
||||
|
||||
|
||||
def get_schema(tool_name: str = "cibuildwheel") -> dict[str, Any]:
|
||||
"Get the stored complete schema for cibuildwheel settings."
|
||||
assert tool_name == "cibuildwheel", "Only cibuildwheel is supported."
|
||||
|
||||
with DIR.joinpath("resources/cibuildwheel.schema.json").open(encoding="utf-8") as f:
|
||||
return json.load(f) # type: ignore[no-any-return]
|
||||
@@ -3,9 +3,7 @@ from __future__ import annotations
|
||||
import os
|
||||
import subprocess
|
||||
import typing
|
||||
from typing import Union
|
||||
|
||||
from ._compat.typing import Final, Literal, Protocol
|
||||
from typing import Final, Literal, Protocol, Union
|
||||
|
||||
__all__ = (
|
||||
"PLATFORMS",
|
||||
|
||||
+49
-21
@@ -17,10 +17,10 @@ from collections import defaultdict
|
||||
from collections.abc import Generator, Iterable, Mapping, Sequence
|
||||
from dataclasses import dataclass
|
||||
from enum import Enum
|
||||
from functools import lru_cache
|
||||
from functools import cached_property, lru_cache
|
||||
from pathlib import Path, PurePath
|
||||
from time import sleep
|
||||
from typing import Any, ClassVar, TextIO, TypeVar
|
||||
from typing import Any, ClassVar, Final, Literal, TextIO, TypeVar
|
||||
|
||||
import bracex
|
||||
import certifi
|
||||
@@ -32,8 +32,6 @@ from packaging.version import Version
|
||||
from platformdirs import user_cache_path
|
||||
|
||||
from ._compat import tomllib
|
||||
from ._compat.functools import cached_property
|
||||
from ._compat.typing import Final, Literal
|
||||
from .typing import PathOrStr, PlatformName
|
||||
|
||||
__all__ = [
|
||||
@@ -59,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"
|
||||
|
||||
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, ...]] = (
|
||||
"x86_64",
|
||||
@@ -252,7 +240,7 @@ class BuildSelector:
|
||||
requires_python: SpecifierSet | None = None
|
||||
|
||||
# a pattern that skips prerelease versions, when include_prereleases is False.
|
||||
PRERELEASE_SKIP: ClassVar[str] = "cp312-*"
|
||||
PRERELEASE_SKIP: ClassVar[str] = ""
|
||||
prerelease_pythons: bool = False
|
||||
|
||||
def __call__(self, build_id: str) -> bool:
|
||||
@@ -378,6 +366,34 @@ class DependencyConstraints:
|
||||
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):
|
||||
def __init__(self) -> None:
|
||||
message = textwrap.dedent(
|
||||
@@ -701,28 +717,40 @@ def fix_ansi_codes_for_github_actions(text: str) -> str:
|
||||
|
||||
|
||||
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]]:
|
||||
"""
|
||||
Parses a string like "docker; create_args: --some-option=value another-option"
|
||||
"""
|
||||
if positional_arg_names is None:
|
||||
positional_arg_names = []
|
||||
if kw_arg_names is None:
|
||||
kw_arg_names = []
|
||||
|
||||
shlexer = shlex.shlex(key_value_string, posix=True, punctuation_chars=";:")
|
||||
all_field_names = [*positional_arg_names, *kw_arg_names]
|
||||
|
||||
shlexer = shlex.shlex(key_value_string, posix=True, punctuation_chars=";")
|
||||
shlexer.commenters = ""
|
||||
shlexer.whitespace_split = True
|
||||
parts = list(shlexer)
|
||||
# parts now looks like
|
||||
# ['docker', ';', 'create_args',':', '--some-option=value', 'another-option']
|
||||
# ['docker', ';', 'create_args:', '--some-option=value', 'another-option']
|
||||
|
||||
# split by semicolon
|
||||
fields = [list(group) for k, group in itertools.groupby(parts, lambda x: x == ";") if not k]
|
||||
|
||||
result: dict[str, list[str]] = defaultdict(list)
|
||||
for field_i, field in enumerate(fields):
|
||||
if len(field) > 1 and field[1] == ":":
|
||||
field_name = field[0]
|
||||
values = field[2:]
|
||||
# check to see if the option name is specified
|
||||
field_name, sep, first_value = field[0].partition(":")
|
||||
if sep:
|
||||
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)
|
||||
|
||||
values = ([first_value] if first_value else []) + field[1:]
|
||||
else:
|
||||
try:
|
||||
field_name = positional_arg_names[field_i]
|
||||
|
||||
+12
-8
@@ -25,10 +25,10 @@ from .typing import PathOrStr
|
||||
from .util import (
|
||||
CIBW_CACHE_PATH,
|
||||
AlreadyBuiltWheelError,
|
||||
BuildFrontend,
|
||||
BuildFrontendConfig,
|
||||
BuildFrontendName,
|
||||
BuildSelector,
|
||||
NonPlatformWheelError,
|
||||
build_frontend_or_default,
|
||||
call,
|
||||
download,
|
||||
find_compatible_wheel,
|
||||
@@ -216,7 +216,7 @@ def setup_python(
|
||||
python_configuration: PythonConfiguration,
|
||||
dependency_constraint_flags: Sequence[PathOrStr],
|
||||
environment: ParsedEnvironment,
|
||||
build_frontend: BuildFrontend,
|
||||
build_frontend: BuildFrontendName,
|
||||
) -> dict[str, str]:
|
||||
tmp.mkdir()
|
||||
implementation_id = python_configuration.identifier.split("-")[0]
|
||||
@@ -369,7 +369,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
|
||||
for config in python_configurations:
|
||||
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)
|
||||
|
||||
identifier_tmp_dir = tmp_path / config.identifier
|
||||
@@ -390,7 +390,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
config,
|
||||
dependency_constraint_flags,
|
||||
build_options.environment,
|
||||
build_frontend,
|
||||
build_frontend.name,
|
||||
)
|
||||
|
||||
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...")
|
||||
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)
|
||||
# Path.resolve() is needed. Without it pip wheel may try to fetch package from pypi.org
|
||||
# see https://github.com/pypa/cibuildwheel/pull/369
|
||||
@@ -431,7 +434,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
*extra_flags,
|
||||
env=env,
|
||||
)
|
||||
elif build_frontend == "build":
|
||||
elif build_frontend.name == "build":
|
||||
if not 0 <= build_options.build_verbosity < 2:
|
||||
msg = f"build_verbosity {build_options.build_verbosity} is not supported for build frontend. Ignoring."
|
||||
log.warning(msg)
|
||||
@@ -552,6 +555,7 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
build_options.test_command,
|
||||
project=Path(".").resolve(),
|
||||
package=options.globals.package_dir.resolve(),
|
||||
wheel=repaired_wheel,
|
||||
)
|
||||
test_cwd = identifier_tmp_dir / "test_cwd"
|
||||
test_cwd.mkdir()
|
||||
|
||||
+61
-1
@@ -4,6 +4,66 @@ title: Changelog
|
||||
|
||||
# Changelog
|
||||
|
||||
### v2.16.2
|
||||
|
||||
_3 October 2023_
|
||||
|
||||
- 🛠 Updates CPython 3.12 version to 3.12.0, final release (#1635)
|
||||
- ✨ Adds a debug option [`CIBW_DEBUG_KEEP_CONTAINER`](https://cibuildwheel.readthedocs.io/en/stable/options/#cibw_debug_keep_container) to stop cibuildwheel deleting build containers after the build finishes. (#1620)
|
||||
- 📚 Adds support for `[tool.cibuildwheel]` checking by adding a schema compatible with the [validate-pyproject](https://github.com/abravalheri/validate-pyproject/) tool (#1622, #1628, #1629)
|
||||
- 🐛 Fix parsing of `CIBW_CONTAINER_ENGINE` and `CIBW_BUILD_FRONTEND` options to not break arguments on `:` characters (#1621)
|
||||
- 🐛 Fix the evaluation order of `CIBW_ENVIRONMENT` and `CIBW_ENVIRONMENT_PASS` so that `CIBW_ENVIRONMENT` assignments can reference environment variables passed through from the host machine. (#1617)
|
||||
- 🛠 Supports manylinux images' deferred installation of interpreters through the `manylinux-interpreters` tool (#1630)
|
||||
|
||||
### 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
|
||||
|
||||
_15 July 2023_
|
||||
|
||||
- 🛠 Updates the prerelease CPython 3.12 version to 3.12.0b4 (#1550)
|
||||
|
||||
### v2.14.0
|
||||
|
||||
_10 July 2023_
|
||||
|
||||
- ✨ Adds support for building PyPy 3.10 wheels. (#1525)
|
||||
- 🛠 Updates the prerelease CPython 3.12 version to 3.12.0b3.
|
||||
- ✨ Allow the use of the `{wheel}` placeholder in CIBW_TEST_COMMAND (#1533)
|
||||
- 📚 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)
|
||||
|
||||
### 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_
|
||||
@@ -239,7 +299,7 @@ _22 October 2021_
|
||||
|
||||
- 🛠 Added support for building PyPy wheels on macOS 11 CI runners. (#875)
|
||||
|
||||
- 🛠 Setting an empty string for the [`CIBW_*_IMAGE`](https://cibuildwheel.readthedocs.io/en/stable/options/#manylinux-image) option will now fallthrough to the config file or cibuildwheel's default, rather than causing an error. This makes the option easier to use in CI build matricies. (#829)
|
||||
- 🛠 Setting an empty string for the [`CIBW_*_IMAGE`](https://cibuildwheel.readthedocs.io/en/stable/options/#manylinux-image) option will now fallthrough to the config file or cibuildwheel's default, rather than causing an error. This makes the option easier to use in CI build matrices. (#829)
|
||||
|
||||
- 🛠 Support for TOML 1.0 when reading config files, via the `tomli` package. (#876)
|
||||
|
||||
|
||||
@@ -413,8 +413,9 @@
|
||||
|
||||
- name: Tornado
|
||||
gh: tornadoweb/tornado
|
||||
ci: [travisci]
|
||||
os: [apple, linux]
|
||||
ci: [github]
|
||||
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
|
||||
gh: pytorch/fairseq
|
||||
|
||||
@@ -48,7 +48,7 @@ well as several useful actions. Alongside your existing job(s) that runs cibuild
|
||||
name: Make SDist
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Optional, use if you use setuptools_scm
|
||||
submodules: true # Optional, use if you have submodules
|
||||
@@ -61,13 +61,16 @@ well as several useful actions. Alongside your existing job(s) that runs cibuild
|
||||
path: dist/*.tar.gz
|
||||
```
|
||||
|
||||
Then, you need to publish the artifacts that the previous jobs have built. This final job should run only on release or tag, depending on your preference. It gathers the artifacts from the sdist and wheel jobs and uploads them to PyPI.
|
||||
Then, you need to publish the artifacts that the previous jobs have built. This final job should run only on release or tag, depending on your preference. It gathers the artifacts from the sdist and wheel jobs and uploads them to PyPI. The release environment (`pypi` in the example below) will be created the first time this workflow runs.
|
||||
|
||||
This requires a [PyPI upload token](https://pypi.org/manage/account/token/), stored in your [GitHub repo's secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) as `pypi_password`.
|
||||
This requires setting this GitHub workflow in your project's PyPI settings (for a [new project](https://docs.pypi.org/trusted-publishers/creating-a-project-through-oidc)/[existing project](https://docs.pypi.org/trusted-publishers/adding-a-publisher)).
|
||||
|
||||
```yaml
|
||||
upload_all:
|
||||
needs: [build_wheels, make_sdist]
|
||||
environment: pypi
|
||||
permissions:
|
||||
id-token: write
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
||||
steps:
|
||||
@@ -76,10 +79,7 @@ This requires a [PyPI upload token](https://pypi.org/manage/account/token/), sto
|
||||
name: artifact
|
||||
path: dist
|
||||
|
||||
- uses: pypa/gh-action-pypi-publish@v1.5.0
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.pypi_password }}
|
||||
- uses: pypa/gh-action-pypi-publish@release/v1
|
||||
```
|
||||
|
||||
You should use Dependabot to keep the publish action up to date. In the above
|
||||
|
||||
+37
-23
@@ -20,9 +20,13 @@ Linux wheels are built in [`manylinux`/`musllinux` containers](https://github.co
|
||||
|
||||
### Building macOS wheels for Apple Silicon {: #apple-silicon}
|
||||
|
||||
`cibuildwheel` supports cross-compiling `universal2` and `arm64` wheels on `x86_64` runners. With the introduction of Apple Silicon, you now have several choices for wheels for Python 3.8+:
|
||||
`cibuildwheel` supports cross-compiling `universal2` and `arm64` wheels on `x86_64` runners.
|
||||
|
||||
#### `x86_64`
|
||||
#### Overview of Mac architectures
|
||||
|
||||
With the introduction of Apple Silicon, you now have several choices for wheels for Python 3.8+:
|
||||
|
||||
##### `x86_64`
|
||||
|
||||
The traditional wheel for Apple, loads on Intel machines, and on
|
||||
Apple Silicon when running Python under Rosetta 2 emulation.
|
||||
@@ -30,51 +34,61 @@ Apple Silicon when running Python under Rosetta 2 emulation.
|
||||
Due to a change in naming, Pip 20.3+ (or an installer using packaging 20.5+)
|
||||
is required to install a binary wheel on macOS Big Sur.
|
||||
|
||||
#### `arm64`
|
||||
##### `arm64`
|
||||
|
||||
The native wheel for macOS on Apple Silicon.
|
||||
|
||||
Requires Pip 20.3+ (or packaging 20.5+) to install.
|
||||
|
||||
#### `universal2`
|
||||
##### `universal2`
|
||||
|
||||
This wheel contains both architectures, causing it to be up to twice the
|
||||
size (data files do not get doubled, only compiled code). It requires
|
||||
Pip 20.3 (Packaging 20.6+) to load on Intel, and Pip 21.0.1 (Packaging 20.9+)
|
||||
to load on Apple Silicon.
|
||||
|
||||
!!! note
|
||||
The dual-architecture `universal2` has a few benefits, but a key benefit
|
||||
to a universal wheel is that a user can bundle these wheels into an
|
||||
application and ship a single binary.
|
||||
The dual-architecture `universal2` has a few benefits, but a key benefit
|
||||
to a universal wheel is that a user can bundle these wheels into an
|
||||
application and ship a single binary.
|
||||
|
||||
However, if you have a large library, then you might prefer to ship
|
||||
the two single-arch wheels instead - `x86_64` and `arm64`. In rare cases,
|
||||
you might want to build all three, but in that case, pip will not download
|
||||
the universal wheels, because it prefers the most specific wheel
|
||||
available.
|
||||
However, if you have a large library, then you might prefer to ship
|
||||
the two single-arch wheels instead - `x86_64` and `arm64`. In rare cases,
|
||||
you might want to build all three, but in that case, pip will not download
|
||||
the universal wheels, because it prefers the most specific wheel
|
||||
available.
|
||||
|
||||
#### What to provide?
|
||||
|
||||
Generally speaking, because Pip 20.3 is required for the `universal2` wheel,
|
||||
most packages should provide both `x86_64` and one of `universal2`/`arm64`
|
||||
wheels for now. When Pip 20.3+ is common on macOS, then it might be possible
|
||||
to ship only the `universal2` wheel.
|
||||
wheels. When Pip 20.3+ is common on macOS, then it might be possible to ship
|
||||
only the `universal2` wheel.
|
||||
|
||||
**Apple Silicon wheels are not built by default on Intel runners**, but can be enabled by adding extra archs to the [`CIBW_ARCHS_MACOS` option](options.md#archs) - e.g. `x86_64 arm64`. Cross-compilation is provided by the Xcode toolchain.
|
||||
Opinions vary on which of arch-specific or `universal2` wheels are best - some packagers prefer `universal2` because it's one wheel for all Mac users, so simpler, and easier to build into apps for downstream users. However, because they contain code for both architectures, their file size is larger, meaning they consume more disk space and bandwidth, and are harder to build for some projects.
|
||||
|
||||
See [GitHub issue 1333](https://github.com/pypa/cibuildwheel/issues/1333) for more discussion.
|
||||
|
||||
#### How to cross-compile
|
||||
|
||||
With the exception of Cirrus CI, macOS CI runners are still Intel-based, and Apple Silicon wheels are not built by default on Intel runners. However, cross-compilation can be enabled by adding extra archs to the [`CIBW_ARCHS_MACOS` option](options.md#archs) - e.g. `x86_64 arm64`. Cross-compilation is provided by the Xcode toolchain.
|
||||
|
||||
!!! important
|
||||
When cross-compiling on Intel, it is not possible to test `arm64` and the `arm64` part of a `universal2` wheel.
|
||||
|
||||
`cibuildwheel` will raise a warning to notify you of this - these warnings be be silenced by skipping testing on these platforms: `CIBW_TEST_SKIP: *_arm64 *_universal2:arm64`.
|
||||
|
||||
Hopefully, cross-compilation is a temporary situation. Once we have widely
|
||||
available Apple Silicon CI runners, we can build and test `arm64` and
|
||||
`universal2` wheels natively. That's why `universal2`/`arm64` wheels require opt-in by setting `CIBW_ARCHS_MACOS`.
|
||||
|
||||
!!! note
|
||||
Your runner needs Xcode Command Line Tools 12.2 or later to build `universal2` or `arm64`.
|
||||
|
||||
Only CPython 3.8 and newer support `universal2` and `arm64` wheels.
|
||||
|
||||
!!! note
|
||||
If your project uses **Poetry** as a build backend, cross-compiling on macOS [does not currently work](https://github.com/python-poetry/poetry/issues/7107). In some cases arm64 wheels can be built but their tags will be incorrect, with the platform tag showing `x86_64` instead of `arm64`.
|
||||
|
||||
As a workaround, the tag can be fixed before running delocate to repair the wheel. The [`wheel tags`](https://wheel.readthedocs.io/en/stable/reference/wheel_tags.html) command is ideal for this. See [this workflow](https://gist.github.com/anderssonjohan/49f07e33fc5cb2420515a8ac76dc0c95#file-build-pendulum-wheels-yml-L39-L53) for an example usage of `wheel tags`.
|
||||
|
||||
Hopefully, cross-compilation is a temporary situation. Once we have widely available Apple Silicon CI runners, we can build `arm64` wheels natively. Until then, cross-compiling `arm64` or `universal2` wheels requires opt-in by setting `CIBW_ARCHS_MACOS` on Intel runners.
|
||||
|
||||
Here's an example GitHub Actions workflow with a job that builds for Apple Silicon:
|
||||
|
||||
> .github/workflows/build_macos.yml
|
||||
@@ -145,7 +159,7 @@ There are two suggested methods for keeping cibuildwheel up to date that instead
|
||||
If you use GitHub Actions for builds, you can use cibuildwheel as an action:
|
||||
|
||||
```yaml
|
||||
uses: pypa/cibuildwheel@v2.13.0
|
||||
uses: pypa/cibuildwheel@v2.16.2
|
||||
```
|
||||
|
||||
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.
|
||||
@@ -167,7 +181,7 @@ The second option, and the only one that supports other CI systems, is using a `
|
||||
|
||||
```bash
|
||||
# requirements-cibw.txt
|
||||
cibuildwheel==2.13.0
|
||||
cibuildwheel==2.16.2
|
||||
```
|
||||
|
||||
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:
|
||||
@@ -311,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
|
||||
python3 -m pip install pipx
|
||||
|
||||
pipx run cibuildwheel==2.13.0 --output-dir wheelhouse
|
||||
pipx run cibuildwheel==2.16.2 --output-dir wheelhouse
|
||||
pipx run twine upload wheelhouse/*.whl
|
||||
```
|
||||
|
||||
|
||||
+55
-23
@@ -218,18 +218,19 @@ When setting the options, you can use shell-style globbing syntax, as per [fnmat
|
||||
|
||||
<div class="build-id-table-marker"></div>
|
||||
|
||||
| | macOS | Windows | Linux Intel | Linux Other |
|
||||
|--------------|------------------------------------------------------------------------|-----------------------------------------------------|-----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Python 3.6 | cp36-macosx_x86_64 | cp36-win_amd64<br/>cp36-win32 | cp36-manylinux_x86_64<br/>cp36-manylinux_i686<br/>cp36-musllinux_x86_64<br/>cp36-musllinux_i686 | cp36-manylinux_aarch64<br/>cp36-manylinux_ppc64le<br/>cp36-manylinux_s390x<br/>cp36-musllinux_aarch64<br/>cp36-musllinux_ppc64le<br/>cp36-musllinux_s390x |
|
||||
| Python 3.7 | cp37-macosx_x86_64 | cp37-win_amd64<br/>cp37-win32 | cp37-manylinux_x86_64<br/>cp37-manylinux_i686<br/>cp37-musllinux_x86_64<br/>cp37-musllinux_i686 | cp37-manylinux_aarch64<br/>cp37-manylinux_ppc64le<br/>cp37-manylinux_s390x<br/>cp37-musllinux_aarch64<br/>cp37-musllinux_ppc64le<br/>cp37-musllinux_s390x |
|
||||
| Python 3.8 | cp38-macosx_x86_64<br/>cp38-macosx_universal2<br/>cp38-macosx_arm64 | cp38-win_amd64<br/>cp38-win32 | cp38-manylinux_x86_64<br/>cp38-manylinux_i686<br/>cp38-musllinux_x86_64<br/>cp38-musllinux_i686 | cp38-manylinux_aarch64<br/>cp38-manylinux_ppc64le<br/>cp38-manylinux_s390x<br/>cp38-musllinux_aarch64<br/>cp38-musllinux_ppc64le<br/>cp38-musllinux_s390x |
|
||||
| Python 3.9 | cp39-macosx_x86_64<br/>cp39-macosx_universal2<br/>cp39-macosx_arm64 | cp39-win_amd64<br/>cp39-win32<br/>cp39-win_arm64 | cp39-manylinux_x86_64<br/>cp39-manylinux_i686<br/>cp39-musllinux_x86_64<br/>cp39-musllinux_i686 | cp39-manylinux_aarch64<br/>cp39-manylinux_ppc64le<br/>cp39-manylinux_s390x<br/>cp39-musllinux_aarch64<br/>cp39-musllinux_ppc64le<br/>cp39-musllinux_s390x |
|
||||
| Python 3.10 | cp310-macosx_x86_64<br/>cp310-macosx_universal2<br/>cp310-macosx_arm64 | cp310-win_amd64<br/>cp310-win32<br/>cp310-win_arm64 | cp310-manylinux_x86_64<br/>cp310-manylinux_i686<br/>cp310-musllinux_x86_64<br/>cp310-musllinux_i686 | cp310-manylinux_aarch64<br/>cp310-manylinux_ppc64le<br/>cp310-manylinux_s390x<br/>cp310-musllinux_aarch64<br/>cp310-musllinux_ppc64le<br/>cp310-musllinux_s390x |
|
||||
| Python 3.11 | cp311-macosx_x86_64<br/>cp311-macosx_universal2<br/>cp311-macosx_arm64 | cp311-win_amd64<br/>cp311-win32<br/>cp311-win_arm64 | cp311-manylinux_x86_64<br/>cp311-manylinux_i686<br/>cp311-musllinux_x86_64<br/>cp311-musllinux_i686 | cp311-manylinux_aarch64<br/>cp311-manylinux_ppc64le<br/>cp311-manylinux_s390x<br/>cp311-musllinux_aarch64<br/>cp311-musllinux_ppc64le<br/>cp311-musllinux_s390x |
|
||||
| Python 3.12 | cp312-macosx_x86_64<br/>cp312-macosx_universal2<br/>cp312-macosx_arm64 | cp312-win_amd64<br/>cp312-win32<br/>cp312-win_arm64 | cp312-manylinux_x86_64<br/>cp312-manylinux_i686<br/>cp312-musllinux_x86_64<br/>cp312-musllinux_i686 | cp312-manylinux_aarch64<br/>cp312-manylinux_ppc64le<br/>cp312-manylinux_s390x<br/>cp312-musllinux_aarch64<br/>cp312-musllinux_ppc64le<br/>cp312-musllinux_s390x |
|
||||
| PyPy3.7 v7.3 | pp37-macosx_x86_64 | pp37-win_amd64 | pp37-manylinux_x86_64<br/>pp37-manylinux_i686 | pp37-manylinux_aarch64 |
|
||||
| PyPy3.8 v7.3 | pp38-macosx_x86_64<br/>pp38-macosx_arm64 | pp38-win_amd64 | pp38-manylinux_x86_64<br/>pp38-manylinux_i686 | pp38-manylinux_aarch64 |
|
||||
| PyPy3.9 v7.3 | pp39-macosx_x86_64<br/>pp39-macosx_arm64 | pp39-win_amd64 | pp39-manylinux_x86_64<br/>pp39-manylinux_i686 | pp39-manylinux_aarch64 |
|
||||
| | macOS | Windows | Linux Intel | Linux Other |
|
||||
|---------------|------------------------------------------------------------------------|-----------------------------------------------------|-----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Python 3.6 | cp36-macosx_x86_64 | cp36-win_amd64<br/>cp36-win32 | cp36-manylinux_x86_64<br/>cp36-manylinux_i686<br/>cp36-musllinux_x86_64<br/>cp36-musllinux_i686 | cp36-manylinux_aarch64<br/>cp36-manylinux_ppc64le<br/>cp36-manylinux_s390x<br/>cp36-musllinux_aarch64<br/>cp36-musllinux_ppc64le<br/>cp36-musllinux_s390x |
|
||||
| Python 3.7 | cp37-macosx_x86_64 | cp37-win_amd64<br/>cp37-win32 | cp37-manylinux_x86_64<br/>cp37-manylinux_i686<br/>cp37-musllinux_x86_64<br/>cp37-musllinux_i686 | cp37-manylinux_aarch64<br/>cp37-manylinux_ppc64le<br/>cp37-manylinux_s390x<br/>cp37-musllinux_aarch64<br/>cp37-musllinux_ppc64le<br/>cp37-musllinux_s390x |
|
||||
| Python 3.8 | cp38-macosx_x86_64<br/>cp38-macosx_universal2<br/>cp38-macosx_arm64 | cp38-win_amd64<br/>cp38-win32 | cp38-manylinux_x86_64<br/>cp38-manylinux_i686<br/>cp38-musllinux_x86_64<br/>cp38-musllinux_i686 | cp38-manylinux_aarch64<br/>cp38-manylinux_ppc64le<br/>cp38-manylinux_s390x<br/>cp38-musllinux_aarch64<br/>cp38-musllinux_ppc64le<br/>cp38-musllinux_s390x |
|
||||
| Python 3.9 | cp39-macosx_x86_64<br/>cp39-macosx_universal2<br/>cp39-macosx_arm64 | cp39-win_amd64<br/>cp39-win32<br/>cp39-win_arm64 | cp39-manylinux_x86_64<br/>cp39-manylinux_i686<br/>cp39-musllinux_x86_64<br/>cp39-musllinux_i686 | cp39-manylinux_aarch64<br/>cp39-manylinux_ppc64le<br/>cp39-manylinux_s390x<br/>cp39-musllinux_aarch64<br/>cp39-musllinux_ppc64le<br/>cp39-musllinux_s390x |
|
||||
| Python 3.10 | cp310-macosx_x86_64<br/>cp310-macosx_universal2<br/>cp310-macosx_arm64 | cp310-win_amd64<br/>cp310-win32<br/>cp310-win_arm64 | cp310-manylinux_x86_64<br/>cp310-manylinux_i686<br/>cp310-musllinux_x86_64<br/>cp310-musllinux_i686 | cp310-manylinux_aarch64<br/>cp310-manylinux_ppc64le<br/>cp310-manylinux_s390x<br/>cp310-musllinux_aarch64<br/>cp310-musllinux_ppc64le<br/>cp310-musllinux_s390x |
|
||||
| Python 3.11 | cp311-macosx_x86_64<br/>cp311-macosx_universal2<br/>cp311-macosx_arm64 | cp311-win_amd64<br/>cp311-win32<br/>cp311-win_arm64 | cp311-manylinux_x86_64<br/>cp311-manylinux_i686<br/>cp311-musllinux_x86_64<br/>cp311-musllinux_i686 | cp311-manylinux_aarch64<br/>cp311-manylinux_ppc64le<br/>cp311-manylinux_s390x<br/>cp311-musllinux_aarch64<br/>cp311-musllinux_ppc64le<br/>cp311-musllinux_s390x |
|
||||
| Python 3.12 | cp312-macosx_x86_64<br/>cp312-macosx_universal2<br/>cp312-macosx_arm64 | cp312-win_amd64<br/>cp312-win32<br/>cp312-win_arm64 | cp312-manylinux_x86_64<br/>cp312-manylinux_i686<br/>cp312-musllinux_x86_64<br/>cp312-musllinux_i686 | cp312-manylinux_aarch64<br/>cp312-manylinux_ppc64le<br/>cp312-manylinux_s390x<br/>cp312-musllinux_aarch64<br/>cp312-musllinux_ppc64le<br/>cp312-musllinux_s390x |
|
||||
| PyPy3.7 v7.3 | pp37-macosx_x86_64 | pp37-win_amd64 | pp37-manylinux_x86_64<br/>pp37-manylinux_i686 | pp37-manylinux_aarch64 |
|
||||
| PyPy3.8 v7.3 | pp38-macosx_x86_64<br/>pp38-macosx_arm64 | pp38-win_amd64 | pp38-manylinux_x86_64<br/>pp38-manylinux_i686 | pp38-manylinux_aarch64 |
|
||||
| PyPy3.9 v7.3 | pp39-macosx_x86_64<br/>pp39-macosx_arm64 | pp39-win_amd64 | pp39-manylinux_x86_64<br/>pp39-manylinux_i686 | pp39-manylinux_aarch64 |
|
||||
| PyPy3.10 v7.3 | pp310-macosx_x86_64<br/>pp310-macosx_arm64 | pp310-win_amd64 | pp310-manylinux_x86_64<br/>pp310-manylinux_i686 | pp310-manylinux_aarch64 |
|
||||
|
||||
The list of supported and currently selected build identifiers can also be retrieved by passing the `--print-build-identifiers` flag to cibuildwheel.
|
||||
The format is `python_tag-platform_tag`, with tags similar to those in [PEP 425](https://www.python.org/dev/peps/pep-0425/#details).
|
||||
@@ -503,9 +504,19 @@ This option can also be set using the [command-line option](#command-line) `--pr
|
||||
### `CIBW_BUILD_FRONTEND` {: #build-frontend}
|
||||
> 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`.
|
||||
|
||||
You can specify extra arguments to pass to `pip wheel` or `build` using the
|
||||
optional `args` option.
|
||||
|
||||
!!! tip
|
||||
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
|
||||
@@ -525,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
|
||||
CIBW_BUILD_FRONTEND: "pip"
|
||||
|
||||
# supply an extra argument to 'pip wheel'
|
||||
CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation"
|
||||
```
|
||||
|
||||
!!! tab examples "pyproject.toml"
|
||||
@@ -536,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
|
||||
build-frontend = "pip"
|
||||
|
||||
# supply an extra argument to 'pip wheel'
|
||||
build-frontend = { name = "pip", args = ["--no-build-isolation"] }
|
||||
```
|
||||
|
||||
### `CIBW_CONFIG_SETTINGS` {: #config-settings}
|
||||
@@ -550,7 +567,7 @@ a table of items, including arrays.
|
||||
single values.
|
||||
|
||||
Platform-specific environment variables also available:<br/>
|
||||
`CIBW_BEFORE_ALL_MACOS` | `CIBW_BEFORE_ALL_WINDOWS` | `CIBW_BEFORE_ALL_LINUX`
|
||||
`CIBW_CONFIG_SETTINGS_MACOS` | `CIBW_CONFIG_SETTINGS_WINDOWS` | `CIBW_CONFIG_SETTINGS_LINUX`
|
||||
|
||||
|
||||
#### Examples
|
||||
@@ -663,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.
|
||||
|
||||
!!! note
|
||||
cibuildwheel automatically passes the environment variable [`SOURCE_DATE_EPOCH`](https://reproducible-builds.org/docs/source-date-epoch/) if defined.
|
||||
|
||||
#### Examples
|
||||
|
||||
!!! tab examples "Environment passthrough"
|
||||
@@ -897,9 +917,7 @@ Platform-specific environment variables are also available:<br/>
|
||||
CIBW_REPAIR_WHEEL_COMMAND: >
|
||||
python scripts/repair_wheel.py -w {dest_dir} {wheel} &&
|
||||
python scripts/check_repaired_wheel.py -w {dest_dir} {wheel}
|
||||
```
|
||||
|
||||
```yaml
|
||||
# Use abi3audit to catch issues with Limited API wheels
|
||||
CIBW_REPAIR_WHEEL_COMMAND_LINUX: >
|
||||
auditwheel repair -w {dest_dir} {wheel} &&
|
||||
@@ -933,9 +951,7 @@ Platform-specific environment variables are also available:<br/>
|
||||
'python scripts/repair_wheel.py -w {dest_dir} {wheel}',
|
||||
'python scripts/check_repaired_wheel.py -w {dest_dir} {wheel}',
|
||||
]
|
||||
```
|
||||
|
||||
```toml
|
||||
# Use abi3audit to catch issues with Limited API wheels
|
||||
[tool.cibuildwheel.linux]
|
||||
repair-wheel-command = [
|
||||
@@ -980,7 +996,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
|
||||
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).
|
||||
|
||||
@@ -1344,11 +1360,11 @@ Platform-specific environment variables are also available:<br/>
|
||||
> Install your wheel for testing using `extras_require`
|
||||
|
||||
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
|
||||
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
|
||||
`setup.cfg`.
|
||||
`CIBW_TEST_REQUIRES` if they are already defined in `pyproject.toml`,
|
||||
`setup.cfg` or `setup.py`.
|
||||
|
||||
Platform-specific environment variables are also available:<br/>
|
||||
`CIBW_TEST_EXTRAS_MACOS` | `CIBW_TEST_EXTRAS_WINDOWS` | `CIBW_TEST_EXTRAS_LINUX`
|
||||
@@ -1406,7 +1422,23 @@ This option is not supported in the overrides section in `pyproject.toml`.
|
||||
test-skip = "*-macosx_arm64 *-macosx_universal2:arm64"
|
||||
```
|
||||
|
||||
## Other
|
||||
## Debugging
|
||||
|
||||
### `CIBW_DEBUG_KEEP_CONTAINER`
|
||||
|
||||
Enable this flag to keep the container around for inspection after a build. This
|
||||
option is provided for debugging purposes only.
|
||||
|
||||
Default: Off (0).
|
||||
|
||||
!!! caution
|
||||
This option can only be set as environment variable on the host machine
|
||||
|
||||
#### Examples
|
||||
|
||||
```shell
|
||||
export CIBW_DEBUG_KEEP_CONTAINER=TRUE
|
||||
```
|
||||
|
||||
### `CIBW_BUILD_VERBOSITY` {: #build-verbosity}
|
||||
> Increase/decrease the output of pip wheel
|
||||
|
||||
+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]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build wheels
|
||||
run: pipx run cibuildwheel==2.13.0
|
||||
run: pipx run cibuildwheel==2.16.2
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
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]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Used to host cibuildwheel
|
||||
- uses: actions/setup-python@v3
|
||||
|
||||
- name: Install cibuildwheel
|
||||
run: python -m pip install cibuildwheel==2.13.0
|
||||
run: python -m pip install cibuildwheel==2.16.2
|
||||
|
||||
- name: Build wheels
|
||||
run: python -m cibuildwheel --output-dir wheelhouse
|
||||
|
||||
+51
-49
@@ -9,30 +9,30 @@ title: Working examples
|
||||
| Name | CI | OS | Notes |
|
||||
|-----------------------------------|----|----|:------|
|
||||
| [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. |
|
||||
| [NumPy][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The fundamental package for scientific computing with Python. |
|
||||
| [pytorch-fairseq][] | ![github icon][] | ![apple icon][] ![linux icon][] | Facebook AI Research Sequence-to-Sequence Toolkit written in Python. |
|
||||
| [Tornado][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. |
|
||||
| [NumPy][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The fundamental package for scientific computing with Python. |
|
||||
| [Tornado][] | ![github icon][] | ![linux icon][] ![apple icon][] ![windows icon][] | Tornado is a Python web framework and asynchronous networking library. Uses stable ABI for a small C extension. |
|
||||
| [Matplotlib][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The venerable Matplotlib, a Python library with C++ portions |
|
||||
| [NCNN][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | ncnn is a high-performance neural network inference framework optimized for the mobile platform |
|
||||
| [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 |
|
||||
| [MyPy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | The compiled version of MyPy using MyPyC. |
|
||||
| [MemRay][] | ![github icon][] | ![linux icon][] | Memray is a memory profiler for Python |
|
||||
| [Kivy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Open source UI framework written in Python, running on Windows, Linux, macOS, Android and iOS |
|
||||
| [duckdb][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | DuckDB is an in-process SQL OLAP Database Management System |
|
||||
| [MemRay][] | ![github icon][] | ![linux icon][] | The endgame Python memory profiler |
|
||||
| [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 |
|
||||
| [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 🚀 |
|
||||
| [Google Benchmark][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A microbenchmark support library |
|
||||
| [Apache Beam][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Apache Beam is a unified programming model for Batch and Streaming data processing. |
|
||||
| [Triton][] | ![github icon][] | ![linux icon][] | Self hosted runners |
|
||||
| [asyncpg][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A fast PostgreSQL Database Client Library for Python/asyncio. |
|
||||
| [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. |
|
||||
| [cmake][] | ![github icon][] ![travisci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Multitagged binary builds for all supported platforms, using cibw 2 config configuration. |
|
||||
| [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. |
|
||||
| [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. |
|
||||
| [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 |
|
||||
| [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. |
|
||||
@@ -40,41 +40,41 @@ 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. |
|
||||
| [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 |
|
||||
| [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 |
|
||||
| [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 |
|
||||
| [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 |
|
||||
| [PyYAML][] | ![github icon][] | ![apple icon][] | Canonical source repository for PyYAML |
|
||||
| [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. |
|
||||
| [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. |
|
||||
| [Line Profiler][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Line-by-line profiling for Python |
|
||||
| [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 |
|
||||
| [SimpleJSON][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | simplejson is a simple, fast, extensible JSON encoder/decoder for Python |
|
||||
| [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 |
|
||||
| [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 |
|
||||
| [OpenTimelineIO][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Open Source API and interchange format for editorial timeline information. |
|
||||
| [ruptures][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Extensive Cython + NumPy [pyproject.toml](https://github.com/deepcharles/ruptures/blob/master/pyproject.toml) example. |
|
||||
| [OpenTimelineIO][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Open Source API and interchange format for editorial timeline information. |
|
||||
| [PyTables][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python package to manage extremely large amounts of data |
|
||||
| [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. |
|
||||
| [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. |
|
||||
| [DeepForest][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | An Efficient, Scalable and Optimized Python Framework for Deep Forest (2021.2.1) |
|
||||
| [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. |
|
||||
| [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 ¶ |
|
||||
| [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. |
|
||||
| [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 |
|
||||
| [python-rapidjson][] | ![travisci icon][] ![gitlab icon][] ![appveyor icon][] | ![windows icon][] ![linux icon][] | Python wrapper around rapidjson |
|
||||
| [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 |
|
||||
| [KDEpy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Kernel Density Estimation in Python |
|
||||
| [python-snappy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Python bindings for the snappy google library |
|
||||
| [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 |
|
||||
| [python-rapidjson][] | ![travisci icon][] ![gitlab icon][] ![appveyor icon][] | ![windows icon][] ![linux icon][] | Python wrapper around rapidjson |
|
||||
| [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. |
|
||||
| [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 |
|
||||
@@ -88,56 +88,57 @@ title: Working examples
|
||||
| [PyGLM][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Fast OpenGL Mathematics (GLM) for Python |
|
||||
| [TgCrypto][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes a Windows Travis build. |
|
||||
| [bx-python][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | A library that includes Cython extensions. |
|
||||
| [boost-histogram][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Supports full range of wheels, including PyPy and alternate archs. |
|
||||
| [iDynTree][] | ![github icon][] | ![linux icon][] | Uses manylinux_2_24 |
|
||||
| [Python-WebRTC][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | a Python extension that provides bindings to WebRTC M92 |
|
||||
| [boost-histogram][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Supports full range of wheels, including PyPy and alternate archs. |
|
||||
| [pillow-heif][] | ![github icon][] ![cirrusci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Bindings to libheif library with third party dependencies. Fully automated CI for tests and publishing including Apple Silicon builds. |
|
||||
| [Python-WebRTC][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | a Python extension that provides bindings to WebRTC M92 |
|
||||
| [pybase64][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Fast Base64 encoding/decoding in Python |
|
||||
| [Arbor][] | ![github icon][] | ![apple icon][] ![linux icon][] | Arbor is a multi-compartment neuron simulation library; compatible with next-generation accelerators; best-practices applied to research software; focused on community-driven development. Includes a [small script](https://github.com/arbor-sim/arbor/blob/master/scripts/patchwheel.py) patching `rpath` in bundled libraries. |
|
||||
| [fathon][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | python package for DFA (Detrended Fluctuation Analysis) and related algorithms |
|
||||
| [Imagecodecs (fork)][] | ![azurepipelines icon][] | ![apple icon][] ![linux icon][] | Over 20 external dependencies in compiled libraries, custom docker image, `libomp`, `openblas` and `install_name_tool` for macOS. |
|
||||
| [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. |
|
||||
| [polaroid][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Full range of wheels for setuptools rust, with auto release and PyPI deploy. |
|
||||
| [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 |
|
||||
| [pybind11 scikit_build_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | An example combining scikit-build and pybind11 |
|
||||
| [clang-format][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Scikit-build wrapper around LLVM's CMake, all platforms, generic wheels. |
|
||||
| [numpythia][] | ![github icon][] | ![apple icon][] ![linux icon][] | The interface between PYTHIA and NumPy |
|
||||
| [ninja][] | ![github icon][] ![travisci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Multitagged binary builds for all supported platforms, using cibw 2 config configuration. |
|
||||
| [numpythia][] | ![github icon][] | ![apple icon][] ![linux icon][] | The interface between PYTHIA and NumPy |
|
||||
| [pyjet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The interface between FastJet and NumPy |
|
||||
| [GSD][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Cython and NumPy project with 64-bit wheels. |
|
||||
| [ril][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A python binding to Rust Imaging library using maturin and Pyo3, utilizes Github Action cache to improve speed. Builds abi3 wheels. |
|
||||
| [SiPM][] | ![github icon][] | ![apple icon][] ![linux icon][] | High performance library for SiPM detectors simulation using C++17, OpenMP and AVX2 intrinsics. |
|
||||
| [GSD][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Cython and NumPy project with 64-bit wheels. |
|
||||
| [CorrectionLib][] | ![github icon][] | ![apple icon][] ![linux icon][] | Structured JSON powered correction library for HEP, designed for the CMS experiment at CERN. |
|
||||
| [pyinstrument_cext][] | ![travisci icon][] ![appveyor icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A simple C extension, without external dependencies |
|
||||
| [xmlstarlet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Python 3.6+ CFFI bindings with true MSVC build. |
|
||||
| [aalink][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Async Python interface for Ableton Link. |
|
||||
| [pybind11 cross build example][] | ![github icon][] ![gitlab icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Same as pybind11 cmake_example but used to demo Linux ARM + Windows + macOS builds on GitLab |
|
||||
|
||||
[scikit-learn]: https://github.com/scikit-learn/scikit-learn
|
||||
[NumPy]: https://github.com/numpy/numpy
|
||||
[pytorch-fairseq]: https://github.com/pytorch/fairseq
|
||||
[NumPy]: https://github.com/numpy/numpy
|
||||
[Tornado]: https://github.com/tornadoweb/tornado
|
||||
[Matplotlib]: https://github.com/matplotlib/matplotlib
|
||||
[NCNN]: https://github.com/Tencent/ncnn
|
||||
[Prophet]: https://github.com/facebook/prophet
|
||||
[Kivy]: https://github.com/kivy/kivy
|
||||
[MyPy]: https://github.com/mypyc/mypy_mypyc-wheels
|
||||
[MemRay]: https://github.com/bloomberg/memray
|
||||
[Kivy]: https://github.com/kivy/kivy
|
||||
[duckdb]: https://github.com/duckdb/duckdb
|
||||
[MemRay]: https://github.com/bloomberg/memray
|
||||
[uvloop]: https://github.com/MagicStack/uvloop
|
||||
[psutil]: https://github.com/giampaolo/psutil
|
||||
[Triton]: https://github.com/openai/triton
|
||||
[vaex]: https://github.com/vaexio/vaex
|
||||
[Google Benchmark]: https://github.com/google/benchmark
|
||||
[Apache Beam]: https://github.com/apache/beam
|
||||
[Triton]: https://github.com/openai/triton
|
||||
[asyncpg]: https://github.com/MagicStack/asyncpg
|
||||
[PyGame]: https://github.com/pygame/pygame
|
||||
[asyncpg]: https://github.com/MagicStack/asyncpg
|
||||
[cmake]: https://github.com/scikit-build/cmake-python-distributions
|
||||
[scikit-image]: https://github.com/scikit-image/scikit-image
|
||||
[twisted-iocpsupport]: https://github.com/twisted/twisted-iocpsupport
|
||||
[PyOxidizer]: https://github.com/indygreg/PyOxidizer
|
||||
[websockets]: https://github.com/aaugustin/websockets
|
||||
[cvxpy]: https://github.com/cvxpy/cvxpy
|
||||
[websockets]: https://github.com/aaugustin/websockets
|
||||
[River]: https://github.com/online-ml/river
|
||||
[UltraJSON]: https://github.com/ultrajson/ultrajson
|
||||
[OpenSpiel]: https://github.com/deepmind/open_spiel
|
||||
@@ -145,41 +146,41 @@ title: Working examples
|
||||
[pyzmq]: https://github.com/zeromq/pyzmq
|
||||
[Confluent client for Kafka]: https://github.com/confluentinc/confluent-kafka-python
|
||||
[Implicit]: https://github.com/benfred/implicit
|
||||
[vispy]: https://github.com/vispy/vispy
|
||||
[Dependency Injector]: https://github.com/ets-labs/python-dependency-injector
|
||||
[vispy]: https://github.com/vispy/vispy
|
||||
[tinyobjloader]: https://github.com/tinyobjloader/tinyobjloader
|
||||
[coverage.py]: https://github.com/nedbat/coveragepy
|
||||
[PyCryptodome]: https://github.com/Legrandin/pycryptodome
|
||||
[PyYAML]: https://github.com/yaml/pyyaml
|
||||
[Line Profiler]: https://github.com/pyutils/line_profiler
|
||||
[numexpr]: https://github.com/pydata/numexpr
|
||||
[PyAV]: https://github.com/PyAV-Org/PyAV
|
||||
[h5py]: https://github.com/h5py/h5py
|
||||
[CTranslate2]: https://github.com/OpenNMT/CTranslate2
|
||||
[Wrapt]: https://github.com/GrahamDumpleton/wrapt
|
||||
[Line Profiler]: https://github.com/pyutils/line_profiler
|
||||
[pikepdf]: https://github.com/pikepdf/pikepdf
|
||||
[envd]: https://github.com/tensorchord/envd
|
||||
[SimpleJSON]: https://github.com/simplejson/simplejson
|
||||
[OpenColorIO]: https://github.com/AcademySoftwareFoundation/OpenColorIO
|
||||
[SimpleJSON]: https://github.com/simplejson/simplejson
|
||||
[aioquic]: https://github.com/aiortc/aioquic
|
||||
[OpenTimelineIO]: https://github.com/PixarAnimationStudios/OpenTimelineIO
|
||||
[ruptures]: https://github.com/deepcharles/ruptures
|
||||
[OpenTimelineIO]: https://github.com/PixarAnimationStudios/OpenTimelineIO
|
||||
[PyTables]: https://github.com/PyTables/PyTables
|
||||
[Psycopg 3]: https://github.com/psycopg/psycopg
|
||||
[Parselmouth]: https://github.com/YannickJadoul/Parselmouth
|
||||
[CTranslate2]: https://github.com/OpenNMT/CTranslate2
|
||||
[DeepForest]: https://github.com/LAMDA-NJU/Deep-Forest
|
||||
[google neuroglancer]: https://github.com/google/neuroglancer
|
||||
[AutoPy]: https://github.com/autopilot-rs/autopy
|
||||
[H3-py]: https://github.com/uber/h3-py
|
||||
[Rtree]: https://github.com/Toblerity/rtree
|
||||
[markupsafe]: https://github.com/pallets/markupsafe
|
||||
[Picologging]: https://github.com/microsoft/picologging
|
||||
[pybind11 cmake_example]: https://github.com/pybind/cmake_example
|
||||
[python-rapidjson]: https://github.com/python-rapidjson/python-rapidjson
|
||||
[mosec]: https://github.com/mosecorg/mosec
|
||||
[KDEpy]: https://github.com/tommyod/KDEpy
|
||||
[python-snappy]: https://github.com/andrix/python-snappy
|
||||
[Rtree]: https://github.com/Toblerity/rtree
|
||||
[Picologging]: https://github.com/microsoft/picologging
|
||||
[markupsafe]: https://github.com/pallets/markupsafe
|
||||
[pybind11 cmake_example]: https://github.com/pybind/cmake_example
|
||||
[time-machine]: https://github.com/adamchainz/time-machine
|
||||
[KDEpy]: https://github.com/tommyod/KDEpy
|
||||
[python-rapidjson]: https://github.com/python-rapidjson/python-rapidjson
|
||||
[python-snappy]: https://github.com/andrix/python-snappy
|
||||
[tgcalls]: https://github.com/MarshalX/tgcalls
|
||||
[dd-trace-py]: https://github.com/DataDog/dd-trace-py
|
||||
[pybind11 python_example]: https://github.com/pybind/python_example
|
||||
@@ -193,29 +194,30 @@ title: Working examples
|
||||
[PyGLM]: https://github.com/Zuzu-Typ/PyGLM
|
||||
[TgCrypto]: https://github.com/pyrogram/tgcrypto
|
||||
[bx-python]: https://github.com/bxlab/bx-python
|
||||
[boost-histogram]: https://github.com/scikit-hep/boost-histogram
|
||||
[iDynTree]: https://github.com/robotology/idyntree
|
||||
[Python-WebRTC]: https://github.com/MarshalX/python-webrtc
|
||||
[boost-histogram]: https://github.com/scikit-hep/boost-histogram
|
||||
[pillow-heif]: https://github.com/bigcat88/pillow_heif
|
||||
[Python-WebRTC]: https://github.com/MarshalX/python-webrtc
|
||||
[pybase64]: https://github.com/mayeut/pybase64
|
||||
[Arbor]: https://github.com/arbor-sim/arbor
|
||||
[fathon]: https://github.com/stfbnc/fathon
|
||||
[Imagecodecs (fork)]: https://github.com/czaki/imagecodecs_build
|
||||
[power-grid-model]: https://github.com/alliander-opensource/power-grid-model
|
||||
[Imagecodecs (fork)]: https://github.com/czaki/imagecodecs_build
|
||||
[polaroid]: https://github.com/daggy1234/polaroid
|
||||
[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
|
||||
[pybind11 scikit_build_example]: https://github.com/pybind/scikit_build_example
|
||||
[clang-format]: https://github.com/ssciwr/clang-format-wheel
|
||||
[numpythia]: https://github.com/scikit-hep/numpythia
|
||||
[ninja]: https://github.com/scikit-build/ninja-python-distributions
|
||||
[numpythia]: https://github.com/scikit-hep/numpythia
|
||||
[pyjet]: https://github.com/scikit-hep/pyjet
|
||||
[GSD]: https://github.com/glotzerlab/gsd
|
||||
[ril]: https://github.com/Cryptex-github/ril-py
|
||||
[SiPM]: https://github.com/EdoPro98/SimSiPM
|
||||
[GSD]: https://github.com/glotzerlab/gsd
|
||||
[CorrectionLib]: https://github.com/cms-nanoAOD/correctionlib
|
||||
[pyinstrument_cext]: https://github.com/joerick/pyinstrument_cext
|
||||
[xmlstarlet]: https://github.com/dimitern/xmlstarlet
|
||||
[aalink]: https://github.com/artfwo/aalink
|
||||
[pybind11 cross build example]: https://github.com/wbarnha/pybind_cmake_example_crossbuild
|
||||
|
||||
[appveyor icon]: data/readme_icons/appveyor.svg
|
||||
|
||||
@@ -12,7 +12,7 @@ stack: python 3.7
|
||||
init:
|
||||
- cmd: set PATH=C:\Python37;C:\Python37\Scripts;%PATH%
|
||||
|
||||
install: python -m pip install cibuildwheel==2.13.0
|
||||
install: python -m pip install cibuildwheel==2.16.2
|
||||
|
||||
build_script: python -m cibuildwheel --output-dir wheelhouse
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ jobs:
|
||||
- bash: |
|
||||
set -o errexit
|
||||
python3 -m pip install --upgrade pip
|
||||
pip3 install cibuildwheel==2.13.0
|
||||
pip3 install cibuildwheel==2.16.2
|
||||
displayName: Install dependencies
|
||||
- bash: cibuildwheel --output-dir wheelhouse .
|
||||
displayName: Build wheels
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
- bash: |
|
||||
set -o errexit
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install cibuildwheel==2.13.0
|
||||
python3 -m pip install cibuildwheel==2.16.2
|
||||
displayName: Install dependencies
|
||||
- bash: cibuildwheel --output-dir wheelhouse .
|
||||
displayName: Build wheels
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
- bash: |
|
||||
set -o errexit
|
||||
python -m pip install --upgrade pip
|
||||
pip install cibuildwheel==2.13.0
|
||||
pip install cibuildwheel==2.16.2
|
||||
displayName: Install dependencies
|
||||
- bash: cibuildwheel --output-dir wheelhouse .
|
||||
displayName: Build wheels
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
- run:
|
||||
name: Build the Linux wheels.
|
||||
command: |
|
||||
pip3 install --user cibuildwheel==2.13.0
|
||||
pip3 install --user cibuildwheel==2.16.2
|
||||
cibuildwheel --output-dir wheelhouse
|
||||
- store_artifacts:
|
||||
path: wheelhouse/
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
- run:
|
||||
name: Build the Linux aarch64 wheels.
|
||||
command: |
|
||||
python3 -m pip install --user cibuildwheel==2.13.0
|
||||
python3 -m pip install --user cibuildwheel==2.16.2
|
||||
python3 -m cibuildwheel --output-dir wheelhouse
|
||||
- store_artifacts:
|
||||
path: wheelhouse/
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
- run:
|
||||
name: Build the OS X wheels.
|
||||
command: |
|
||||
pip3 install cibuildwheel==2.13.0
|
||||
pip3 install cibuildwheel==2.16.2
|
||||
cibuildwheel --output-dir wheelhouse
|
||||
- store_artifacts:
|
||||
path: wheelhouse/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
build_and_store_wheels: &BUILD_AND_STORE_WHEELS
|
||||
install_cibuildwheel_script:
|
||||
- python -m pip install cibuildwheel==2.13.0
|
||||
- python -m pip install cibuildwheel==2.16.2
|
||||
run_cibuildwheel_script:
|
||||
- cibuildwheel
|
||||
wheels_artifacts:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
build_and_store_wheels: &BUILD_AND_STORE_WHEELS
|
||||
install_cibuildwheel_script:
|
||||
- python -m pip install cibuildwheel==2.13.0
|
||||
- python -m pip install cibuildwheel==2.16.2
|
||||
run_cibuildwheel_script:
|
||||
- cibuildwheel
|
||||
wheels_artifacts:
|
||||
|
||||
@@ -7,10 +7,10 @@ jobs:
|
||||
name: Build wheels on macos-11
|
||||
runs-on: macos-11
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build wheels
|
||||
uses: pypa/cibuildwheel@v2.13.0
|
||||
uses: pypa/cibuildwheel@v2.16.2
|
||||
env:
|
||||
CIBW_ARCHS_MACOS: x86_64 arm64
|
||||
|
||||
|
||||
+21
-21
@@ -1,14 +1,14 @@
|
||||
name: Build and upload to PyPI
|
||||
|
||||
# Build on every branch push, tag push, and pull request change:
|
||||
on: [push, pull_request]
|
||||
# Alternatively, to publish when a (published) GitHub Release is created, use the following:
|
||||
# on:
|
||||
# push:
|
||||
# pull_request:
|
||||
# release:
|
||||
# types:
|
||||
# - published
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
jobs:
|
||||
build_wheels:
|
||||
@@ -16,13 +16,13 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-20.04, windows-2019, macos-11]
|
||||
os: [ubuntu-22.04, windows-2022, macos-11]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build wheels
|
||||
uses: pypa/cibuildwheel@v2.13.0
|
||||
uses: pypa/cibuildwheel@v2.16.2
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
name: Build source distribution
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build sdist
|
||||
run: pipx run build --sdist
|
||||
@@ -44,10 +44,12 @@ jobs:
|
||||
upload_pypi:
|
||||
needs: [build_wheels, build_sdist]
|
||||
runs-on: ubuntu-latest
|
||||
# upload to PyPI on every tag starting with 'v'
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
||||
# alternatively, to publish when a GitHub Release is created, use the following rule:
|
||||
# if: github.event_name == 'release' && github.event.action == 'published'
|
||||
environment: pypi
|
||||
permissions:
|
||||
id-token: write
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
||||
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
|
||||
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
||||
steps:
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
@@ -56,8 +58,6 @@ jobs:
|
||||
name: artifact
|
||||
path: dist
|
||||
|
||||
- uses: pypa/gh-action-pypi-publish@v1.5.0
|
||||
- uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.pypi_password }}
|
||||
# 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]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build wheels
|
||||
uses: pypa/cibuildwheel@v2.13.0
|
||||
uses: pypa/cibuildwheel@v2.16.2
|
||||
# env:
|
||||
# CIBW_SOME_OPTION: value
|
||||
# ...
|
||||
|
||||
@@ -11,16 +11,16 @@ jobs:
|
||||
os: [ubuntu-20.04, windows-2019, macos-11]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
if: runner.os == 'Linux'
|
||||
uses: docker/setup-qemu-action@v2
|
||||
uses: docker/setup-qemu-action@v3
|
||||
with:
|
||||
platforms: all
|
||||
|
||||
- name: Build wheels
|
||||
uses: pypa/cibuildwheel@v2.13.0
|
||||
uses: pypa/cibuildwheel@v2.16.2
|
||||
env:
|
||||
# configure cibuildwheel to build native archs ('auto'), and some
|
||||
# emulated ones
|
||||
|
||||
@@ -12,7 +12,7 @@ linux:
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
script:
|
||||
- curl -sSL https://get.docker.com/ | sh
|
||||
- python -m pip install cibuildwheel==2.13.0
|
||||
- python -m pip install cibuildwheel==2.16.2
|
||||
- cibuildwheel --output-dir wheelhouse
|
||||
artifacts:
|
||||
paths:
|
||||
@@ -23,7 +23,7 @@ windows:
|
||||
before_script:
|
||||
- choco install python -y --version 3.8.6
|
||||
- choco install git.install -y
|
||||
- py -m pip install cibuildwheel==2.13.0
|
||||
- py -m pip install cibuildwheel==2.16.2
|
||||
script:
|
||||
- py -m cibuildwheel --output-dir wheelhouse --platform windows
|
||||
artifacts:
|
||||
|
||||
@@ -14,7 +14,7 @@ linux:
|
||||
- curl -sSL https://get.docker.com/ | sh
|
||||
# Warning: This is extremely slow, be careful with how many wheels you build
|
||||
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||
- python -m pip install cibuildwheel==2.13.0
|
||||
- python -m pip install cibuildwheel==2.16.2
|
||||
# Assuming your CI runner's default architecture is x86_64...
|
||||
- cibuildwheel --output-dir wheelhouse --platform linux --archs aarch64
|
||||
artifacts:
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
- ln -s /c/Python38/python.exe /c/Python38/python3.exe
|
||||
|
||||
install:
|
||||
- python3 -m pip install cibuildwheel==2.13.0
|
||||
- python3 -m pip install cibuildwheel==2.16.2
|
||||
|
||||
script:
|
||||
# build the wheels, put them into './dist'
|
||||
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
- ln -s /c/Python38/python.exe /c/Python38/python3.exe
|
||||
|
||||
install:
|
||||
- python3 -m pip install cibuildwheel==2.13.0
|
||||
- python3 -m pip install cibuildwheel==2.16.2
|
||||
|
||||
script:
|
||||
# build the wheels, put them into './wheelhouse'
|
||||
|
||||
@@ -54,7 +54,7 @@ jobs:
|
||||
- stage: deploy
|
||||
name: Build and deploy Linux wheels
|
||||
services: docker
|
||||
install: python3 -m pip install cibuildwheel==2.13.0 twine
|
||||
install: python3 -m pip install cibuildwheel==2.16.2 twine
|
||||
script: python3 -m cibuildwheel --output-dir wheelhouse
|
||||
after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl
|
||||
# Deploy on windows
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
name: Build and deploy Windows wheels
|
||||
os: windows
|
||||
language: shell
|
||||
install: python3 -m pip install cibuildwheel==2.13.0 twine
|
||||
install: python3 -m pip install cibuildwheel==2.16.2 twine
|
||||
script: python3 -m cibuildwheel --output-dir wheelhouse
|
||||
after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl
|
||||
|
||||
|
||||
@@ -113,6 +113,14 @@ def update_proj(session: nox.Session) -> None:
|
||||
)
|
||||
|
||||
|
||||
@nox.session(reuse_venv=True)
|
||||
def generate_schema(session: nox.Session) -> None:
|
||||
session.install("pyyaml")
|
||||
output = session.run("python", "bin/generate_schema.py", silent=True)
|
||||
assert isinstance(output, str)
|
||||
DIR.joinpath("cibuildwheel/resources/cibuildwheel.schema.json").write_text(output)
|
||||
|
||||
|
||||
@nox.session(python="3.9")
|
||||
def docs(session: nox.Session) -> None:
|
||||
"""
|
||||
|
||||
+5
-13
@@ -7,24 +7,20 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.black]
|
||||
line-length = 100
|
||||
target-version = ['py37', 'py38', 'py39', 'py310', 'py311']
|
||||
target-version = ['py38', 'py39', 'py310', 'py311']
|
||||
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
minversion = "6.0"
|
||||
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
|
||||
junit_family = "xunit2"
|
||||
testpaths = [
|
||||
"test",
|
||||
"unit_test",
|
||||
]
|
||||
xfail_strict = true
|
||||
filterwarnings = ["error"]
|
||||
log_cli_level = "info"
|
||||
|
||||
|
||||
[tool.mypy]
|
||||
python_version = 3.7
|
||||
python_version = 3.8
|
||||
files = [
|
||||
"cibuildwheel/*.py",
|
||||
"test/**/*.py",
|
||||
@@ -83,7 +79,7 @@ ignore = [
|
||||
]
|
||||
|
||||
[tool.pylint]
|
||||
py-version = "3.7"
|
||||
py-version = "3.8"
|
||||
jobs = "0"
|
||||
fail-on = ["E", "F"]
|
||||
fail-under = "9.8"
|
||||
@@ -148,7 +144,7 @@ extend-ignore = [
|
||||
"PT004", # Rename suggested for returnless fixtures
|
||||
"PT007", # False positive (fixed upstream)
|
||||
]
|
||||
target-version = "py37"
|
||||
target-version = "py38"
|
||||
typing-modules = ["cibuildwheel._compat.typing"]
|
||||
flake8-unused-arguments.ignore-variadic-names = true
|
||||
|
||||
@@ -158,11 +154,6 @@ flake8-unused-arguments.ignore-variadic-names = true
|
||||
"typing.Iterator".msg = "Use collections.abc.Iterator instead."
|
||||
"typing.Sequence".msg = "Use collections.abc.Sequence instead."
|
||||
"typing.Set".msg = "Use collections.abc.Set instead."
|
||||
"typing.Protocol".msg = "Use cibuildwheel._compat.typing.Protocol instead."
|
||||
"typing.Final".msg = "Use cibuildwheel._compat.typing.Final instead."
|
||||
"typing.Literal".msg = "Use cibuildwheel._compat.typing.Literal instead."
|
||||
"typing.OrderedDict".msg = "Use cibuildwheel._compat.typing.OrderedDict instead."
|
||||
"typing.TypedDict".msg = "Use cibuildwheel._compat.typing.TypedDict instead."
|
||||
"typing.NotRequired".msg = "Use cibuildwheel._compat.typing.NotRequired instead."
|
||||
"typing.assert_never".msg = "Use cibuildwheel._compat.typing.assert_never instead."
|
||||
"tomllib".msg = "Use cibuildwheel._compat.tomllib instead."
|
||||
@@ -170,3 +161,4 @@ flake8-unused-arguments.ignore-variadic-names = true
|
||||
|
||||
[tool.ruff.per-file-ignores]
|
||||
"unit_test/*" = ["PLC1901"]
|
||||
"cibuildwheel/_compat/**.py" = ["TID251"]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[metadata]
|
||||
name = cibuildwheel
|
||||
version = 2.13.0
|
||||
version = 2.16.2
|
||||
description = Build Python wheels on CI with minimal configuration.
|
||||
long_description = file: README.md
|
||||
long_description_content_type = text/markdown
|
||||
@@ -8,7 +8,7 @@ url = https://github.com/pypa/cibuildwheel
|
||||
author = Joe Rickerby
|
||||
author_email = joerick@mac.com
|
||||
license = BSD-2-Clause
|
||||
license_file = LICENSE
|
||||
license_files = LICENSE
|
||||
classifiers =
|
||||
Development Status :: 5 - Production/Stable
|
||||
Intended Audience :: Developers
|
||||
@@ -16,7 +16,6 @@ classifiers =
|
||||
Natural Language :: English
|
||||
Programming Language :: Python :: 3
|
||||
Programming Language :: Python :: 3 :: Only
|
||||
Programming Language :: Python :: 3.7
|
||||
Programming Language :: Python :: 3.8
|
||||
Programming Language :: Python :: 3.9
|
||||
Programming Language :: Python :: 3.10
|
||||
@@ -39,7 +38,7 @@ install_requires =
|
||||
platformdirs
|
||||
tomli;python_version < '3.11'
|
||||
typing-extensions>=4.1.0;python_version < '3.11'
|
||||
python_requires = >=3.7
|
||||
python_requires = >=3.8
|
||||
include_package_data = True
|
||||
zip_safe = False
|
||||
|
||||
@@ -50,6 +49,8 @@ include =
|
||||
[options.entry_points]
|
||||
console_scripts =
|
||||
cibuildwheel = cibuildwheel.__main__:main
|
||||
validate_pyproject.tool_schema =
|
||||
cibuildwheel = cibuildwheel.schema:get_schema
|
||||
|
||||
[options.package_data]
|
||||
cibuildwheel = resources/*
|
||||
|
||||
@@ -17,6 +17,7 @@ extras = {
|
||||
"pytest-xdist",
|
||||
"build",
|
||||
"tomli_w",
|
||||
"validate-pyproject",
|
||||
],
|
||||
"bin": [
|
||||
"click",
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import subprocess
|
||||
from typing import Generator
|
||||
|
||||
import pytest
|
||||
|
||||
from cibuildwheel.util import detect_ci_provider
|
||||
|
||||
from .utils import platform
|
||||
|
||||
|
||||
def pytest_addoption(parser) -> None:
|
||||
parser.addoption(
|
||||
@@ -21,3 +29,25 @@ def pytest_addoption(parser) -> None:
|
||||
)
|
||||
def build_frontend_env(request) -> dict[str, str]:
|
||||
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):
|
||||
if utils.platform != "linux":
|
||||
pytest.skip("the test is only relevant to the linux build")
|
||||
|
||||
@@ -118,7 +118,7 @@ def test_cpp17(tmp_path):
|
||||
|
||||
# Pypy's distutils sets the default compiler to 'msvc9compiler', which
|
||||
# is too old to support cpp17.
|
||||
add_env = {"CIBW_SKIP": "pp??-*"}
|
||||
add_env = {"CIBW_SKIP": "pp*"}
|
||||
|
||||
if utils.platform == "macos":
|
||||
add_env["MACOSX_DEPLOYMENT_TARGET"] = "10.13"
|
||||
|
||||
@@ -53,6 +53,7 @@ project_with_manylinux_symbols = test_projects.new_c_project(
|
||||
"manylinux_image",
|
||||
["manylinux1", "manylinux2010", "manylinux2014", "manylinux_2_24", "manylinux_2_28"],
|
||||
)
|
||||
@pytest.mark.usefixtures("docker_cleanup")
|
||||
def test(manylinux_image, tmp_path):
|
||||
if utils.platform != "linux":
|
||||
pytest.skip("the container image test is only relevant to the linux build")
|
||||
@@ -84,11 +85,11 @@ def test(manylinux_image, tmp_path):
|
||||
# We don't have a manylinux1 image for PyPy & CPython 3.10 and above
|
||||
add_env["CIBW_SKIP"] = "pp* cp31*"
|
||||
if manylinux_image in {"manylinux2010"}:
|
||||
# We don't have a manylinux2010 image for PyPy 3.9, CPython 3.11+
|
||||
add_env["CIBW_SKIP"] = "pp39* cp311* cp312*"
|
||||
# We don't have a manylinux2010 image for PyPy 3.9+, CPython 3.11+
|
||||
add_env["CIBW_SKIP"] = "pp39* pp31* cp311* cp312*"
|
||||
if manylinux_image in {"manylinux_2_24"}:
|
||||
# We don't have a manylinux_2_24 image for CPython 3.12+
|
||||
add_env["CIBW_SKIP"] = "cp312*"
|
||||
# We don't have a manylinux_2_24 image for PyPy 3.10+, CPython 3.12+
|
||||
add_env["CIBW_SKIP"] = "pp31* cp312*"
|
||||
if manylinux_image == "manylinux_2_28" and platform.machine() == "x86_64":
|
||||
# We don't have a manylinux_2_28 image for i686
|
||||
add_env["CIBW_ARCHS"] = "x86_64"
|
||||
@@ -111,16 +112,16 @@ def test(manylinux_image, tmp_path):
|
||||
expected_wheels = [w for w in expected_wheels if "-pp" not in w and "-cp31" not in w]
|
||||
|
||||
if manylinux_image in {"manylinux2010"}:
|
||||
# remove PyPy 3.9 & CPython 3.11
|
||||
# remove PyPy 3.9+ & CPython 3.11
|
||||
expected_wheels = [
|
||||
w
|
||||
for w in expected_wheels
|
||||
if "-pp39" not in w and "-cp311" not in w and "-cp312" not in w
|
||||
if "-pp39" not in w and "-pp31" not in w and "-cp311" not in w and "-cp312" not in w
|
||||
]
|
||||
|
||||
if manylinux_image in {"manylinux_2_24"}:
|
||||
# remove CPython 3.11 and above
|
||||
expected_wheels = [w for w in expected_wheels if "-cp312" not in w]
|
||||
# remove PyPy 3.10+ & CPython 3.11 and above
|
||||
expected_wheels = [w for w in expected_wheels if "-pp31" not in w and "-cp312" not in w]
|
||||
|
||||
if manylinux_image == "manylinux_2_28" and platform.machine() == "x86_64":
|
||||
# We don't have a manylinux_2_28 image for i686
|
||||
|
||||
@@ -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)
|
||||
+15
-8
@@ -174,7 +174,12 @@ def expected_wheels(
|
||||
]
|
||||
|
||||
if machine_arch in ["x86_64", "AMD64", "x86", "aarch64"]:
|
||||
python_abi_tags += ["pp37-pypy37_pp73", "pp38-pypy38_pp73", "pp39-pypy39_pp73"]
|
||||
python_abi_tags += [
|
||||
"pp37-pypy37_pp73",
|
||||
"pp38-pypy38_pp73",
|
||||
"pp39-pypy39_pp73",
|
||||
"pp310-pypy310_pp73",
|
||||
]
|
||||
|
||||
if platform == "macos" and machine_arch == "arm64":
|
||||
# arm64 macs are only supported by cp38+
|
||||
@@ -186,6 +191,7 @@ def expected_wheels(
|
||||
"cp312-cp312",
|
||||
"pp38-pypy38_pp73",
|
||||
"pp39-pypy39_pp73",
|
||||
"pp310-pypy310_pp73",
|
||||
]
|
||||
|
||||
wheels = []
|
||||
@@ -199,13 +205,14 @@ def expected_wheels(
|
||||
if machine_arch == "x86_64":
|
||||
architectures.append("i686")
|
||||
|
||||
platform_tags = [
|
||||
".".join(
|
||||
f"{manylinux_version}_{architecture}"
|
||||
for manylinux_version in manylinux_versions
|
||||
)
|
||||
for architecture in architectures
|
||||
]
|
||||
if len(manylinux_versions) > 0:
|
||||
platform_tags = [
|
||||
".".join(
|
||||
f"{manylinux_version}_{architecture}"
|
||||
for manylinux_version in manylinux_versions
|
||||
)
|
||||
for architecture in architectures
|
||||
]
|
||||
if len(musllinux_versions) > 0 and not python_abi_tag.startswith("pp"):
|
||||
platform_tags.extend(
|
||||
[
|
||||
|
||||
@@ -12,7 +12,7 @@ def test_build():
|
||||
assert build_selector("cp37-manylinux_x86_64")
|
||||
assert build_selector("cp310-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("pp37-manylinux_x86_64")
|
||||
assert build_selector("cp36-manylinux_i686")
|
||||
@@ -32,7 +32,7 @@ def test_build():
|
||||
assert build_selector("cp37-win_amd64")
|
||||
assert build_selector("cp310-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("pp37-win_amd64")
|
||||
|
||||
|
||||
@@ -62,8 +62,9 @@ def test_linux_container_split(tmp_path: Path, monkeypatch):
|
||||
"cp36-manylinux_x86_64",
|
||||
"cp37-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 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):
|
||||
repair_wheel_default = " && ".join(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":
|
||||
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.platform == 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"))
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import os
|
||||
import platform
|
||||
import random
|
||||
@@ -13,33 +14,49 @@ import tomli_w
|
||||
|
||||
from cibuildwheel.environment import EnvironmentAssignmentBash
|
||||
from cibuildwheel.oci_container import OCIContainer, OCIContainerEngineConfig
|
||||
from cibuildwheel.util import detect_ci_provider
|
||||
|
||||
# Test utilities
|
||||
|
||||
# for these tests we use manylinux2014 images, because they're available on
|
||||
# multi architectures and include python3.8
|
||||
DEFAULT_IMAGE_TEMPLATE = "quay.io/pypa/manylinux2014_{machine}:2023-09-04-0828984"
|
||||
pm = platform.machine()
|
||||
if pm == "x86_64":
|
||||
DEFAULT_IMAGE = "quay.io/pypa/manylinux2014_x86_64:2020-05-17-2f8ac3b"
|
||||
if pm in {"x86_64", "ppc64le", "s390x"}:
|
||||
DEFAULT_IMAGE = DEFAULT_IMAGE_TEMPLATE.format(machine=pm)
|
||||
elif pm in {"aarch64", "arm64"}:
|
||||
DEFAULT_IMAGE = "quay.io/pypa/manylinux2014_aarch64:2020-05-17-2f8ac3b"
|
||||
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"
|
||||
DEFAULT_IMAGE = DEFAULT_IMAGE_TEMPLATE.format(machine="aarch64")
|
||||
else:
|
||||
DEFAULT_IMAGE = ""
|
||||
|
||||
PODMAN = OCIContainerEngineConfig(name="podman")
|
||||
|
||||
|
||||
@pytest.fixture(params=["docker", "podman"])
|
||||
@pytest.fixture(params=["docker", "podman"], scope="module")
|
||||
def container_engine(request):
|
||||
if request.param == "docker" and not request.config.getoption("--run-docker"):
|
||||
pytest.skip("need --run-docker option to run")
|
||||
if request.param == "podman" and not request.config.getoption("--run-podman"):
|
||||
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
|
||||
@@ -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):
|
||||
with OCIContainer(
|
||||
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"
|
||||
|
||||
|
||||
def test_podman_vfs(tmp_path: Path, monkeypatch, request):
|
||||
# Tests podman VFS, for the podman in docker use-case
|
||||
if not request.config.getoption("--run-podman"):
|
||||
pytest.skip("need --run-podman option to run")
|
||||
def test_podman_vfs(tmp_path: Path, monkeypatch, container_engine):
|
||||
if container_engine.name != "podman":
|
||||
pytest.skip("only runs with podman")
|
||||
|
||||
# create the VFS configuration
|
||||
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)
|
||||
|
||||
|
||||
def test_create_args_volume(tmp_path: Path, request):
|
||||
if not request.config.getoption("--run-docker"):
|
||||
pytest.skip("need --run-docker option to run")
|
||||
def test_create_args_volume(tmp_path: Path, container_engine):
|
||||
if container_engine.name != "docker":
|
||||
pytest.skip("only runs with docker")
|
||||
|
||||
if "CIRCLECI" in os.environ or "GITLAB_CI" in os.environ:
|
||||
pytest.skip(
|
||||
@@ -367,3 +394,24 @@ def test_parse_engine_config(config, name, create_args):
|
||||
engine_config = OCIContainerEngineConfig.from_config_string(config)
|
||||
assert engine_config.name == name
|
||||
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.__main__ import main
|
||||
|
||||
ALL_IDS = {"cp36", "cp37", "cp38", "cp39", "cp310", "cp311", "pp37", "pp38", "pp39"}
|
||||
ALL_IDS = {
|
||||
"cp36",
|
||||
"cp37",
|
||||
"cp38",
|
||||
"cp39",
|
||||
"cp310",
|
||||
"cp311",
|
||||
"cp312",
|
||||
"pp37",
|
||||
"pp38",
|
||||
"pp39",
|
||||
"pp310",
|
||||
}
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
@@ -60,7 +72,7 @@ def test_build_default_launches(monkeypatch):
|
||||
kwargs = build_in_container.call_args_list[0][1]
|
||||
assert "quay.io/pypa/manylinux2014_x86_64" in kwargs["container"]["image"]
|
||||
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"]}
|
||||
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]
|
||||
assert "quay.io/pypa/manylinux2014_i686" in kwargs["container"]["image"]
|
||||
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"]}
|
||||
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]
|
||||
assert "quay.io/pypa/musllinux_1_1_x86_64" in kwargs["container"]["image"]
|
||||
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"]}
|
||||
assert identifiers == {
|
||||
@@ -86,7 +98,7 @@ def test_build_default_launches(monkeypatch):
|
||||
kwargs = build_in_container.call_args_list[3][1]
|
||||
assert "quay.io/pypa/musllinux_1_1_i686" in kwargs["container"]["image"]
|
||||
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"]}
|
||||
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(
|
||||
"""
|
||||
[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]]
|
||||
select = "cp3?-*"
|
||||
manylinux-x86_64-image = "manylinux2014"
|
||||
manylinux-i686-image = "manylinux2014"
|
||||
musllinux-x86_64-image = "musllinux_1_1"
|
||||
|
||||
[[tool.cibuildwheel.overrides]]
|
||||
select = "cp36-manylinux_x86_64"
|
||||
@@ -122,12 +136,12 @@ before-all = "true"
|
||||
|
||||
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]
|
||||
assert "quay.io/pypa/manylinux2014_x86_64" in kwargs["container"]["image"]
|
||||
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"]}
|
||||
assert identifiers == {"cp36-manylinux_x86_64"}
|
||||
@@ -136,28 +150,29 @@ before-all = "true"
|
||||
kwargs = build_in_container.call_args_list[1][1]
|
||||
assert "quay.io/pypa/manylinux2014_x86_64" in kwargs["container"]["image"]
|
||||
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"]}
|
||||
assert identifiers == {
|
||||
f"{x}-manylinux_x86_64"
|
||||
for x in ALL_IDS - {"cp36", "cp310", "cp311", "pp37", "pp38", "pp39"}
|
||||
for x in ALL_IDS - {"cp36", "cp310", "cp311", "cp312", "pp37", "pp38", "pp39", "pp310"}
|
||||
}
|
||||
assert kwargs["options"].build_options("cp37-manylinux_x86_64").before_all == ""
|
||||
|
||||
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 not kwargs["container"]["simulate_32_bit"]
|
||||
assert not kwargs["container"]["enforce_32_bit"]
|
||||
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
||||
assert identifiers == {
|
||||
f"{x}-manylinux_x86_64" for x in {"cp310", "cp311", "pp37", "pp38", "pp39"}
|
||||
f"{x}-manylinux_x86_64"
|
||||
for x in ["cp310", "cp311", "cp312", "pp37", "pp38", "pp39", "pp310"]
|
||||
}
|
||||
|
||||
kwargs = build_in_container.call_args_list[3][1]
|
||||
assert "quay.io/pypa/manylinux2014_i686" in kwargs["container"]["image"]
|
||||
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"]}
|
||||
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]
|
||||
assert "quay.io/pypa/musllinux_1_1_x86_64" in kwargs["container"]["image"]
|
||||
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"]}
|
||||
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]
|
||||
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 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"]}
|
||||
assert identifiers == {f"{x}-musllinux_i686" for x in ALL_IDS if "pp" not in x}
|
||||
|
||||
@@ -253,3 +253,76 @@ def test_container_engine_option(tmp_path: Path, toml_assignment, result_name, r
|
||||
|
||||
assert parsed_container_engine.name == result_name
|
||||
assert parsed_container_engine.create_args == result_create_args
|
||||
|
||||
|
||||
def test_environment_pass_references():
|
||||
options = Options(
|
||||
platform="linux",
|
||||
command_line_arguments=CommandLineArguments.defaults(),
|
||||
env={
|
||||
"CIBW_ENVIRONMENT_PASS_LINUX": "STARTER MAIN_COURSE",
|
||||
"STARTER": "green eggs",
|
||||
"MAIN_COURSE": "ham",
|
||||
"CIBW_ENVIRONMENT": 'MEAL="$STARTER and $MAIN_COURSE"',
|
||||
},
|
||||
)
|
||||
parsed_environment = options.build_options(identifier=None).environment
|
||||
assert parsed_environment.as_dictionary(prev_environment={}) == {
|
||||
"MEAL": "green eggs and ham",
|
||||
"STARTER": "green eggs",
|
||||
"MAIN_COURSE": "ham",
|
||||
}
|
||||
|
||||
|
||||
@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"
|
||||
|
||||
|
||||
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):
|
||||
with open(tmp_path / "setup.py", "w", encoding="utf8") as f:
|
||||
f.write(
|
||||
|
||||
@@ -9,6 +9,7 @@ from cibuildwheel.util import (
|
||||
find_compatible_wheel,
|
||||
fix_ansi_codes_for_github_actions,
|
||||
format_safe,
|
||||
parse_key_value_string,
|
||||
prepare_command,
|
||||
)
|
||||
|
||||
@@ -124,3 +125,84 @@ def test_fix_ansi_codes_for_github_actions():
|
||||
output = fix_ansi_codes_for_github_actions(input)
|
||||
|
||||
assert output == expected
|
||||
|
||||
|
||||
def test_parse_key_value_string():
|
||||
assert parse_key_value_string("bar", positional_arg_names=["foo"]) == {"foo": ["bar"]}
|
||||
assert parse_key_value_string("foo:bar", kw_arg_names=["foo"]) == {"foo": ["bar"]}
|
||||
with pytest.raises(ValueError, match="Too many positional arguments"):
|
||||
parse_key_value_string("bar")
|
||||
with pytest.raises(ValueError, match="Unknown field name"):
|
||||
parse_key_value_string("foo:bar")
|
||||
assert parse_key_value_string("foo:bar", kw_arg_names=["foo"]) == {"foo": ["bar"]}
|
||||
assert parse_key_value_string("foo:bar", positional_arg_names=["foo"]) == {"foo": ["bar"]}
|
||||
assert parse_key_value_string("foo: bar", kw_arg_names=["foo"]) == {"foo": ["bar"]}
|
||||
assert parse_key_value_string("foo: bar", kw_arg_names=["foo"]) == {"foo": ["bar"]}
|
||||
assert parse_key_value_string("foo: bar; baz: qux", kw_arg_names=["foo", "baz"]) == {
|
||||
"foo": ["bar"],
|
||||
"baz": ["qux"],
|
||||
}
|
||||
|
||||
# some common options
|
||||
assert parse_key_value_string(
|
||||
"docker; create_args: --some-option --another-option=foo",
|
||||
positional_arg_names=["name"],
|
||||
kw_arg_names=["create_args"],
|
||||
) == {
|
||||
"name": ["docker"],
|
||||
"create_args": ["--some-option", "--another-option=foo"],
|
||||
}
|
||||
# semicolon in value
|
||||
assert parse_key_value_string(
|
||||
"docker; create_args: --some-option='this; that'",
|
||||
positional_arg_names=["name"],
|
||||
kw_arg_names=["create_args"],
|
||||
) == {
|
||||
"name": ["docker"],
|
||||
"create_args": ["--some-option=this; that"],
|
||||
}
|
||||
# colon in value
|
||||
assert parse_key_value_string(
|
||||
"docker; create_args: --mount a:b",
|
||||
positional_arg_names=["name"],
|
||||
kw_arg_names=["create_args"],
|
||||
) == {
|
||||
"name": ["docker"],
|
||||
"create_args": ["--mount", "a:b"],
|
||||
}
|
||||
assert parse_key_value_string(
|
||||
"docker;create_args:--mount a:b",
|
||||
positional_arg_names=["name"],
|
||||
kw_arg_names=["create_args"],
|
||||
) == {
|
||||
"name": ["docker"],
|
||||
"create_args": ["--mount", "a:b"],
|
||||
}
|
||||
# quoted value with spaces
|
||||
assert parse_key_value_string(
|
||||
"docker;create_args:'some string with spaces'",
|
||||
positional_arg_names=["name"],
|
||||
kw_arg_names=["create_args"],
|
||||
) == {
|
||||
"name": ["docker"],
|
||||
"create_args": ["some string with spaces"],
|
||||
}
|
||||
|
||||
# colon in positional value
|
||||
assert parse_key_value_string(
|
||||
"docker; --mount a:b",
|
||||
positional_arg_names=["name", "create_args"],
|
||||
) == {
|
||||
"name": ["docker"],
|
||||
"create_args": ["--mount", "a:b"],
|
||||
}
|
||||
|
||||
# empty option gives empty array
|
||||
assert parse_key_value_string(
|
||||
"docker;create_args:",
|
||||
positional_arg_names=["name"],
|
||||
kw_arg_names=["create_args"],
|
||||
) == {
|
||||
"name": ["docker"],
|
||||
"create_args": [],
|
||||
}
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
import validate_pyproject.api
|
||||
|
||||
from cibuildwheel._compat import tomllib
|
||||
|
||||
DIR = Path(__file__).parent.resolve()
|
||||
|
||||
|
||||
def test_validate_default_schema():
|
||||
filepath = DIR.parent / "cibuildwheel/resources/defaults.toml"
|
||||
with filepath.open("rb") as f:
|
||||
example = tomllib.load(f)
|
||||
|
||||
validator = validate_pyproject.api.Validator()
|
||||
assert validator(example) is not None
|
||||
|
||||
|
||||
def test_validate_bad_container_engine():
|
||||
example = tomllib.loads(
|
||||
"""
|
||||
[tool.cibuildwheel.linux]
|
||||
container-engine = "docker"
|
||||
"""
|
||||
)
|
||||
|
||||
validator = validate_pyproject.api.Validator()
|
||||
with pytest.raises(validate_pyproject.error_reporting.ValidationError):
|
||||
validator(example)
|
||||
|
||||
|
||||
def test_overrides_select():
|
||||
example = tomllib.loads(
|
||||
"""
|
||||
[[tool.cibuildwheel.overrides]]
|
||||
select = "somestring"
|
||||
repair-wheel-command = "something"
|
||||
"""
|
||||
)
|
||||
|
||||
validator = validate_pyproject.api.Validator()
|
||||
assert validator(example) is not None
|
||||
|
||||
|
||||
def test_overrides_no_select():
|
||||
example = tomllib.loads(
|
||||
"""
|
||||
[[tool.cibuildwheel.overrides]]
|
||||
repair-wheel-command = "something"
|
||||
"""
|
||||
)
|
||||
|
||||
validator = validate_pyproject.api.Validator()
|
||||
with pytest.raises(validate_pyproject.error_reporting.ValidationError):
|
||||
validator(example)
|
||||
|
||||
|
||||
def test_overrides_only_select():
|
||||
example = tomllib.loads(
|
||||
"""
|
||||
[[tool.cibuildwheel.overrides]]
|
||||
select = "somestring"
|
||||
"""
|
||||
)
|
||||
|
||||
validator = validate_pyproject.api.Validator()
|
||||
with pytest.raises(validate_pyproject.error_reporting.ValidationError):
|
||||
validator(example)
|
||||
|
||||
|
||||
def test_docs_examples():
|
||||
"""
|
||||
Parse out all the configuration examples, build valid TOML out of them, and
|
||||
make sure they pass.
|
||||
"""
|
||||
|
||||
expr = re.compile(
|
||||
r"""
|
||||
!!! tab examples "pyproject.toml"
|
||||
\s*
|
||||
\s*```toml
|
||||
(.*?)```""",
|
||||
re.MULTILINE | re.DOTALL,
|
||||
)
|
||||
|
||||
txt = DIR.parent.joinpath("docs/options.md").read_text()
|
||||
|
||||
blocks: list[str] = []
|
||||
for match in expr.finditer(txt):
|
||||
lines = (line.strip() for line in match.group(1).strip().splitlines() if line.strip())
|
||||
block: list[str] = []
|
||||
header = ""
|
||||
for line in lines:
|
||||
if line.startswith(("[tool.cibuildwheel", "[[tool.cibuildwheel")):
|
||||
header = line
|
||||
elif line.startswith("#"):
|
||||
if block:
|
||||
blocks.append("\n".join([header, *block]))
|
||||
block = []
|
||||
elif " = " in line and any(x.startswith(line.partition(" = ")[0]) for x in block):
|
||||
blocks.append("\n".join([header, *block]))
|
||||
block = [line]
|
||||
else:
|
||||
block.append(line)
|
||||
blocks.append("\n".join([header, *block]))
|
||||
|
||||
for example_txt in blocks:
|
||||
print(example_txt)
|
||||
print()
|
||||
example = tomllib.loads(example_txt)
|
||||
validator = validate_pyproject.api.Validator()
|
||||
assert validator(example) is not None
|
||||
Reference in New Issue
Block a user