Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
619e1dc989 | ||
|
|
e8646fb903 | ||
|
|
6f8121fa47 | ||
|
|
7989c25bcd | ||
|
|
9a15d0851e | ||
|
|
dc4fc9c3fe | ||
|
|
dcd9f40825 | ||
|
|
90da3e21e2 | ||
|
|
f3ba8a83a5 | ||
|
|
3cefb9d38c | ||
|
|
aae69a8e1d | ||
|
|
24bade1d15 | ||
|
|
a68c3b27fb | ||
|
|
99059b7442 | ||
|
|
d0e070e278 | ||
|
|
bb2f93202e | ||
|
|
11597ed249 | ||
|
|
90422f1824 | ||
|
|
986d80b3d7 | ||
|
|
5acadc2dfc | ||
|
|
6878a1baeb | ||
|
|
7288bbed76 | ||
|
|
0cb04c05db | ||
|
|
3c2d5961de | ||
|
|
6c7e3ee860 | ||
|
|
df2ce29908 | ||
|
|
74a3c45b74 | ||
|
|
9f991f2330 | ||
|
|
ea4b3eb6a5 | ||
|
|
6bc6700ab3 | ||
|
|
c314f9f07b | ||
|
|
dd81fa002c | ||
|
|
3658bf2f84 |
@@ -11,7 +11,7 @@ jobs:
|
|||||||
dist:
|
dist:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- uses: hynek/build-and-inspect-python-package@v2
|
- uses: hynek/build-and-inspect-python-package@v2
|
||||||
|
|
||||||
@@ -27,13 +27,13 @@ jobs:
|
|||||||
attestations: write
|
attestations: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v6
|
- uses: actions/download-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: Packages
|
name: Packages
|
||||||
path: dist
|
path: dist
|
||||||
|
|
||||||
- name: Generate artifact attestation for sdist and wheel
|
- name: Generate artifact attestation for sdist and wheel
|
||||||
uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0
|
uses: actions/attest-build-provenance@00014ed6ed5efc5b1ab7f7f34a39eb55d41aa4f8 # v3.1.0
|
||||||
with:
|
with:
|
||||||
subject-path: "dist/cibuildwheel-*"
|
subject-path: "dist/cibuildwheel-*"
|
||||||
|
|
||||||
|
|||||||
+82
-25
@@ -37,18 +37,38 @@ jobs:
|
|||||||
name: Linters (mypy, ruff, etc.)
|
name: Linters (mypy, ruff, etc.)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v6
|
||||||
id: python
|
id: python
|
||||||
with:
|
with:
|
||||||
python-version: "3.x"
|
python-version: "3.x"
|
||||||
- uses: pre-commit/action@v3.0.1
|
- uses: j178/prek-action@v1
|
||||||
- name: PyLint checks
|
- name: PyLint checks
|
||||||
run: pipx run --python "${{ steps.python.outputs.python-path }}" nox -s pylint -- --output-format=github
|
run: pipx run --python "${{ steps.python.outputs.python-path }}" nox -s pylint -- --output-format=github
|
||||||
|
|
||||||
|
sample:
|
||||||
|
name: Generate a sample project
|
||||||
|
needs: lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
- uses: actions/setup-python@v6
|
||||||
|
name: Install Python
|
||||||
|
with:
|
||||||
|
python-version: "3.x"
|
||||||
|
- uses: astral-sh/setup-uv@v7
|
||||||
|
- name: Install dependencies
|
||||||
|
run: uv sync --no-dev --group test
|
||||||
|
- name: Generate a sample project
|
||||||
|
run: uv run --no-sync -m test.test_projects test.test_0_basic.basic_project sample_proj
|
||||||
|
- uses: actions/upload-artifact@v6
|
||||||
|
with:
|
||||||
|
name: sample_proj
|
||||||
|
path: sample_proj
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Test on ${{ matrix.os }} (${{ matrix.python_version }}) ${{ matrix.test_select }}
|
name: Test on ${{ matrix.os }} (${{ matrix.python_version }}) ${{ matrix.test_select }}
|
||||||
needs: lint
|
needs: sample
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -91,7 +111,7 @@ jobs:
|
|||||||
test_select: android
|
test_select: android
|
||||||
timeout-minutes: 180
|
timeout-minutes: 180
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v6
|
||||||
name: Install Python ${{ matrix.python_version }}
|
name: Install Python ${{ matrix.python_version }}
|
||||||
with:
|
with:
|
||||||
@@ -101,13 +121,12 @@ jobs:
|
|||||||
- uses: astral-sh/setup-uv@v7
|
- uses: astral-sh/setup-uv@v7
|
||||||
|
|
||||||
- name: Free up disk space
|
- name: Free up disk space
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux' && matrix.test_select != 'android'
|
||||||
run: |
|
run: |
|
||||||
docker system prune -a -f
|
sudo rm -rf $ANDROID_HOME/ndk /opt/hostedtoolcache/CodeQL \
|
||||||
sudo rm -rf $ANDROID_HOME/ndk/{26,28}.* /opt/hostedtoolcache/CodeQL \
|
|
||||||
/usr/local/lib/node_modules /usr/local/share/chromium \
|
/usr/local/lib/node_modules /usr/local/share/chromium \
|
||||||
/usr/local/share/powershell
|
/usr/local/share/powershell
|
||||||
df -h
|
df -m
|
||||||
|
|
||||||
# for oci_container unit tests
|
# for oci_container unit tests
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
@@ -121,8 +140,7 @@ jobs:
|
|||||||
sudo xcode-select --switch /Applications/Xcode_16.4.app
|
sudo xcode-select --switch /Applications/Xcode_16.4.app
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: uv sync --no-dev --group test
|
||||||
uv sync --no-dev --group test
|
|
||||||
|
|
||||||
- uses: joerick/pr-labels-action@v1.0.9
|
- uses: joerick/pr-labels-action@v1.0.9
|
||||||
|
|
||||||
@@ -145,9 +163,11 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
echo "CIBW_ENABLE=${CIBW_ENABLE}" >> $GITHUB_ENV
|
echo "CIBW_ENABLE=${CIBW_ENABLE}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Generate a sample project
|
- name: Download a sample project
|
||||||
run: |
|
uses: actions/download-artifact@v5
|
||||||
uv run --no-sync -m test.test_projects test.test_0_basic.basic_project sample_proj
|
with:
|
||||||
|
name: sample_proj
|
||||||
|
path: sample_proj
|
||||||
|
|
||||||
- name: Run a sample build (GitHub Action)
|
- name: Run a sample build (GitHub Action)
|
||||||
uses: ./
|
uses: ./
|
||||||
@@ -202,7 +222,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
test $(find wheelhouse_only -name '*.whl' | wc -l) -eq 1
|
test $(find wheelhouse_only -name '*.whl' | wc -l) -eq 1
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v5
|
- uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
|
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
|
||||||
path: wheelhouse/*.whl
|
path: wheelhouse/*.whl
|
||||||
@@ -210,8 +230,7 @@ jobs:
|
|||||||
- name: Test cibuildwheel
|
- name: Test cibuildwheel
|
||||||
env:
|
env:
|
||||||
CIBW_TEST_RUNTIME: ${{ matrix.test_runtime }}
|
CIBW_TEST_RUNTIME: ${{ matrix.test_runtime }}
|
||||||
run: |
|
run: uv run --no-sync bin/run_tests.py --test-select=${{ matrix.test_select || 'native' }} ${{ (runner.os == 'Linux' && runner.arch == 'X64') && '--run-podman' || '' }}
|
||||||
uv run --no-sync bin/run_tests.py --test-select=${{ matrix.test_select || 'native' }} ${{ (runner.os == 'Linux' && runner.arch == 'X64') && '--run-podman' || '' }}
|
|
||||||
|
|
||||||
emulated-archs:
|
emulated-archs:
|
||||||
name: Get qemu emulated architectures
|
name: Get qemu emulated architectures
|
||||||
@@ -220,7 +239,7 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
archs: ${{ steps.archs.outputs.archs }}
|
archs: ${{ steps.archs.outputs.archs }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: "3.x"
|
python-version: "3.x"
|
||||||
@@ -243,7 +262,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
arch: ${{ fromJSON(needs.emulated-archs.outputs.archs) }}
|
arch: ${{ fromJSON(needs.emulated-archs.outputs.archs) }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: "3.x"
|
python-version: "3.x"
|
||||||
@@ -259,11 +278,11 @@ jobs:
|
|||||||
|
|
||||||
test-pyodide:
|
test-pyodide:
|
||||||
name: Test pyodide
|
name: Test pyodide
|
||||||
needs: lint
|
needs: sample
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
timeout-minutes: 180
|
timeout-minutes: 180
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v6
|
||||||
name: Install Python 3.12
|
name: Install Python 3.12
|
||||||
with:
|
with:
|
||||||
@@ -273,9 +292,11 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: uv sync --no-dev --group test
|
run: uv sync --no-dev --group test
|
||||||
|
|
||||||
- name: Generate a sample project
|
- name: Download a sample project
|
||||||
run: |
|
uses: actions/download-artifact@v5
|
||||||
uv run --no-sync -m test.test_projects test.test_0_basic.basic_project sample_proj
|
with:
|
||||||
|
name: sample_proj
|
||||||
|
path: sample_proj
|
||||||
|
|
||||||
- name: Run a sample build (GitHub Action)
|
- name: Run a sample build (GitHub Action)
|
||||||
uses: ./
|
uses: ./
|
||||||
@@ -286,7 +307,43 @@ jobs:
|
|||||||
CIBW_PLATFORM: pyodide
|
CIBW_PLATFORM: pyodide
|
||||||
|
|
||||||
- name: Run tests with 'CIBW_PLATFORM' set to 'pyodide'
|
- name: Run tests with 'CIBW_PLATFORM' set to 'pyodide'
|
||||||
run: |
|
run: uv run --no-sync ./bin/run_tests.py
|
||||||
uv run --no-sync ./bin/run_tests.py
|
|
||||||
env:
|
env:
|
||||||
CIBW_PLATFORM: pyodide
|
CIBW_PLATFORM: pyodide
|
||||||
|
|
||||||
|
test-uv-extras:
|
||||||
|
name: Test uv extra on ${{ matrix.os }} ${{ matrix.test_select }}
|
||||||
|
needs: sample
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
test_select: android
|
||||||
|
- os: windows-latest
|
||||||
|
- os: windows-11-arm
|
||||||
|
- os: macos-15-intel
|
||||||
|
- os: macos-15
|
||||||
|
- os: macos-15-intel
|
||||||
|
test_select: android
|
||||||
|
- os: macos-15
|
||||||
|
test_select: android
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
- name: Download a sample project
|
||||||
|
uses: actions/download-artifact@v5
|
||||||
|
with:
|
||||||
|
name: sample_proj
|
||||||
|
path: sample_proj
|
||||||
|
- name: Run a sample build (GitHub Action)
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
extras: uv
|
||||||
|
package-dir: sample_proj
|
||||||
|
output-dir: wheelhouse
|
||||||
|
env:
|
||||||
|
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
|
||||||
|
CIBW_BUILD: cp314-*
|
||||||
|
CIBW_BUILD_FRONTEND: 'build[uv]'
|
||||||
|
CIBW_PLATFORM: ${{ matrix.test_select }}
|
||||||
|
|||||||
@@ -30,9 +30,9 @@ jobs:
|
|||||||
app-id: ${{ secrets.CIBUILDWHEEL_BOT_APP_ID }}
|
app-id: ${{ secrets.CIBUILDWHEEL_BOT_APP_ID }}
|
||||||
private-key: ${{ secrets.CIBUILDWHEEL_BOT_APP_PRIVATE_KEY }}
|
private-key: ${{ secrets.CIBUILDWHEEL_BOT_APP_PRIVATE_KEY }}
|
||||||
|
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- uses: wntrblm/nox@2025.10.16
|
- uses: wntrblm/nox@2025.11.12
|
||||||
|
|
||||||
- name: "Run update: dependencies"
|
- name: "Run update: dependencies"
|
||||||
run: nox --force-color -s update_constraints
|
run: nox --force-color -s update_constraints
|
||||||
@@ -43,7 +43,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
if: github.ref == 'refs/heads/main' && github.repository == 'pypa/cibuildwheel'
|
if: github.ref == 'refs/heads/main' && github.repository == 'pypa/cibuildwheel'
|
||||||
uses: peter-evans/create-pull-request@v7
|
uses: peter-evans/create-pull-request@v8
|
||||||
with:
|
with:
|
||||||
commit-message: Update dependencies
|
commit-message: Update dependencies
|
||||||
title: '[Bot] Update dependencies'
|
title: '[Bot] Update dependencies'
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Update the ${{ env.TAG_NAME }} tag
|
- name: Update the ${{ env.TAG_NAME }} tag
|
||||||
id: update-major-minor-tag
|
id: update-major-minor-tag
|
||||||
|
|||||||
@@ -14,14 +14,14 @@ repos:
|
|||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
|
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: v0.14.4
|
rev: v0.14.14
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff-check
|
- id: ruff-check
|
||||||
args: ["--fix", "--show-fixes"]
|
args: ["--fix", "--show-fixes"]
|
||||||
- id: ruff-format
|
- id: ruff-format
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||||
rev: v1.18.2
|
rev: v1.19.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: mypy
|
- id: mypy
|
||||||
name: mypy 3.11 on cibuildwheel/
|
name: mypy 3.11 on cibuildwheel/
|
||||||
@@ -49,8 +49,8 @@ repos:
|
|||||||
- uv
|
- uv
|
||||||
- validate-pyproject
|
- validate-pyproject
|
||||||
- id: mypy
|
- id: mypy
|
||||||
name: mypy 3.13
|
name: mypy 3.14
|
||||||
args: ["--python-version=3.13"]
|
args: ["--python-version=3.14"]
|
||||||
additional_dependencies: *mypy-dependencies
|
additional_dependencies: *mypy-dependencies
|
||||||
|
|
||||||
- repo: https://github.com/shellcheck-py/shellcheck-py
|
- repo: https://github.com/shellcheck-py/shellcheck-py
|
||||||
@@ -83,7 +83,7 @@ repos:
|
|||||||
|
|
||||||
|
|
||||||
- repo: https://github.com/python-jsonschema/check-jsonschema
|
- repo: https://github.com/python-jsonschema/check-jsonschema
|
||||||
rev: 0.34.1
|
rev: 0.36.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-dependabot
|
- id: check-dependabot
|
||||||
- id: check-github-actions
|
- id: check-github-actions
|
||||||
|
|||||||
-79
@@ -1,79 +0,0 @@
|
|||||||
os: linux
|
|
||||||
dist: jammy
|
|
||||||
language: python
|
|
||||||
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- main
|
|
||||||
|
|
||||||
# only build the main branch or PR that explicitely want to test with Travis CI
|
|
||||||
if: (type = "push") OR (commit_message =~ /travis-ci/)
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
include:
|
|
||||||
- name: Linux | x86_64 + i686 | Python 3.12
|
|
||||||
python: 3.12
|
|
||||||
services: docker
|
|
||||||
env:
|
|
||||||
- PYTHON=python
|
|
||||||
# a build using CIBW_ENABLE=all does not fit into Travis' time limit,
|
|
||||||
# so only the defaults are tested
|
|
||||||
|
|
||||||
- name: Linux | arm64 | Python 3.12
|
|
||||||
python: 3.12
|
|
||||||
services: docker
|
|
||||||
arch: arm64
|
|
||||||
env:
|
|
||||||
- PYTHON=python
|
|
||||||
- CIBW_ENABLE=all
|
|
||||||
|
|
||||||
- name: Linux | ppc64le | Python 3.12
|
|
||||||
python: 3.12
|
|
||||||
services: docker
|
|
||||||
arch: ppc64le
|
|
||||||
allow_failure: True
|
|
||||||
env:
|
|
||||||
- PYTHON=python
|
|
||||||
# skip test_manylinuxXXXX_only, it uses too much disk space
|
|
||||||
# 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"'
|
|
||||||
- CIBW_ENABLE=all
|
|
||||||
|
|
||||||
- name: Windows | x86_64 | Python 3.12
|
|
||||||
os: windows
|
|
||||||
language: shell
|
|
||||||
before_install:
|
|
||||||
# http://woshub.com/updating-trusted-root-certificates-in-windows-10
|
|
||||||
- certutil -generateSSTFromWU roots.sst
|
|
||||||
- powershell -Command 'Get-ChildItem -Path roots.sst | Import-Certificate -CertStoreLocation Cert:\LocalMachine\Root'
|
|
||||||
- rm -f roots.sst
|
|
||||||
- choco upgrade python3 -y --version 3.12.8 --limit-output --params "/InstallDir:C:\\Python312"
|
|
||||||
env:
|
|
||||||
- PYTHON=C:\\Python312\\python
|
|
||||||
# a build using CIBW_ENABLE=all does not fit into Travis' time limit,
|
|
||||||
# so only the defaults are tested
|
|
||||||
|
|
||||||
- name: Linux | s390x | Python 3.12
|
|
||||||
python: 3.12
|
|
||||||
services: docker
|
|
||||||
arch: s390x
|
|
||||||
allow_failure: True
|
|
||||||
env:
|
|
||||||
- PYTHON=python
|
|
||||||
- CIBW_ENABLE=all
|
|
||||||
|
|
||||||
install:
|
|
||||||
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then docker run --rm --privileged docker.io/tonistiigi/binfmt:latest --install all; fi
|
|
||||||
- $PYTHON -m pip install -U pip
|
|
||||||
- $PYTHON -m pip install -e. --group test
|
|
||||||
|
|
||||||
script: |
|
|
||||||
# travis_wait disable the output while waiting
|
|
||||||
# use the same kind of tricks as in multibuild
|
|
||||||
(while true; do echo "travis_keep_alive"; sleep 300; done) &
|
|
||||||
SPINNER_PID=$!
|
|
||||||
disown
|
|
||||||
result=0
|
|
||||||
$PYTHON ./bin/run_tests.py --num-processes 2 || result=1
|
|
||||||
kill -9 ${SPINNER_PID}
|
|
||||||
test ${result} -eq 0
|
|
||||||
@@ -1,11 +1,9 @@
|
|||||||
This is a summary of the host Python versions and platforms covered by the different CI platforms:
|
This is a summary of the host Python versions and platforms covered by the different CI platforms:
|
||||||
|
|
||||||
| | 3.11 | 3.12 | 3.13 |
|
| | 3.11 | 3.12 | 3.13 | 3.14 |
|
||||||
|---------|----------------------------------|---------------------------------------------|----------------|
|
|---------|----------------------------------|---------------------------------|----------------|----------------|
|
||||||
| Linux | Azure Pipelines / GitHub Actions | CircleCI¹ / Cirrus CI / GitLab¹ / Travis CI | GitHub Actions |
|
| Linux | Azure Pipelines / GitHub Actions | CircleCI¹ / Cirrus CI / GitLab¹ | GitHub Actions | GitHub Actions |
|
||||||
| macOS | Azure Pipelines | CircleCI¹ / Cirrus CI / GitLab¹ | GitHub Actions |
|
| macOS | Azure Pipelines | CircleCI¹ / Cirrus CI / GitLab¹ | GitHub Actions | |
|
||||||
| Windows | Azure Pipelines | Cirrus CI / GitLab¹ / Travis CI | GitHub Actions |
|
| Windows | Azure Pipelines | Cirrus CI / GitLab¹ | GitHub Actions | |
|
||||||
|
|
||||||
> ¹ Runs a reduced set of tests to reduce CI load
|
> ¹ Runs a reduced set of tests to reduce CI load
|
||||||
|
|
||||||
Non-x86 architectures are covered on Travis CI using Python 3.12.
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ cibuildwheel
|
|||||||
[](https://pypi.python.org/pypi/cibuildwheel)
|
[](https://pypi.python.org/pypi/cibuildwheel)
|
||||||
[](https://cibuildwheel.pypa.io/en/stable/?badge=stable)
|
[](https://cibuildwheel.pypa.io/en/stable/?badge=stable)
|
||||||
[](https://github.com/pypa/cibuildwheel/actions)
|
[](https://github.com/pypa/cibuildwheel/actions)
|
||||||
[](https://travis-ci.com/github/pypa/cibuildwheel)
|
|
||||||
[](https://circleci.com/gh/pypa/cibuildwheel)
|
[](https://circleci.com/gh/pypa/cibuildwheel)
|
||||||
[](https://dev.azure.com/joerick0429/cibuildwheel/_build/latest?definitionId=4&branchName=main)
|
[](https://dev.azure.com/joerick0429/cibuildwheel/_build/latest?definitionId=4&branchName=main)
|
||||||
|
|
||||||
@@ -15,7 +14,7 @@ cibuildwheel
|
|||||||
|
|
||||||
Python wheels are great. Building them across **Mac, Linux, Windows**, on **multiple versions of Python**, is not.
|
Python wheels are great. Building them across **Mac, Linux, Windows**, on **multiple versions of Python**, is not.
|
||||||
|
|
||||||
`cibuildwheel` is here to help. `cibuildwheel` runs on your CI server - currently it supports GitHub Actions, Azure Pipelines, Travis CI, CircleCI, and GitLab CI - and it builds and tests your wheels across all of your platforms.
|
`cibuildwheel` is here to help. `cibuildwheel` runs on your CI server - currently it supports GitHub Actions, Azure Pipelines, CircleCI, and GitLab CI - and it builds and tests your wheels across all of your platforms.
|
||||||
|
|
||||||
|
|
||||||
What does it do?
|
What does it do?
|
||||||
@@ -46,7 +45,7 @@ While cibuildwheel itself requires a recent Python version to run (we support th
|
|||||||
<sup>⁵ manylinux armv7l support is experimental. As there are no RHEL based image for this architecture, it's using an Ubuntu based image instead.</sup><br>
|
<sup>⁵ manylinux armv7l support is experimental. As there are no RHEL based image for this architecture, it's using an Ubuntu based image instead.</sup><br>
|
||||||
|
|
||||||
- Builds manylinux, musllinux, macOS, and Windows wheels for CPython, PyPy, and GraalPy
|
- Builds manylinux, musllinux, macOS, and Windows wheels for CPython, PyPy, and GraalPy
|
||||||
- Works on GitHub Actions, Azure Pipelines, Travis CI, CircleCI, GitLab CI, and Cirrus CI
|
- Works on GitHub Actions, Azure Pipelines, CircleCI, GitLab CI, and Cirrus CI
|
||||||
- Bundles shared library dependencies on Linux and macOS through [auditwheel](https://github.com/pypa/auditwheel) and [delocate](https://github.com/matthew-brett/delocate)
|
- Bundles shared library dependencies on Linux and macOS through [auditwheel](https://github.com/pypa/auditwheel) and [delocate](https://github.com/matthew-brett/delocate)
|
||||||
- Runs your library's tests against the wheel-installed version of your library
|
- Runs your library's tests against the wheel-installed version of your library
|
||||||
|
|
||||||
@@ -61,7 +60,6 @@ Usage
|
|||||||
|-----------------|-------|-------|---------|-----------|-----------|-------------|---------|-----|
|
|-----------------|-------|-------|---------|-----------|-----------|-------------|---------|-----|
|
||||||
| GitHub Actions | ✅ | ✅ | ✅ | ✅ | ✅ | ✅² | ✅⁴ | ✅³ |
|
| GitHub Actions | ✅ | ✅ | ✅ | ✅ | ✅ | ✅² | ✅⁴ | ✅³ |
|
||||||
| Azure Pipelines | ✅ | ✅ | ✅ | | ✅ | ✅² | ✅⁴ | ✅³ |
|
| Azure Pipelines | ✅ | ✅ | ✅ | | ✅ | ✅² | ✅⁴ | ✅³ |
|
||||||
| Travis CI | ✅ | | ✅ | ✅ | | | ✅⁴ | |
|
|
||||||
| CircleCI | ✅ | ✅ | | ✅ | ✅ | | ✅⁴ | ✅³ |
|
| CircleCI | ✅ | ✅ | | ✅ | ✅ | | ✅⁴ | ✅³ |
|
||||||
| Gitlab CI | ✅ | ✅ | ✅ | ✅¹ | ✅ | | ✅⁴ | ✅³ |
|
| Gitlab CI | ✅ | ✅ | ✅ | ✅¹ | ✅ | | ✅⁴ | ✅³ |
|
||||||
| Cirrus CI | ✅ | ✅ | ✅ | ✅ | ✅ | | ✅⁴ | |
|
| Cirrus CI | ✅ | ✅ | ✅ | ✅ | ✅ | | ✅⁴ | |
|
||||||
@@ -184,8 +182,8 @@ Here are some repos that use cibuildwheel.
|
|||||||
| [duckdb][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | DuckDB is an analytical in-process SQL database management system |
|
| [duckdb][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | DuckDB is an analytical in-process SQL database management system |
|
||||||
| [pytorch-fairseq][] | ![github icon][] | ![apple icon][] ![linux icon][] | Facebook AI Research Sequence-to-Sequence Toolkit written in Python. |
|
| [pytorch-fairseq][] | ![github icon][] | ![apple icon][] ![linux icon][] | Facebook AI Research Sequence-to-Sequence Toolkit written in Python. |
|
||||||
| [NumPy][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The fundamental package for scientific computing with Python. |
|
| [NumPy][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The fundamental package for scientific computing with Python. |
|
||||||
| [Tornado][] | ![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. |
|
|
||||||
| [NCNN][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | ncnn is a high-performance neural network inference framework optimized for the mobile platform |
|
| [NCNN][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | ncnn is a high-performance neural network inference framework optimized for the mobile platform |
|
||||||
|
| [Tornado][] | ![github icon][] | ![linux icon][] ![apple icon][] ![windows icon][] | Tornado is a Python web framework and asynchronous networking library. Uses stable ABI for a small C extension. |
|
||||||
| [Matplotlib][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The venerable Matplotlib, a Python library with C++ portions |
|
| [Matplotlib][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The venerable Matplotlib, a Python library with C++ portions |
|
||||||
| [MyPy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | The compiled version of MyPy using MyPyC. |
|
| [MyPy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | The compiled version of MyPy using MyPyC. |
|
||||||
| [Prophet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth. |
|
| [Prophet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth. |
|
||||||
@@ -195,8 +193,8 @@ Here are some repos that use cibuildwheel.
|
|||||||
[duckdb]: https://github.com/duckdb/duckdb
|
[duckdb]: https://github.com/duckdb/duckdb
|
||||||
[pytorch-fairseq]: https://github.com/facebookresearch/fairseq
|
[pytorch-fairseq]: https://github.com/facebookresearch/fairseq
|
||||||
[NumPy]: https://github.com/numpy/numpy
|
[NumPy]: https://github.com/numpy/numpy
|
||||||
[Tornado]: https://github.com/tornadoweb/tornado
|
|
||||||
[NCNN]: https://github.com/Tencent/ncnn
|
[NCNN]: https://github.com/Tencent/ncnn
|
||||||
|
[Tornado]: https://github.com/tornadoweb/tornado
|
||||||
[Matplotlib]: https://github.com/matplotlib/matplotlib
|
[Matplotlib]: https://github.com/matplotlib/matplotlib
|
||||||
[MyPy]: https://github.com/mypyc/mypy_mypyc-wheels
|
[MyPy]: https://github.com/mypyc/mypy_mypyc-wheels
|
||||||
[Prophet]: https://github.com/facebook/prophet
|
[Prophet]: https://github.com/facebook/prophet
|
||||||
|
|||||||
+1
-3
@@ -31,7 +31,7 @@ runs:
|
|||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v6
|
||||||
id: python
|
id: python
|
||||||
with:
|
with:
|
||||||
python-version: "3.11 - 3.13"
|
python-version: "3.11 - 3.14"
|
||||||
update-environment: false
|
update-environment: false
|
||||||
|
|
||||||
- id: cibw
|
- id: cibw
|
||||||
@@ -47,8 +47,6 @@ runs:
|
|||||||
from subprocess import run
|
from subprocess import run
|
||||||
|
|
||||||
EXTRAS = set(e.strip() for e in "${{ inputs.extras }}".split(",") if e.strip())
|
EXTRAS = set(e.strip() for e in "${{ inputs.extras }}".split(",") if e.strip())
|
||||||
if sys.platform == "linux":
|
|
||||||
EXTRAS.discard("uv")
|
|
||||||
|
|
||||||
|
|
||||||
class EnvBuilder(venv.EnvBuilder):
|
class EnvBuilder(venv.EnvBuilder):
|
||||||
|
|||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
# /// script
|
# /// script
|
||||||
# dependencies = ["click", "packaging"]
|
# dependencies = ["click", "packaging", "prek"]
|
||||||
# ///
|
# ///
|
||||||
|
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ def bump_version() -> None:
|
|||||||
# run pre-commit to update the README changelog
|
# run pre-commit to update the README changelog
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
[
|
[
|
||||||
"pre-commit",
|
"prek",
|
||||||
"run",
|
"run",
|
||||||
"--files=docs/changelog.md",
|
"--files=docs/changelog.md",
|
||||||
],
|
],
|
||||||
@@ -149,7 +149,7 @@ def bump_version() -> None:
|
|||||||
# run pre-commit to check that no errors occurred on the second run
|
# run pre-commit to check that no errors occurred on the second run
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
[
|
[
|
||||||
"pre-commit",
|
"prek",
|
||||||
"run",
|
"run",
|
||||||
"--files=docs/changelog.md",
|
"--files=docs/changelog.md",
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ $defs:
|
|||||||
description: How to inherit the parent's value.
|
description: How to inherit the parent's value.
|
||||||
enable:
|
enable:
|
||||||
enum:
|
enum:
|
||||||
- cpython-experimental-riscv64
|
|
||||||
- cpython-freethreading
|
- cpython-freethreading
|
||||||
- cpython-prerelease
|
- cpython-prerelease
|
||||||
- graalpy
|
- graalpy
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import contextlib
|
import contextlib
|
||||||
import dataclasses
|
import dataclasses
|
||||||
|
import functools
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
@@ -78,8 +79,13 @@ def main_inner(global_options: GlobalOptions) -> None:
|
|||||||
`main_inner` is the same as `main`, but it raises FatalError exceptions
|
`main_inner` is the same as `main`, but it raises FatalError exceptions
|
||||||
rather than exiting directly.
|
rather than exiting directly.
|
||||||
"""
|
"""
|
||||||
|
# Default in 3.15+, only needed on 3.14
|
||||||
|
if sys.version_info >= (3, 14):
|
||||||
|
arg_parser = functools.partial(argparse.ArgumentParser, suggest_on_error=True)
|
||||||
|
else:
|
||||||
|
arg_parser = argparse.ArgumentParser
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(
|
parser = arg_parser(
|
||||||
description="Build wheels for all the platforms.",
|
description="Build wheels for all the platforms.",
|
||||||
epilog="""
|
epilog="""
|
||||||
Most options are supplied via environment variables or in
|
Most options are supplied via environment variables or in
|
||||||
@@ -378,10 +384,23 @@ def build_in_directory(args: CommandLineArguments) -> None:
|
|||||||
|
|
||||||
output_dir.mkdir(parents=True, exist_ok=True)
|
output_dir.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
|
# Snapshot wheels before build to detect newly built ones
|
||||||
|
wheels_before = {p.name for p in output_dir.glob("*.whl")}
|
||||||
|
|
||||||
tmp_path = Path(mkdtemp(prefix="cibw-run-")).resolve(strict=True)
|
tmp_path = Path(mkdtemp(prefix="cibw-run-")).resolve(strict=True)
|
||||||
try:
|
try:
|
||||||
with log.print_summary(options=options):
|
with log.print_summary(options=options):
|
||||||
platform_module.build(options, tmp_path)
|
platform_module.build(options, tmp_path)
|
||||||
|
|
||||||
|
# Run audit step after all builds complete
|
||||||
|
if options.globals.audit_command:
|
||||||
|
from cibuildwheel.audit import run_audit
|
||||||
|
|
||||||
|
run_audit(
|
||||||
|
audit_command=options.globals.audit_command,
|
||||||
|
output_dir=output_dir,
|
||||||
|
wheels_before=wheels_before,
|
||||||
|
)
|
||||||
finally:
|
finally:
|
||||||
# avoid https://github.com/python/cpython/issues/86962 by performing
|
# avoid https://github.com/python/cpython/issues/86962 by performing
|
||||||
# cleanup manually
|
# cleanup manually
|
||||||
@@ -463,13 +482,6 @@ def detect_warnings(*, options: Options) -> Generator[str, None, None]:
|
|||||||
build_selector = options.globals.build_selector
|
build_selector = options.globals.build_selector
|
||||||
test_selector = options.globals.test_selector
|
test_selector = options.globals.test_selector
|
||||||
|
|
||||||
if EnableGroup.CPythonExperimentalRiscV64 in build_selector.enable:
|
|
||||||
yield (
|
|
||||||
"'cpython-experimental-riscv64' enable is deprecated and will be removed in a future version. "
|
|
||||||
"It should be removed from tool.cibuildwheel.enable in pyproject.toml "
|
|
||||||
"or CIBW_ENABLE environment variable."
|
|
||||||
)
|
|
||||||
|
|
||||||
all_valid_identifiers = [
|
all_valid_identifiers = [
|
||||||
config.identifier
|
config.identifier
|
||||||
for module in ALL_PLATFORM_MODULES.values()
|
for module in ALL_PLATFORM_MODULES.values()
|
||||||
|
|||||||
@@ -0,0 +1,89 @@
|
|||||||
|
"""
|
||||||
|
Audit step for wheels built by cibuildwheel.
|
||||||
|
|
||||||
|
This module provides functionality to run audit commands (like abi3audit)
|
||||||
|
on built wheels after all platform builds are complete.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
from packaging.utils import parse_wheel_filename
|
||||||
|
|
||||||
|
from .logger import log
|
||||||
|
from .util.helpers import format_safe
|
||||||
|
|
||||||
|
|
||||||
|
def is_abi3_wheel(wheel_path: Path) -> bool:
|
||||||
|
"""Check if a wheel is an abi3 wheel by parsing its filename."""
|
||||||
|
_, _, _, tags = parse_wheel_filename(wheel_path.name)
|
||||||
|
return any(t.abi == "abi3" for t in tags)
|
||||||
|
|
||||||
|
|
||||||
|
def run_audit(
|
||||||
|
audit_command: str,
|
||||||
|
output_dir: Path,
|
||||||
|
wheels_before: set[str],
|
||||||
|
) -> None:
|
||||||
|
"""
|
||||||
|
Run the audit command on wheels built in this run.
|
||||||
|
|
||||||
|
The audit command supports the following placeholders:
|
||||||
|
- {wheel}: expands to each wheel path, runs the command once per wheel
|
||||||
|
- {abi3_wheel}: same as {wheel}, but only for abi3 wheels
|
||||||
|
|
||||||
|
If the command contains {abi3_wheel} but no abi3 wheels were produced,
|
||||||
|
the audit step is skipped.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
audit_command: The command template to run
|
||||||
|
output_dir: Directory where wheels were output
|
||||||
|
wheels_before: Set of wheel filenames that existed before the build
|
||||||
|
"""
|
||||||
|
if not audit_command:
|
||||||
|
return
|
||||||
|
|
||||||
|
# Find wheels built in this run (new wheels that weren't there before)
|
||||||
|
all_wheels = sorted(output_dir.glob("*.whl"))
|
||||||
|
just_built = [w for w in all_wheels if w.name not in wheels_before]
|
||||||
|
|
||||||
|
if not just_built:
|
||||||
|
return
|
||||||
|
|
||||||
|
# Determine if we're auditing abi3 wheels only
|
||||||
|
abi3_only = "{abi3_wheel}" in audit_command
|
||||||
|
|
||||||
|
# Filter wheels if needed
|
||||||
|
if abi3_only:
|
||||||
|
wheels_to_audit = [w for w in just_built if is_abi3_wheel(w)]
|
||||||
|
if not wheels_to_audit:
|
||||||
|
log.step("Skipping audit step (no abi3 wheels produced)")
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
wheels_to_audit = just_built
|
||||||
|
|
||||||
|
log.step("Running audit...")
|
||||||
|
|
||||||
|
for wheel in wheels_to_audit:
|
||||||
|
# Prepare command with placeholders
|
||||||
|
prepared = format_safe(
|
||||||
|
audit_command,
|
||||||
|
wheel=wheel,
|
||||||
|
abi3_wheel=wheel,
|
||||||
|
)
|
||||||
|
|
||||||
|
log.step(f" Auditing {wheel.name}...")
|
||||||
|
env = os.environ.copy()
|
||||||
|
|
||||||
|
try:
|
||||||
|
subprocess.run(
|
||||||
|
prepared,
|
||||||
|
shell=True,
|
||||||
|
check=True,
|
||||||
|
env=env,
|
||||||
|
cwd=output_dir,
|
||||||
|
)
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
log.error(f"Audit command failed for {wheel.name}")
|
||||||
|
raise SystemExit(e.returncode) from e
|
||||||
@@ -90,6 +90,7 @@ class GlobalOptions:
|
|||||||
test_selector: TestSelector
|
test_selector: TestSelector
|
||||||
architectures: set[Architecture]
|
architectures: set[Architecture]
|
||||||
allow_empty: bool
|
allow_empty: bool
|
||||||
|
audit_command: str
|
||||||
|
|
||||||
|
|
||||||
@dataclasses.dataclass(frozen=True)
|
@dataclasses.dataclass(frozen=True)
|
||||||
@@ -695,6 +696,8 @@ class Options:
|
|||||||
)
|
)
|
||||||
test_selector = TestSelector(skip_config=test_skip)
|
test_selector = TestSelector(skip_config=test_skip)
|
||||||
|
|
||||||
|
audit_command = self.reader.get("audit", option_format=ListFormat(sep=" && "))
|
||||||
|
|
||||||
return GlobalOptions(
|
return GlobalOptions(
|
||||||
package_dir=package_dir,
|
package_dir=package_dir,
|
||||||
output_dir=output_dir,
|
output_dir=output_dir,
|
||||||
@@ -702,6 +705,7 @@ class Options:
|
|||||||
test_selector=test_selector,
|
test_selector=test_selector,
|
||||||
architectures=architectures,
|
architectures=architectures,
|
||||||
allow_empty=allow_empty,
|
allow_empty=allow_empty,
|
||||||
|
audit_command=audit_command,
|
||||||
)
|
)
|
||||||
|
|
||||||
def _check_pinned_image(self, value: str, pinned_images: Mapping[str, str]) -> None:
|
def _check_pinned_image(self, value: str, pinned_images: Mapping[str, str]) -> None:
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import shlex
|
|||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import sysconfig
|
import sysconfig
|
||||||
from collections.abc import Iterable, Iterator
|
from collections.abc import Iterable, Iterator, MutableMapping
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from os.path import relpath
|
from os.path import relpath
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@@ -390,6 +390,9 @@ def setup_android_env(
|
|||||||
for key in ["CFLAGS", "CXXFLAGS"]:
|
for key in ["CFLAGS", "CXXFLAGS"]:
|
||||||
android_env[key] += " " + opt
|
android_env[key] += " " + opt
|
||||||
|
|
||||||
|
# Cargo target linker needs to be specified after CC is set
|
||||||
|
setup_rust(config, python_dir, android_env)
|
||||||
|
|
||||||
# Format the environment so it can be pasted into a shell when debugging.
|
# Format the environment so it can be pasted into a shell when debugging.
|
||||||
for key, value in sorted(android_env.items()):
|
for key, value in sorted(android_env.items()):
|
||||||
if os.environ.get(key) != value:
|
if os.environ.get(key) != value:
|
||||||
@@ -398,6 +401,34 @@ def setup_android_env(
|
|||||||
return android_env
|
return android_env
|
||||||
|
|
||||||
|
|
||||||
|
def setup_rust(
|
||||||
|
config: PythonConfiguration,
|
||||||
|
python_dir: Path,
|
||||||
|
env: MutableMapping[str, str],
|
||||||
|
) -> None:
|
||||||
|
cargo_target = android_triplet(config.identifier)
|
||||||
|
|
||||||
|
# CARGO_BUILD_TARGET is the variable used by Cargo and setuptools_rust
|
||||||
|
env["CARGO_BUILD_TARGET"] = cargo_target
|
||||||
|
|
||||||
|
# The linker needs to be specified after CC is set by android-env.sh
|
||||||
|
cargo_target_linker_env_name = f"CARGO_TARGET_{cargo_target.upper().replace('-', '_')}_LINKER"
|
||||||
|
# CC has already been set by calling android.py (it calls android-env.sh)
|
||||||
|
env[cargo_target_linker_env_name] = env["CC"]
|
||||||
|
|
||||||
|
# All Python extension modules must be explicitly linked against libpython3.x.so when building for Android.
|
||||||
|
# See: https://peps.python.org/pep-0738/#linkage
|
||||||
|
# For projects using PyO3, this requires setting PYO3_CROSS_LIB_DIR to the directory containing libpython3.x.so.
|
||||||
|
# See: https://pyo3.rs/v0.27.1/building-and-distribution.html#cross-compiling
|
||||||
|
env["PYO3_CROSS_LIB_DIR"] = str(python_dir / "prefix" / "lib")
|
||||||
|
|
||||||
|
venv_bin = Path(env["VIRTUAL_ENV"]) / "bin"
|
||||||
|
for tool in ["cargo", "rustup"]:
|
||||||
|
shim_path = venv_bin / tool
|
||||||
|
shutil.copy(resources.PATH / "_rust_shim.py", shim_path)
|
||||||
|
shim_path.chmod(0o755)
|
||||||
|
|
||||||
|
|
||||||
def before_build(state: BuildState) -> None:
|
def before_build(state: BuildState) -> None:
|
||||||
if state.options.before_build:
|
if state.options.before_build:
|
||||||
log.step("Running before_build...")
|
log.step("Running before_build...")
|
||||||
|
|||||||
@@ -141,7 +141,8 @@ def install_cpython(_tmp: Path, version: str, url: str, free_threading: bool) ->
|
|||||||
# let the user know & provide a link to the installer
|
# let the user know & provide a link to the installer
|
||||||
msg = inspect.cleandoc(
|
msg = inspect.cleandoc(
|
||||||
f"""
|
f"""
|
||||||
Error: CPython {version} is not installed.
|
Framework CPython {version} not detected as installed in:
|
||||||
|
{installation_path}
|
||||||
cibuildwheel will not perform system-wide installs when running outside of CI.
|
cibuildwheel will not perform system-wide installs when running outside of CI.
|
||||||
To build locally, install CPython {version} on this machine, or, disable this
|
To build locally, install CPython {version} on this machine, or, disable this
|
||||||
version of Python using CIBW_SKIP=cp{version.replace(".", "")}-macosx_*
|
version of Python using CIBW_SKIP=cp{version.replace(".", "")}-macosx_*
|
||||||
|
|||||||
Executable
+57
@@ -0,0 +1,57 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> None:
|
||||||
|
# CIBW_HOST_TRIPLET is set in the android_env to the Android target triplet.
|
||||||
|
target = os.environ.get("CIBW_HOST_TRIPLET")
|
||||||
|
|
||||||
|
cmd_name = Path(sys.argv[0]).name
|
||||||
|
|
||||||
|
# Find the real command in PATH, excluding the current script's directory
|
||||||
|
path_env = os.environ.get("PATH", "")
|
||||||
|
script_dir = Path(__file__).resolve().parent
|
||||||
|
|
||||||
|
paths = path_env.split(os.pathsep)
|
||||||
|
# Filter out the script directory to avoid recursion
|
||||||
|
filtered_paths = [p for p in paths if Path(p).resolve() != script_dir]
|
||||||
|
filtered_path_env = os.pathsep.join(filtered_paths)
|
||||||
|
|
||||||
|
real_cmd = shutil.which(cmd_name, path=filtered_path_env)
|
||||||
|
|
||||||
|
if not real_cmd:
|
||||||
|
sys.stderr.write(f"cibuildwheel: Error: Could not find system {cmd_name}\n")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
# If we have a target (i.e. we are in the android_env), try to install it.
|
||||||
|
if target:
|
||||||
|
# Check if rustup is available to install the target
|
||||||
|
rustup_path = shutil.which("rustup", path=filtered_path_env)
|
||||||
|
|
||||||
|
if rustup_path:
|
||||||
|
try:
|
||||||
|
# We call rustup to ensure the target is installed.
|
||||||
|
subprocess.run(
|
||||||
|
[rustup_path, "target", "add", target],
|
||||||
|
check=True,
|
||||||
|
stdout=subprocess.DEVNULL,
|
||||||
|
stderr=subprocess.PIPE,
|
||||||
|
text=True,
|
||||||
|
)
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
sys.stderr.write(
|
||||||
|
f"cibuildwheel: Error: Failed to install Rust target {target}: {e.stderr}\n"
|
||||||
|
)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
# Execute the real command
|
||||||
|
os.execv(real_cmd, [real_cmd, *sys.argv[1:]])
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -226,7 +226,7 @@ python_configurations = [
|
|||||||
[pyodide]
|
[pyodide]
|
||||||
python_configurations = [
|
python_configurations = [
|
||||||
{ identifier = "cp312-pyodide_wasm32", version = "3.12", default_pyodide_version = "0.27.7", node_version = "v22" },
|
{ identifier = "cp312-pyodide_wasm32", version = "3.12", default_pyodide_version = "0.27.7", node_version = "v22" },
|
||||||
{ identifier = "cp313-pyodide_wasm32", version = "3.13", default_pyodide_version = "0.29.0", node_version = "v22" },
|
{ identifier = "cp313-pyodide_wasm32", version = "3.13", default_pyodide_version = "0.29.2", node_version = "v22" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[android]
|
[android]
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
},
|
},
|
||||||
"enable": {
|
"enable": {
|
||||||
"enum": [
|
"enum": [
|
||||||
"cpython-experimental-riscv64",
|
|
||||||
"cpython-freethreading",
|
"cpython-freethreading",
|
||||||
"cpython-prerelease",
|
"cpython-prerelease",
|
||||||
"graalpy",
|
"graalpy",
|
||||||
@@ -28,6 +27,21 @@
|
|||||||
"description": "cibuildwheel's settings.",
|
"description": "cibuildwheel's settings.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"audit": {
|
||||||
|
"description": "Execute a shell command to audit each wheel after all builds complete. Use {wheel} for each wheel path, or {abi3_wheel} to only audit abi3 wheels.",
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "CIBW_AUDIT"
|
||||||
|
},
|
||||||
"archs": {
|
"archs": {
|
||||||
"description": "Change the architectures built on your machine by default.",
|
"description": "Change the architectures built on your machine by default.",
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
# nox -s update_constraints
|
# nox -s update_constraints
|
||||||
annotated-types==0.7.0
|
annotated-types==0.7.0
|
||||||
# via pydantic
|
# via pydantic
|
||||||
anyio==4.12.0
|
anyio==4.12.1
|
||||||
# via httpx
|
# via httpx
|
||||||
auditwheel-emscripten==0.2.0
|
auditwheel-emscripten==0.2.1
|
||||||
# via pyodide-build
|
# via pyodide-build
|
||||||
build==1.2.2.post1
|
build==1.2.2.post1
|
||||||
# via
|
# via
|
||||||
@@ -23,7 +23,7 @@ click==8.1.8
|
|||||||
# typer
|
# typer
|
||||||
distlib==0.4.0
|
distlib==0.4.0
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
filelock==3.20.2
|
filelock==3.20.3
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
h11==0.16.0
|
h11==0.16.0
|
||||||
# via httpcore
|
# via httpcore
|
||||||
@@ -36,18 +36,19 @@ idna==3.11
|
|||||||
# anyio
|
# anyio
|
||||||
# httpx
|
# httpx
|
||||||
# requests
|
# requests
|
||||||
leb128==1.0.8
|
leb128==1.0.9
|
||||||
# via auditwheel-emscripten
|
# via auditwheel-emscripten
|
||||||
markdown-it-py==4.0.0
|
markdown-it-py==4.0.0
|
||||||
# via rich
|
# via rich
|
||||||
mdurl==0.1.2
|
mdurl==0.1.2
|
||||||
# via markdown-it-py
|
# via markdown-it-py
|
||||||
packaging==25.0
|
packaging==26.0
|
||||||
# via
|
# via
|
||||||
# auditwheel-emscripten
|
# auditwheel-emscripten
|
||||||
# build
|
# build
|
||||||
# pyodide-build
|
# pyodide-build
|
||||||
# unearth
|
# unearth
|
||||||
|
# wheel
|
||||||
pip==25.3
|
pip==25.3
|
||||||
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
|
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
|
||||||
platformdirs==4.5.1
|
platformdirs==4.5.1
|
||||||
@@ -62,9 +63,9 @@ pydantic-core==2.41.5
|
|||||||
# via pydantic
|
# via pydantic
|
||||||
pygments==2.19.2
|
pygments==2.19.2
|
||||||
# via rich
|
# via rich
|
||||||
pyodide-build==0.30.9
|
pyodide-build==0.31.2
|
||||||
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
|
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
|
||||||
pyodide-cli==0.4.0
|
pyodide-cli==0.4.2
|
||||||
# via
|
# via
|
||||||
# auditwheel-emscripten
|
# auditwheel-emscripten
|
||||||
# pyodide-build
|
# pyodide-build
|
||||||
@@ -76,7 +77,7 @@ requests==2.32.5
|
|||||||
# via pyodide-build
|
# via pyodide-build
|
||||||
resolvelib==1.2.1
|
resolvelib==1.2.1
|
||||||
# via pyodide-build
|
# via pyodide-build
|
||||||
rich==14.2.0
|
rich==14.3.1
|
||||||
# via
|
# via
|
||||||
# pyodide-build
|
# pyodide-build
|
||||||
# pyodide-cli
|
# pyodide-cli
|
||||||
@@ -85,7 +86,7 @@ ruamel-yaml==0.19.1
|
|||||||
# via pyodide-build
|
# via pyodide-build
|
||||||
shellingham==1.5.4
|
shellingham==1.5.4
|
||||||
# via typer
|
# via typer
|
||||||
typer==0.21.0
|
typer==0.21.1
|
||||||
# via
|
# via
|
||||||
# auditwheel-emscripten
|
# auditwheel-emscripten
|
||||||
# pyodide-build
|
# pyodide-build
|
||||||
@@ -101,13 +102,13 @@ typing-inspection==0.4.2
|
|||||||
# via pydantic
|
# via pydantic
|
||||||
unearth==0.18.2
|
unearth==0.18.2
|
||||||
# via pyodide-build
|
# via pyodide-build
|
||||||
urllib3==2.6.2
|
urllib3==2.6.3
|
||||||
# via requests
|
# via requests
|
||||||
virtualenv==20.35.4
|
virtualenv==20.36.1
|
||||||
# via
|
# via
|
||||||
# build
|
# build
|
||||||
# pyodide-build
|
# pyodide-build
|
||||||
wheel==0.45.1
|
wheel==0.46.3
|
||||||
# via
|
# via
|
||||||
# auditwheel-emscripten
|
# auditwheel-emscripten
|
||||||
# pyodide-build
|
# pyodide-build
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
# nox -s update_constraints
|
# nox -s update_constraints
|
||||||
annotated-types==0.7.0
|
annotated-types==0.7.0
|
||||||
# via pydantic
|
# via pydantic
|
||||||
anyio==4.12.0
|
anyio==4.12.1
|
||||||
# via httpx
|
# via httpx
|
||||||
auditwheel-emscripten==0.2.0
|
auditwheel-emscripten==0.2.1
|
||||||
# via pyodide-build
|
# via pyodide-build
|
||||||
build==1.2.2.post1
|
build==1.2.2.post1
|
||||||
# via
|
# via
|
||||||
@@ -23,7 +23,7 @@ click==8.1.8
|
|||||||
# typer
|
# typer
|
||||||
distlib==0.4.0
|
distlib==0.4.0
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
filelock==3.20.2
|
filelock==3.20.3
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
h11==0.16.0
|
h11==0.16.0
|
||||||
# via httpcore
|
# via httpcore
|
||||||
@@ -36,18 +36,19 @@ idna==3.11
|
|||||||
# anyio
|
# anyio
|
||||||
# httpx
|
# httpx
|
||||||
# requests
|
# requests
|
||||||
leb128==1.0.8
|
leb128==1.0.9
|
||||||
# via auditwheel-emscripten
|
# via auditwheel-emscripten
|
||||||
markdown-it-py==4.0.0
|
markdown-it-py==4.0.0
|
||||||
# via rich
|
# via rich
|
||||||
mdurl==0.1.2
|
mdurl==0.1.2
|
||||||
# via markdown-it-py
|
# via markdown-it-py
|
||||||
packaging==25.0
|
packaging==26.0
|
||||||
# via
|
# via
|
||||||
# auditwheel-emscripten
|
# auditwheel-emscripten
|
||||||
# build
|
# build
|
||||||
# pyodide-build
|
# pyodide-build
|
||||||
# unearth
|
# unearth
|
||||||
|
# wheel
|
||||||
pip==25.3
|
pip==25.3
|
||||||
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
|
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
|
||||||
platformdirs==4.5.1
|
platformdirs==4.5.1
|
||||||
@@ -62,9 +63,9 @@ pydantic-core==2.41.5
|
|||||||
# via pydantic
|
# via pydantic
|
||||||
pygments==2.19.2
|
pygments==2.19.2
|
||||||
# via rich
|
# via rich
|
||||||
pyodide-build==0.30.9
|
pyodide-build==0.31.2
|
||||||
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
|
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
|
||||||
pyodide-cli==0.4.0
|
pyodide-cli==0.4.2
|
||||||
# via
|
# via
|
||||||
# auditwheel-emscripten
|
# auditwheel-emscripten
|
||||||
# pyodide-build
|
# pyodide-build
|
||||||
@@ -76,7 +77,7 @@ requests==2.32.5
|
|||||||
# via pyodide-build
|
# via pyodide-build
|
||||||
resolvelib==1.2.1
|
resolvelib==1.2.1
|
||||||
# via pyodide-build
|
# via pyodide-build
|
||||||
rich==14.2.0
|
rich==14.3.1
|
||||||
# via
|
# via
|
||||||
# pyodide-build
|
# pyodide-build
|
||||||
# pyodide-cli
|
# pyodide-cli
|
||||||
@@ -85,7 +86,7 @@ ruamel-yaml==0.19.1
|
|||||||
# via pyodide-build
|
# via pyodide-build
|
||||||
shellingham==1.5.4
|
shellingham==1.5.4
|
||||||
# via typer
|
# via typer
|
||||||
typer==0.21.0
|
typer==0.21.1
|
||||||
# via
|
# via
|
||||||
# auditwheel-emscripten
|
# auditwheel-emscripten
|
||||||
# pyodide-build
|
# pyodide-build
|
||||||
@@ -100,13 +101,13 @@ typing-inspection==0.4.2
|
|||||||
# via pydantic
|
# via pydantic
|
||||||
unearth==0.18.2
|
unearth==0.18.2
|
||||||
# via pyodide-build
|
# via pyodide-build
|
||||||
urllib3==2.6.2
|
urllib3==2.6.3
|
||||||
# via requests
|
# via requests
|
||||||
virtualenv==20.35.4
|
virtualenv==20.36.1
|
||||||
# via
|
# via
|
||||||
# build
|
# build
|
||||||
# pyodide-build
|
# pyodide-build
|
||||||
wheel==0.45.1
|
wheel==0.46.3
|
||||||
# via
|
# via
|
||||||
# auditwheel-emscripten
|
# auditwheel-emscripten
|
||||||
# pyodide-build
|
# pyodide-build
|
||||||
|
|||||||
@@ -2,19 +2,19 @@
|
|||||||
# nox -s update_constraints
|
# nox -s update_constraints
|
||||||
altgraph==0.17.5
|
altgraph==0.17.5
|
||||||
# via macholib
|
# via macholib
|
||||||
build==1.3.0
|
build==1.4.0
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
delocate==0.13.0
|
delocate==0.13.0
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
distlib==0.4.0
|
distlib==0.4.0
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
filelock==3.20.2
|
filelock==3.20.3
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
importlib-metadata==8.7.1
|
importlib-metadata==8.7.1
|
||||||
# via build
|
# via build
|
||||||
macholib==1.16.4
|
macholib==1.16.4
|
||||||
# via delocate
|
# via delocate
|
||||||
packaging==25.0
|
packaging==26.0
|
||||||
# via
|
# via
|
||||||
# build
|
# build
|
||||||
# delocate
|
# delocate
|
||||||
@@ -24,13 +24,13 @@ platformdirs==4.5.1
|
|||||||
# via virtualenv
|
# via virtualenv
|
||||||
pyproject-hooks==1.2.0
|
pyproject-hooks==1.2.0
|
||||||
# via build
|
# via build
|
||||||
tomli==2.3.0
|
tomli==2.4.0
|
||||||
# via build
|
# via build
|
||||||
typing-extensions==4.15.0
|
typing-extensions==4.15.0
|
||||||
# via
|
# via
|
||||||
# delocate
|
# delocate
|
||||||
# virtualenv
|
# virtualenv
|
||||||
virtualenv==20.35.4
|
virtualenv==20.36.1
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
zipp==3.23.0
|
zipp==3.23.0
|
||||||
# via importlib-metadata
|
# via importlib-metadata
|
||||||
|
|||||||
@@ -2,17 +2,17 @@
|
|||||||
# nox -s update_constraints
|
# nox -s update_constraints
|
||||||
altgraph==0.17.5
|
altgraph==0.17.5
|
||||||
# via macholib
|
# via macholib
|
||||||
build==1.3.0
|
build==1.4.0
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
delocate==0.13.0
|
delocate==0.13.0
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
distlib==0.4.0
|
distlib==0.4.0
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
filelock==3.20.2
|
filelock==3.20.3
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
macholib==1.16.4
|
macholib==1.16.4
|
||||||
# via delocate
|
# via delocate
|
||||||
packaging==25.0
|
packaging==26.0
|
||||||
# via
|
# via
|
||||||
# build
|
# build
|
||||||
# delocate
|
# delocate
|
||||||
@@ -24,5 +24,5 @@ pyproject-hooks==1.2.0
|
|||||||
# via build
|
# via build
|
||||||
typing-extensions==4.15.0
|
typing-extensions==4.15.0
|
||||||
# via delocate
|
# via delocate
|
||||||
virtualenv==20.35.4
|
virtualenv==20.36.1
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
|
|||||||
@@ -2,17 +2,17 @@
|
|||||||
# nox -s update_constraints
|
# nox -s update_constraints
|
||||||
altgraph==0.17.5
|
altgraph==0.17.5
|
||||||
# via macholib
|
# via macholib
|
||||||
build==1.3.0
|
build==1.4.0
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
delocate==0.13.0
|
delocate==0.13.0
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
distlib==0.4.0
|
distlib==0.4.0
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
filelock==3.20.2
|
filelock==3.20.3
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
macholib==1.16.4
|
macholib==1.16.4
|
||||||
# via delocate
|
# via delocate
|
||||||
packaging==25.0
|
packaging==26.0
|
||||||
# via
|
# via
|
||||||
# build
|
# build
|
||||||
# delocate
|
# delocate
|
||||||
@@ -24,5 +24,5 @@ pyproject-hooks==1.2.0
|
|||||||
# via build
|
# via build
|
||||||
typing-extensions==4.15.0
|
typing-extensions==4.15.0
|
||||||
# via delocate
|
# via delocate
|
||||||
virtualenv==20.35.4
|
virtualenv==20.36.1
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
|
|||||||
@@ -2,17 +2,17 @@
|
|||||||
# nox -s update_constraints
|
# nox -s update_constraints
|
||||||
altgraph==0.17.5
|
altgraph==0.17.5
|
||||||
# via macholib
|
# via macholib
|
||||||
build==1.3.0
|
build==1.4.0
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
delocate==0.13.0
|
delocate==0.13.0
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
distlib==0.4.0
|
distlib==0.4.0
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
filelock==3.20.2
|
filelock==3.20.3
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
macholib==1.16.4
|
macholib==1.16.4
|
||||||
# via delocate
|
# via delocate
|
||||||
packaging==25.0
|
packaging==26.0
|
||||||
# via
|
# via
|
||||||
# build
|
# build
|
||||||
# delocate
|
# delocate
|
||||||
@@ -24,5 +24,5 @@ pyproject-hooks==1.2.0
|
|||||||
# via build
|
# via build
|
||||||
typing-extensions==4.15.0
|
typing-extensions==4.15.0
|
||||||
# via delocate
|
# via delocate
|
||||||
virtualenv==20.35.4
|
virtualenv==20.36.1
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
|
|||||||
@@ -2,17 +2,17 @@
|
|||||||
# nox -s update_constraints
|
# nox -s update_constraints
|
||||||
altgraph==0.17.5
|
altgraph==0.17.5
|
||||||
# via macholib
|
# via macholib
|
||||||
build==1.3.0
|
build==1.4.0
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
delocate==0.13.0
|
delocate==0.13.0
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
distlib==0.4.0
|
distlib==0.4.0
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
filelock==3.20.2
|
filelock==3.20.3
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
macholib==1.16.4
|
macholib==1.16.4
|
||||||
# via delocate
|
# via delocate
|
||||||
packaging==25.0
|
packaging==26.0
|
||||||
# via
|
# via
|
||||||
# build
|
# build
|
||||||
# delocate
|
# delocate
|
||||||
@@ -24,5 +24,5 @@ pyproject-hooks==1.2.0
|
|||||||
# via build
|
# via build
|
||||||
typing-extensions==4.15.0
|
typing-extensions==4.15.0
|
||||||
# via delocate
|
# via delocate
|
||||||
virtualenv==20.35.4
|
virtualenv==20.36.1
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ importlib-metadata==8.5.0
|
|||||||
# via build
|
# via build
|
||||||
macholib==1.16.4
|
macholib==1.16.4
|
||||||
# via delocate
|
# via delocate
|
||||||
packaging==25.0
|
packaging==26.0
|
||||||
# via
|
# via
|
||||||
# build
|
# build
|
||||||
# delocate
|
# delocate
|
||||||
@@ -24,13 +24,13 @@ platformdirs==4.3.6
|
|||||||
# via virtualenv
|
# via virtualenv
|
||||||
pyproject-hooks==1.2.0
|
pyproject-hooks==1.2.0
|
||||||
# via build
|
# via build
|
||||||
tomli==2.3.0
|
tomli==2.4.0
|
||||||
# via build
|
# via build
|
||||||
typing-extensions==4.13.2
|
typing-extensions==4.13.2
|
||||||
# via
|
# via
|
||||||
# delocate
|
# delocate
|
||||||
# virtualenv
|
# virtualenv
|
||||||
virtualenv==20.35.4
|
virtualenv==20.36.1
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
zipp==3.20.2
|
zipp==3.20.2
|
||||||
# via importlib-metadata
|
# via importlib-metadata
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# nox -s update_constraints
|
# nox -s update_constraints
|
||||||
altgraph==0.17.5
|
altgraph==0.17.5
|
||||||
# via macholib
|
# via macholib
|
||||||
build==1.3.0
|
build==1.4.0
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
delocate==0.13.0
|
delocate==0.13.0
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
@@ -14,7 +14,7 @@ importlib-metadata==8.7.1
|
|||||||
# via build
|
# via build
|
||||||
macholib==1.16.4
|
macholib==1.16.4
|
||||||
# via delocate
|
# via delocate
|
||||||
packaging==25.0
|
packaging==26.0
|
||||||
# via
|
# via
|
||||||
# build
|
# build
|
||||||
# delocate
|
# delocate
|
||||||
@@ -24,13 +24,13 @@ platformdirs==4.4.0
|
|||||||
# via virtualenv
|
# via virtualenv
|
||||||
pyproject-hooks==1.2.0
|
pyproject-hooks==1.2.0
|
||||||
# via build
|
# via build
|
||||||
tomli==2.3.0
|
tomli==2.4.0
|
||||||
# via build
|
# via build
|
||||||
typing-extensions==4.15.0
|
typing-extensions==4.15.0
|
||||||
# via
|
# via
|
||||||
# delocate
|
# delocate
|
||||||
# virtualenv
|
# virtualenv
|
||||||
virtualenv==20.35.4
|
virtualenv==20.36.1
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
zipp==3.23.0
|
zipp==3.23.0
|
||||||
# via importlib-metadata
|
# via importlib-metadata
|
||||||
|
|||||||
@@ -2,17 +2,17 @@
|
|||||||
# nox -s update_constraints
|
# nox -s update_constraints
|
||||||
altgraph==0.17.5
|
altgraph==0.17.5
|
||||||
# via macholib
|
# via macholib
|
||||||
build==1.3.0
|
build==1.4.0
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
delocate==0.13.0
|
delocate==0.13.0
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
distlib==0.4.0
|
distlib==0.4.0
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
filelock==3.20.2
|
filelock==3.20.3
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
macholib==1.16.4
|
macholib==1.16.4
|
||||||
# via delocate
|
# via delocate
|
||||||
packaging==25.0
|
packaging==26.0
|
||||||
# via
|
# via
|
||||||
# build
|
# build
|
||||||
# delocate
|
# delocate
|
||||||
@@ -24,5 +24,5 @@ pyproject-hooks==1.2.0
|
|||||||
# via build
|
# via build
|
||||||
typing-extensions==4.15.0
|
typing-extensions==4.15.0
|
||||||
# via delocate
|
# via delocate
|
||||||
virtualenv==20.35.4
|
virtualenv==20.36.1
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ test-skip = ""
|
|||||||
enable = []
|
enable = []
|
||||||
|
|
||||||
archs = ["auto"]
|
archs = ["auto"]
|
||||||
|
audit = ""
|
||||||
build-frontend = "default"
|
build-frontend = "default"
|
||||||
config-settings = {}
|
config-settings = {}
|
||||||
dependency-versions = "pinned"
|
dependency-versions = "pinned"
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ class EnableGroup(StrEnum):
|
|||||||
Groups of build selectors that are not enabled by default.
|
Groups of build selectors that are not enabled by default.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
CPythonExperimentalRiscV64 = "cpython-experimental-riscv64"
|
|
||||||
CPythonFreeThreading = "cpython-freethreading"
|
CPythonFreeThreading = "cpython-freethreading"
|
||||||
CPythonPrerelease = "cpython-prerelease"
|
CPythonPrerelease = "cpython-prerelease"
|
||||||
GraalPy = "graalpy"
|
GraalPy = "graalpy"
|
||||||
@@ -39,7 +38,7 @@ class EnableGroup(StrEnum):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def all_groups(cls) -> frozenset["EnableGroup"]:
|
def all_groups(cls) -> frozenset["EnableGroup"]:
|
||||||
return frozenset(set(cls) - {cls.CPythonExperimentalRiscV64})
|
return frozenset(cls)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def parse_option_value(cls, value: str) -> frozenset["EnableGroup"]:
|
def parse_option_value(cls, value: str) -> frozenset["EnableGroup"]:
|
||||||
|
|||||||
@@ -72,22 +72,6 @@ Commit this file, enable building of your repo on Azure Pipelines, and push.
|
|||||||
|
|
||||||
Wheels will be stored for you and available through the Pipelines interface. For more info on this file, check out the [docs](https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema).
|
Wheels will be stored for you and available through the Pipelines interface. For more info on this file, check out the [docs](https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema).
|
||||||
|
|
||||||
### Travis CI [linux/windows] {: #travis-ci}
|
|
||||||
|
|
||||||
To build Linux and Windows wheels on Travis CI, create a `.travis.yml` file in your repo.
|
|
||||||
|
|
||||||
> .travis.yml
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
{% include "../examples/travis-ci-minimal.yml" %}
|
|
||||||
```
|
|
||||||
|
|
||||||
Commit this file, enable building of your repo on Travis CI, and push.
|
|
||||||
|
|
||||||
Then setup a deployment method by following the [Travis CI deployment docs](https://docs.travis-ci.com/user/deployment/), or see [Delivering to PyPI](deliver-to-pypi.md). For more info on `.travis.yml`, check out the [docs](https://docs.travis-ci.com/).
|
|
||||||
|
|
||||||
[`examples/travis-ci-deploy.yml`](https://github.com/pypa/cibuildwheel/blob/main/examples/travis-ci-deploy.yml) extends this minimal example with a demonstration of how to automatically upload the built wheels to PyPI.
|
|
||||||
|
|
||||||
### CircleCI [linux/mac] {: #circleci}
|
### CircleCI [linux/mac] {: #circleci}
|
||||||
|
|
||||||
To build Linux and Mac wheels on CircleCI, create a `.circleci/config.yml` file in your repo,
|
To build Linux and Mac wheels on CircleCI, create a `.circleci/config.yml` file in your repo,
|
||||||
|
|||||||
@@ -30,17 +30,6 @@ cibuildwheel to run tests, add the following YAML to your CI config file:
|
|||||||
CIBW_TEST_COMMAND: "pytest {project}/tests"
|
CIBW_TEST_COMMAND: "pytest {project}/tests"
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! tab "Travis CI"
|
|
||||||
|
|
||||||
> .travis.yml ([docs](https://docs.travis-ci.com/user/environment-variables/))
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- CIBW_TEST_REQUIRES=pytest
|
|
||||||
- CIBW_TEST_COMMAND="pytest {project}/tests"
|
|
||||||
```
|
|
||||||
|
|
||||||
!!! tab "CircleCI"
|
!!! tab "CircleCI"
|
||||||
|
|
||||||
> .circleci/config.yml ([docs](https://circleci.com/docs/2.0/configuration-reference/#environment))
|
> .circleci/config.yml ([docs](https://circleci.com/docs/2.0/configuration-reference/#environment))
|
||||||
|
|||||||
@@ -71,12 +71,6 @@ for an example configuration that automatically uploads wheels to PyPI. Also see
|
|||||||
[scikit-hep.org/developer/gha_wheels](https://scikit-hep.org/developer/gha_wheels)
|
[scikit-hep.org/developer/gha_wheels](https://scikit-hep.org/developer/gha_wheels)
|
||||||
for a complete guide.
|
for a complete guide.
|
||||||
|
|
||||||
### TravisCI
|
|
||||||
|
|
||||||
See
|
|
||||||
[`examples/travis-ci-deploy.yml`](https://github.com/pypa/cibuildwheel/blob/main/examples/travis-ci-deploy.yml)
|
|
||||||
for an example configuration.
|
|
||||||
|
|
||||||
## Manual method
|
## Manual method
|
||||||
|
|
||||||
On your development machine, install [pipx](https://pipx.pypa.io/) and do the following:
|
On your development machine, install [pipx](https://pipx.pypa.io/) and do the following:
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ import rich.text
|
|||||||
def define_env(env: Any) -> None:
|
def define_env(env: Any) -> None:
|
||||||
"Hook function for mkdocs-macros"
|
"Hook function for mkdocs-macros"
|
||||||
|
|
||||||
@env.macro # type: ignore[misc]
|
@env.macro # type: ignore[untyped-decorator]
|
||||||
def subprocess_run(*args: str) -> str:
|
def subprocess_run(*args: str) -> str:
|
||||||
"Run a subprocess and return the stdout"
|
"Run a subprocess and return the stdout"
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
|
|||||||
+1
-2
@@ -477,8 +477,7 @@ Make sure you have an external uv on Windows and macOS, either by
|
|||||||
pre-installing it, or installing cibuildwheel with the `uv` extra, which is
|
pre-installing it, or installing cibuildwheel with the `uv` extra, which is
|
||||||
possible by manually passing `cibuildwheel[uv]` to installers or by using the
|
possible by manually passing `cibuildwheel[uv]` to installers or by using the
|
||||||
`extras` option in the [cibuildwheel action](ci-services.md#github-actions).
|
`extras` option in the [cibuildwheel action](ci-services.md#github-actions).
|
||||||
uv currently does not support iOS or musllinux on s390x. Legacy dependencies
|
uv currently does not support iOS or musllinux on s390x, ppc64le and riscv64.
|
||||||
like setuptools on Python < 3.12 and pip are not installed if using uv.
|
|
||||||
|
|
||||||
On Android and Pyodide, the "pip" frontend is not supported.
|
On Android and Pyodide, the "pip" frontend is not supported.
|
||||||
|
|
||||||
|
|||||||
+24
-24
@@ -12,8 +12,8 @@ title: Working examples
|
|||||||
| [duckdb][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | DuckDB is an analytical in-process SQL database management system |
|
| [duckdb][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | DuckDB is an analytical in-process SQL database management system |
|
||||||
| [pytorch-fairseq][] | ![github icon][] | ![apple icon][] ![linux icon][] | Facebook AI Research Sequence-to-Sequence Toolkit written in Python. |
|
| [pytorch-fairseq][] | ![github icon][] | ![apple icon][] ![linux icon][] | Facebook AI Research Sequence-to-Sequence Toolkit written in Python. |
|
||||||
| [NumPy][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The fundamental package for scientific computing with Python. |
|
| [NumPy][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The fundamental package for scientific computing with Python. |
|
||||||
| [Tornado][] | ![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. |
|
|
||||||
| [NCNN][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | ncnn is a high-performance neural network inference framework optimized for the mobile platform |
|
| [NCNN][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | ncnn is a high-performance neural network inference framework optimized for the mobile platform |
|
||||||
|
| [Tornado][] | ![github icon][] | ![linux icon][] ![apple icon][] ![windows icon][] | Tornado is a Python web framework and asynchronous networking library. Uses stable ABI for a small C extension. |
|
||||||
| [Matplotlib][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The venerable Matplotlib, a Python library with C++ portions |
|
| [Matplotlib][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The venerable Matplotlib, a Python library with C++ portions |
|
||||||
| [MyPy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | The compiled version of MyPy using MyPyC. |
|
| [MyPy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | The compiled version of MyPy using MyPyC. |
|
||||||
| [Prophet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth. |
|
| [Prophet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth. |
|
||||||
@@ -24,8 +24,8 @@ title: Working examples
|
|||||||
| [psutil][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Cross-platform lib for process and system monitoring in Python |
|
| [psutil][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Cross-platform lib for process and system monitoring in Python |
|
||||||
| [Google Benchmark][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A microbenchmark support library |
|
| [Google Benchmark][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A microbenchmark support library |
|
||||||
| [falcon][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Falcon is a no-magic ASGI/WSGI API and microservices framework; it uses cibuildwheel for (optional) Cython extensions. |
|
| [falcon][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Falcon is a no-magic ASGI/WSGI API and microservices framework; it uses cibuildwheel for (optional) Cython extensions. |
|
||||||
| [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 🚀 |
|
|
||||||
| [PyGame][] | ![github icon][] | ![apple icon][] ![linux icon][] | 🐍🎮 pygame (the library) is a Free and Open Source python programming language library for making multimedia applications like games built on top of the excellent SDL library. C, Python, Native, OpenGL. |
|
| [PyGame][] | ![github icon][] | ![apple icon][] ![linux icon][] | 🐍🎮 pygame (the library) is a Free and Open Source python programming language library for making multimedia applications like games built on top of the excellent SDL library. C, Python, Native, OpenGL. |
|
||||||
|
| [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 🚀 |
|
||||||
| [Apache Beam][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Apache Beam is a unified programming model for Batch and Streaming data processing. |
|
| [Apache Beam][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Apache Beam is a unified programming model for Batch and Streaming data processing. |
|
||||||
| [asyncpg][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A fast PostgreSQL Database Client Library for Python/asyncio. |
|
| [asyncpg][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A fast PostgreSQL Database Client Library for Python/asyncio. |
|
||||||
| [cmake][] | ![github icon][] ![travisci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Multitagged binary builds for all supported platforms, using cibw 2 config configuration. |
|
| [cmake][] | ![github icon][] ![travisci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Multitagged binary builds for all supported platforms, using cibw 2 config configuration. |
|
||||||
@@ -54,8 +54,8 @@ title: Working examples
|
|||||||
| [pikepdf][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python library for reading and writing PDF, powered by QPDF |
|
| [pikepdf][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python library for reading and writing PDF, powered by QPDF |
|
||||||
| [numexpr][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Fast numerical array expression evaluator for Python, NumPy, Pandas, PyTables and more |
|
| [numexpr][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Fast numerical array expression evaluator for Python, NumPy, Pandas, PyTables and more |
|
||||||
| [Wrapt][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python module for decorators, wrappers and monkey patching. |
|
| [Wrapt][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python module for decorators, wrappers and monkey patching. |
|
||||||
| [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. |
|
|
||||||
| [Psycopg 3][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A modern implementation of a PostgreSQL adapter for Python |
|
| [Psycopg 3][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A modern implementation of a PostgreSQL adapter for Python |
|
||||||
|
| [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. |
|
||||||
| [envd][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A machine learning development environment build tool |
|
| [envd][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A machine learning development environment build tool |
|
||||||
| [OpenColorIO][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A color management framework for visual effects and animation. |
|
| [OpenColorIO][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A color management framework for visual effects and animation. |
|
||||||
| [ruptures][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Extensive Cython + NumPy [pyproject.toml](https://github.com/deepcharles/ruptures/blob/master/pyproject.toml) example. |
|
| [ruptures][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Extensive Cython + NumPy [pyproject.toml](https://github.com/deepcharles/ruptures/blob/master/pyproject.toml) example. |
|
||||||
@@ -66,26 +66,26 @@ title: Working examples
|
|||||||
| [google neuroglancer][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | WebGL-based viewer for volumetric data |
|
| [google neuroglancer][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | WebGL-based viewer for volumetric data |
|
||||||
| [Parselmouth][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python interface to the Praat software package, using pybind11, C++17 and CMake, with the core Praat static library built only once and shared between wheels. |
|
| [Parselmouth][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python interface to the Praat software package, using pybind11, C++17 and CMake, with the core Praat static library built only once and shared between wheels. |
|
||||||
| [AutoPy][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes a Windows Travis build. |
|
| [AutoPy][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes a Windows Travis build. |
|
||||||
| [DeepForest][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | An Efficient, Scalable and Optimized Python Framework for Deep Forest (2021.2.1) |
|
|
||||||
| [H3-py][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Python bindings for H3, a hierarchical hexagonal geospatial indexing system |
|
| [H3-py][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Python bindings for H3, a hierarchical hexagonal geospatial indexing system |
|
||||||
|
| [DeepForest][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | An Efficient, Scalable and Optimized Python Framework for Deep Forest (2021.2.1) |
|
||||||
| [time-machine][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Time mocking library using only the CPython C API. |
|
| [time-machine][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Time mocking library using only the CPython C API. |
|
||||||
| [mosec][] | ![github icon][] | ![linux icon][] ![apple icon][] | A machine learning model serving framework powered by Rust |
|
| [mosec][] | ![github icon][] | ![linux icon][] ![apple icon][] | A machine learning model serving framework powered by Rust |
|
||||||
| [Picologging][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A high-performance logging library for Python. |
|
| [Picologging][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A high-performance logging library for Python. |
|
||||||
| [pybind11 cmake_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Example pybind11 module built with a CMake-based build system |
|
|
||||||
| [markupsafe][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Safely add untrusted strings to HTML/XML markup. |
|
| [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 |
|
||||||
| [Rtree][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Rtree: spatial index for Python GIS |
|
| [Rtree][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Rtree: spatial index for Python GIS |
|
||||||
| [KDEpy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Kernel Density Estimation in Python |
|
| [KDEpy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Kernel Density Estimation in Python |
|
||||||
| [dd-trace-py][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Uses custom alternate arch emulation on GitHub |
|
| [dd-trace-py][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Uses custom alternate arch emulation on GitHub |
|
||||||
| [tgcalls][] | ![github icon][] | ![apple icon][] ![windows icon][] | Python `pybind11` binding to Telegram's WebRTC library with third party dependencies like `OpenSSL`, `MozJPEG`, `FFmpeg`, etc. |
|
| [tgcalls][] | ![github icon][] | ![apple icon][] ![windows icon][] | Python `pybind11` binding to Telegram's WebRTC library with third party dependencies like `OpenSSL`, `MozJPEG`, `FFmpeg`, etc. |
|
||||||
| [sourmash][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Quickly search, compare, and analyze genomic and metagenomic data sets. |
|
| [sourmash][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Quickly search, compare, and analyze genomic and metagenomic data sets. |
|
||||||
| [pybind11 python_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Example pybind11 module built with a Python-based build system |
|
|
||||||
| [python-rapidjson][] | ![travisci icon][] ![gitlab icon][] | ![windows icon][] ![linux icon][] | Python wrapper around rapidjson |
|
| [python-rapidjson][] | ![travisci icon][] ![gitlab icon][] | ![windows icon][] ![linux icon][] | Python wrapper around rapidjson |
|
||||||
|
| [pybind11 python_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Example pybind11 module built with a Python-based build system |
|
||||||
| [abess][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A fast best-subset selection library. It uses cibuildwheel to build a large project with C++ extensions. |
|
| [abess][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A fast best-subset selection library. It uses cibuildwheel to build a large project with C++ extensions. |
|
||||||
| [python-snappy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Python bindings for the snappy google library |
|
| [python-snappy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Python bindings for the snappy google library |
|
||||||
| [jq.py][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | Python bindings for jq |
|
| [jq.py][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | Python bindings for jq |
|
||||||
| [cyvcf2][] | ![github icon][] | ![apple icon][] ![linux icon][] | cython + htslib == fast VCF and BCF processing |
|
| [cyvcf2][] | ![github icon][] | ![apple icon][] ![linux icon][] | cython + htslib == fast VCF and BCF processing |
|
||||||
| [matrixprofile][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python 3 library making time series data mining tasks, utilizing matrix profile algorithms, accessible to everyone. |
|
|
||||||
| [Confluent client for Kafka][] | ![travisci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | setup in `tools/wheels/build-wheels.bat` |
|
| [Confluent client for Kafka][] | ![travisci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | setup in `tools/wheels/build-wheels.bat` |
|
||||||
|
| [matrixprofile][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python 3 library making time series data mining tasks, utilizing matrix profile algorithms, accessible to everyone. |
|
||||||
| [Tokenizer][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Fast and customizable text tokenization library with BPE and SentencePiece support |
|
| [Tokenizer][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Fast and customizable text tokenization library with BPE and SentencePiece support |
|
||||||
| [iminuit][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Jupyter-friendly Python interface for C++ MINUIT2 |
|
| [iminuit][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Jupyter-friendly Python interface for C++ MINUIT2 |
|
||||||
| [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. |
|
| [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. |
|
||||||
@@ -96,8 +96,8 @@ title: Working examples
|
|||||||
| [power-grid-model][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Python/C++ library for distribution power system analysis |
|
| [power-grid-model][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Python/C++ library for distribution power system analysis |
|
||||||
| [streaming-form-data][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Streaming parser for multipart/form-data written in Cython |
|
| [streaming-form-data][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Streaming parser for multipart/form-data written in Cython |
|
||||||
| [pybase64][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Fast Base64 encoding/decoding in Python |
|
| [pybase64][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Fast Base64 encoding/decoding in Python |
|
||||||
| [bx-python][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | A library that includes Cython extensions. |
|
|
||||||
| [Imagecodecs (fork)][] | ![azurepipelines icon][] | ![apple icon][] ![linux icon][] | Over 20 external dependencies in compiled libraries, custom docker image, `libomp`, `openblas` and `install_name_tool` for macOS. |
|
| [Imagecodecs (fork)][] | ![azurepipelines icon][] | ![apple icon][] ![linux icon][] | Over 20 external dependencies in compiled libraries, custom docker image, `libomp`, `openblas` and `install_name_tool` for macOS. |
|
||||||
|
| [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. |
|
| [boost-histogram][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Supports full range of wheels, including PyPy and alternate archs. |
|
||||||
| [Python-WebRTC][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | a Python extension that provides bindings to WebRTC M92 |
|
| [Python-WebRTC][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | a Python extension that provides bindings to WebRTC M92 |
|
||||||
| [pybind11 scikit_build_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | An example combining scikit-build and pybind11 |
|
| [pybind11 scikit_build_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | An example combining scikit-build and pybind11 |
|
||||||
@@ -109,13 +109,13 @@ title: Working examples
|
|||||||
| [etebase-py][] | ![travisci icon][] | ![linux icon][] | Python bindings to a Rust library using `setuptools-rust`, and `sccache` for improved speed. |
|
| [etebase-py][] | ![travisci icon][] | ![linux icon][] | Python bindings to a Rust library using `setuptools-rust`, and `sccache` for improved speed. |
|
||||||
| [cf-units][] | ![github icon][] | ![apple icon][] ![linux icon][] | Units of measure as required by the Climate and Forecast (CF) Metadata Conventions |
|
| [cf-units][] | ![github icon][] | ![apple icon][] ![linux icon][] | Units of measure as required by the Climate and Forecast (CF) Metadata Conventions |
|
||||||
| [numpythia][] | ![github icon][] | ![apple icon][] ![linux icon][] | The interface between PYTHIA and NumPy |
|
| [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 |
|
|
||||||
| [SiPM][] | ![github icon][] | ![apple icon][] ![linux icon][] | High performance library for SiPM detectors simulation using C++17, OpenMP and AVX2 intrinsics. |
|
|
||||||
| [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. |
|
|
||||||
| [aalink][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Async Python interface for Ableton Link. |
|
| [aalink][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Async Python interface for Ableton Link. |
|
||||||
|
| [SiPM][] | ![github icon][] | ![apple icon][] ![linux icon][] | High performance library for SiPM detectors simulation using C++17, OpenMP and AVX2 intrinsics. |
|
||||||
|
| [pyjet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The interface between FastJet and NumPy |
|
||||||
|
| [ril][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A python binding to Rust Imaging library using maturin and Pyo3, utilizes Github Action cache to improve speed. Builds abi3 wheels. |
|
||||||
| [GSD][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Cython and NumPy project with 64-bit wheels. |
|
| [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. |
|
|
||||||
| [werpy][] | ![github icon][] | ![windows icon][] ![linux icon][] ![apple icon][] | An ultra-fast python package using optimized dynamic programming to compute the Word Error Rate (WER). |
|
| [werpy][] | ![github icon][] | ![windows icon][] ![linux icon][] ![apple icon][] | An ultra-fast python package using optimized dynamic programming to compute the Word Error Rate (WER). |
|
||||||
|
| [CorrectionLib][] | ![github icon][] | ![apple icon][] ![linux icon][] | Structured JSON powered correction library for HEP, designed for the CMS experiment at CERN. |
|
||||||
| [xmlstarlet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Python 3.6+ CFFI bindings with true MSVC build. |
|
| [xmlstarlet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Python 3.6+ CFFI bindings with true MSVC build. |
|
||||||
| [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 |
|
| [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 |
|
||||||
|
|
||||||
@@ -123,8 +123,8 @@ title: Working examples
|
|||||||
[duckdb]: https://github.com/duckdb/duckdb
|
[duckdb]: https://github.com/duckdb/duckdb
|
||||||
[pytorch-fairseq]: https://github.com/facebookresearch/fairseq
|
[pytorch-fairseq]: https://github.com/facebookresearch/fairseq
|
||||||
[NumPy]: https://github.com/numpy/numpy
|
[NumPy]: https://github.com/numpy/numpy
|
||||||
[Tornado]: https://github.com/tornadoweb/tornado
|
|
||||||
[NCNN]: https://github.com/Tencent/ncnn
|
[NCNN]: https://github.com/Tencent/ncnn
|
||||||
|
[Tornado]: https://github.com/tornadoweb/tornado
|
||||||
[Matplotlib]: https://github.com/matplotlib/matplotlib
|
[Matplotlib]: https://github.com/matplotlib/matplotlib
|
||||||
[MyPy]: https://github.com/mypyc/mypy_mypyc-wheels
|
[MyPy]: https://github.com/mypyc/mypy_mypyc-wheels
|
||||||
[Prophet]: https://github.com/facebook/prophet
|
[Prophet]: https://github.com/facebook/prophet
|
||||||
@@ -135,8 +135,8 @@ title: Working examples
|
|||||||
[psutil]: https://github.com/giampaolo/psutil
|
[psutil]: https://github.com/giampaolo/psutil
|
||||||
[Google Benchmark]: https://github.com/google/benchmark
|
[Google Benchmark]: https://github.com/google/benchmark
|
||||||
[falcon]: https://github.com/falconry/falcon
|
[falcon]: https://github.com/falconry/falcon
|
||||||
[vaex]: https://github.com/vaexio/vaex
|
|
||||||
[PyGame]: https://github.com/pygame/pygame
|
[PyGame]: https://github.com/pygame/pygame
|
||||||
|
[vaex]: https://github.com/vaexio/vaex
|
||||||
[Apache Beam]: https://github.com/apache/beam
|
[Apache Beam]: https://github.com/apache/beam
|
||||||
[asyncpg]: https://github.com/MagicStack/asyncpg
|
[asyncpg]: https://github.com/MagicStack/asyncpg
|
||||||
[cmake]: https://github.com/scikit-build/cmake-python-distributions
|
[cmake]: https://github.com/scikit-build/cmake-python-distributions
|
||||||
@@ -165,8 +165,8 @@ title: Working examples
|
|||||||
[pikepdf]: https://github.com/pikepdf/pikepdf
|
[pikepdf]: https://github.com/pikepdf/pikepdf
|
||||||
[numexpr]: https://github.com/pydata/numexpr
|
[numexpr]: https://github.com/pydata/numexpr
|
||||||
[Wrapt]: https://github.com/GrahamDumpleton/wrapt
|
[Wrapt]: https://github.com/GrahamDumpleton/wrapt
|
||||||
[h5py]: https://github.com/h5py/h5py
|
|
||||||
[Psycopg 3]: https://github.com/psycopg/psycopg
|
[Psycopg 3]: https://github.com/psycopg/psycopg
|
||||||
|
[h5py]: https://github.com/h5py/h5py
|
||||||
[envd]: https://github.com/tensorchord/envd
|
[envd]: https://github.com/tensorchord/envd
|
||||||
[OpenColorIO]: https://github.com/AcademySoftwareFoundation/OpenColorIO
|
[OpenColorIO]: https://github.com/AcademySoftwareFoundation/OpenColorIO
|
||||||
[ruptures]: https://github.com/deepcharles/ruptures
|
[ruptures]: https://github.com/deepcharles/ruptures
|
||||||
@@ -177,26 +177,26 @@ title: Working examples
|
|||||||
[google neuroglancer]: https://github.com/google/neuroglancer
|
[google neuroglancer]: https://github.com/google/neuroglancer
|
||||||
[Parselmouth]: https://github.com/YannickJadoul/Parselmouth
|
[Parselmouth]: https://github.com/YannickJadoul/Parselmouth
|
||||||
[AutoPy]: https://github.com/autopilot-rs/autopy
|
[AutoPy]: https://github.com/autopilot-rs/autopy
|
||||||
[DeepForest]: https://github.com/LAMDA-NJU/Deep-Forest
|
|
||||||
[H3-py]: https://github.com/uber/h3-py
|
[H3-py]: https://github.com/uber/h3-py
|
||||||
|
[DeepForest]: https://github.com/LAMDA-NJU/Deep-Forest
|
||||||
[time-machine]: https://github.com/adamchainz/time-machine
|
[time-machine]: https://github.com/adamchainz/time-machine
|
||||||
[mosec]: https://github.com/mosecorg/mosec
|
[mosec]: https://github.com/mosecorg/mosec
|
||||||
[Picologging]: https://github.com/microsoft/picologging
|
[Picologging]: https://github.com/microsoft/picologging
|
||||||
[pybind11 cmake_example]: https://github.com/pybind/cmake_example
|
|
||||||
[markupsafe]: https://github.com/pallets/markupsafe
|
[markupsafe]: https://github.com/pallets/markupsafe
|
||||||
|
[pybind11 cmake_example]: https://github.com/pybind/cmake_example
|
||||||
[Rtree]: https://github.com/Toblerity/rtree
|
[Rtree]: https://github.com/Toblerity/rtree
|
||||||
[KDEpy]: https://github.com/tommyod/KDEpy
|
[KDEpy]: https://github.com/tommyod/KDEpy
|
||||||
[dd-trace-py]: https://github.com/DataDog/dd-trace-py
|
[dd-trace-py]: https://github.com/DataDog/dd-trace-py
|
||||||
[tgcalls]: https://github.com/MarshalX/tgcalls
|
[tgcalls]: https://github.com/MarshalX/tgcalls
|
||||||
[sourmash]: https://github.com/sourmash-bio/sourmash
|
[sourmash]: https://github.com/sourmash-bio/sourmash
|
||||||
[pybind11 python_example]: https://github.com/pybind/python_example
|
|
||||||
[python-rapidjson]: https://github.com/python-rapidjson/python-rapidjson
|
[python-rapidjson]: https://github.com/python-rapidjson/python-rapidjson
|
||||||
|
[pybind11 python_example]: https://github.com/pybind/python_example
|
||||||
[abess]: https://github.com/abess-team/abess
|
[abess]: https://github.com/abess-team/abess
|
||||||
[python-snappy]: https://github.com/intake/python-snappy
|
[python-snappy]: https://github.com/intake/python-snappy
|
||||||
[jq.py]: https://github.com/mwilliamson/jq.py
|
[jq.py]: https://github.com/mwilliamson/jq.py
|
||||||
[cyvcf2]: https://github.com/brentp/cyvcf2
|
[cyvcf2]: https://github.com/brentp/cyvcf2
|
||||||
[matrixprofile]: https://github.com/matrix-profile-foundation/matrixprofile
|
|
||||||
[Confluent client for Kafka]: https://github.com/confluentinc/confluent-kafka-python
|
[Confluent client for Kafka]: https://github.com/confluentinc/confluent-kafka-python
|
||||||
|
[matrixprofile]: https://github.com/matrix-profile-foundation/matrixprofile
|
||||||
[Tokenizer]: https://github.com/OpenNMT/Tokenizer
|
[Tokenizer]: https://github.com/OpenNMT/Tokenizer
|
||||||
[iminuit]: https://github.com/scikit-hep/iminuit
|
[iminuit]: https://github.com/scikit-hep/iminuit
|
||||||
[pillow-heif]: https://github.com/bigcat88/pillow_heif
|
[pillow-heif]: https://github.com/bigcat88/pillow_heif
|
||||||
@@ -207,8 +207,8 @@ title: Working examples
|
|||||||
[power-grid-model]: https://github.com/PowerGridModel/power-grid-model
|
[power-grid-model]: https://github.com/PowerGridModel/power-grid-model
|
||||||
[streaming-form-data]: https://github.com/siddhantgoel/streaming-form-data
|
[streaming-form-data]: https://github.com/siddhantgoel/streaming-form-data
|
||||||
[pybase64]: https://github.com/mayeut/pybase64
|
[pybase64]: https://github.com/mayeut/pybase64
|
||||||
[bx-python]: https://github.com/bxlab/bx-python
|
|
||||||
[Imagecodecs (fork)]: https://github.com/czaki/imagecodecs_build
|
[Imagecodecs (fork)]: https://github.com/czaki/imagecodecs_build
|
||||||
|
[bx-python]: https://github.com/bxlab/bx-python
|
||||||
[boost-histogram]: https://github.com/scikit-hep/boost-histogram
|
[boost-histogram]: https://github.com/scikit-hep/boost-histogram
|
||||||
[Python-WebRTC]: https://github.com/MarshalX/python-webrtc
|
[Python-WebRTC]: https://github.com/MarshalX/python-webrtc
|
||||||
[pybind11 scikit_build_example]: https://github.com/pybind/scikit_build_example
|
[pybind11 scikit_build_example]: https://github.com/pybind/scikit_build_example
|
||||||
@@ -220,13 +220,13 @@ title: Working examples
|
|||||||
[etebase-py]: https://github.com/etesync/etebase-py
|
[etebase-py]: https://github.com/etesync/etebase-py
|
||||||
[cf-units]: https://github.com/SciTools/cf-units
|
[cf-units]: https://github.com/SciTools/cf-units
|
||||||
[numpythia]: https://github.com/scikit-hep/numpythia
|
[numpythia]: https://github.com/scikit-hep/numpythia
|
||||||
[pyjet]: https://github.com/scikit-hep/pyjet
|
|
||||||
[SiPM]: https://github.com/EdoPro98/SimSiPM
|
|
||||||
[ril]: https://github.com/Cryptex-github/ril-py
|
|
||||||
[aalink]: https://github.com/artfwo/aalink
|
[aalink]: https://github.com/artfwo/aalink
|
||||||
|
[SiPM]: https://github.com/EdoPro98/SimSiPM
|
||||||
|
[pyjet]: https://github.com/scikit-hep/pyjet
|
||||||
|
[ril]: https://github.com/Cryptex-github/ril-py
|
||||||
[GSD]: https://github.com/glotzerlab/gsd
|
[GSD]: https://github.com/glotzerlab/gsd
|
||||||
[CorrectionLib]: https://github.com/cms-nanoAOD/correctionlib
|
|
||||||
[werpy]: https://github.com/analyticsinmotion/werpy
|
[werpy]: https://github.com/analyticsinmotion/werpy
|
||||||
|
[CorrectionLib]: https://github.com/cms-nanoAOD/correctionlib
|
||||||
[xmlstarlet]: https://github.com/dimitern/xmlstarlet
|
[xmlstarlet]: https://github.com/dimitern/xmlstarlet
|
||||||
[pybind11 cross build example]: https://github.com/wbarnha/pybind_cmake_example_crossbuild
|
[pybind11 cross build example]: https://github.com/wbarnha/pybind_cmake_example_crossbuild
|
||||||
|
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
# As written, this configuration will build your wheels on every
|
|
||||||
# commit, but will only push to PyPI on tagged commits.
|
|
||||||
|
|
||||||
os: linux
|
|
||||||
dist: jammy
|
|
||||||
language: python
|
|
||||||
python: "3.12"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
include:
|
|
||||||
# perform a linux build
|
|
||||||
- services: docker
|
|
||||||
# and a windows build
|
|
||||||
- os: windows
|
|
||||||
language: shell
|
|
||||||
before_install:
|
|
||||||
- choco upgrade python -y --version 3.12.4
|
|
||||||
- export PATH="/c/Python312:/c/Python312/Scripts:$PATH"
|
|
||||||
# make sure it's on PATH as 'python3'
|
|
||||||
- ln -s /c/Python312/python.exe /c/Python312/python3.exe
|
|
||||||
|
|
||||||
install:
|
|
||||||
- python3 -m pip install cibuildwheel==3.3.1
|
|
||||||
|
|
||||||
script:
|
|
||||||
# build the wheels, put them into './dist'
|
|
||||||
- python3 -m cibuildwheel --output-dir dist
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
provider: pypi
|
|
||||||
username: "__token__"
|
|
||||||
skip_cleanup: true
|
|
||||||
on:
|
|
||||||
tags: true
|
|
||||||
password:
|
|
||||||
secure: "" # Set to an encrypted API token. See https://docs.travis-ci.com/user/deployment/pypi/
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
os: linux
|
|
||||||
dist: jammy
|
|
||||||
language: python
|
|
||||||
python: "3.12"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
include:
|
|
||||||
# perform a linux build
|
|
||||||
- services: docker
|
|
||||||
# perform a linux ARMv8 build
|
|
||||||
- services: docker
|
|
||||||
arch: arm64
|
|
||||||
# perform a linux PPC64LE build
|
|
||||||
- services: docker
|
|
||||||
arch: ppc64le
|
|
||||||
# perform a linux S390X build
|
|
||||||
- services: docker
|
|
||||||
arch: s390x
|
|
||||||
# and a windows build
|
|
||||||
- os: windows
|
|
||||||
language: shell
|
|
||||||
before_install:
|
|
||||||
- choco upgrade python -y --version 3.12.4
|
|
||||||
- export PATH="/c/Python312:/c/Python312/Scripts:$PATH"
|
|
||||||
# make sure it's on PATH as 'python3'
|
|
||||||
- ln -s /c/Python312/python.exe /c/Python312/python3.exe
|
|
||||||
|
|
||||||
install:
|
|
||||||
- python3 -m pip install cibuildwheel==3.3.1
|
|
||||||
|
|
||||||
script:
|
|
||||||
# build the wheels, put them into './wheelhouse'
|
|
||||||
- python3 -m cibuildwheel --output-dir wheelhouse
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
# In this configuration, the package is tested against multiple versions of python
|
|
||||||
# on Linux and on one version of Python on Windows. If and only if all tests pass
|
|
||||||
# will the wheels be built and deployed. Further, deployment is only initiated if
|
|
||||||
# the current branch is "main", the current commit is tagged, and the current
|
|
||||||
# repo is yours (e.g. it won't run on a Pull Request). For convenience, a source
|
|
||||||
# distribution is also created.
|
|
||||||
|
|
||||||
os: linux
|
|
||||||
dist: jammy
|
|
||||||
language: python
|
|
||||||
python: "3.12"
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- |
|
|
||||||
if [[ "$TRAVIS_OS_NAME" = windows ]]; then
|
|
||||||
choco upgrade python -y --version 3.12.4
|
|
||||||
export PATH="/c/Python312:/c/Python312/Scripts:$PATH"
|
|
||||||
# make sure it's on PATH as 'python3'
|
|
||||||
ln -s /c/Python312/python.exe /c/Python312/python3.exe
|
|
||||||
fi
|
|
||||||
|
|
||||||
install:
|
|
||||||
- python3 -m pip install pytest
|
|
||||||
|
|
||||||
script:
|
|
||||||
- python3 -m pip install .
|
|
||||||
- pytest
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- test
|
|
||||||
# Only execute deployment stage on tagged commits, and from your repository
|
|
||||||
# (e.g. not PRs). Replace with your repo name.
|
|
||||||
- name: deploy
|
|
||||||
if: tag IS PRESENT AND repo = pypa/cibuildwheel
|
|
||||||
# To only build tags that look like vX.Y.Z:
|
|
||||||
# if: tag =~ ^v\d+\.\d+\.\d+$ AND repo = pypa/cibuildwheel
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
include:
|
|
||||||
# Optional: run a test on Windows
|
|
||||||
- os: windows
|
|
||||||
language: shell
|
|
||||||
name: Test on Windows
|
|
||||||
|
|
||||||
# Deploy source distribution
|
|
||||||
- stage: deploy
|
|
||||||
name: Deploy source distribution
|
|
||||||
install: python3 -m pip install build twine
|
|
||||||
script: python3 -m build --sdist --formats=gztar
|
|
||||||
after_success: python3 -m twine upload --skip-existing dist/*.tar.gz
|
|
||||||
# Deploy on linux
|
|
||||||
- stage: deploy
|
|
||||||
name: Build and deploy Linux wheels
|
|
||||||
services: docker
|
|
||||||
install: python3 -m pip install cibuildwheel==3.3.1 twine
|
|
||||||
script: python3 -m cibuildwheel --output-dir wheelhouse
|
|
||||||
after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl
|
|
||||||
# Deploy on windows
|
|
||||||
- stage: deploy
|
|
||||||
name: Build and deploy Windows wheels
|
|
||||||
os: windows
|
|
||||||
language: shell
|
|
||||||
install: python3 -m pip install cibuildwheel==3.3.1 twine
|
|
||||||
script: python3 -m cibuildwheel --output-dir wheelhouse
|
|
||||||
after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl
|
|
||||||
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- TWINE_USERNAME=__token__
|
|
||||||
# Note: TWINE_PASSWORD is set to a PyPI API token in Travis settings
|
|
||||||
+2
-2
@@ -33,8 +33,8 @@ def lint(session: nox.Session) -> None:
|
|||||||
"""
|
"""
|
||||||
Run the linter.
|
Run the linter.
|
||||||
"""
|
"""
|
||||||
session.install("pre-commit")
|
session.install("prek")
|
||||||
session.run("pre-commit", "run", "--all-files", *session.posargs)
|
session.run("prek", "run", "--all-files", *session.posargs)
|
||||||
|
|
||||||
|
|
||||||
@nox.session(tags=["lint"])
|
@nox.session(tags=["lint"])
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ keywords = [
|
|||||||
"macos",
|
"macos",
|
||||||
"packaging",
|
"packaging",
|
||||||
"pypi",
|
"pypi",
|
||||||
"travis",
|
|
||||||
"wheel",
|
"wheel",
|
||||||
"windows",
|
"windows",
|
||||||
]
|
]
|
||||||
|
|||||||
+160
-1
@@ -4,7 +4,7 @@ import re
|
|||||||
import sys
|
import sys
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from shutil import rmtree
|
from shutil import rmtree, which
|
||||||
from subprocess import CalledProcessError
|
from subprocess import CalledProcessError
|
||||||
from textwrap import dedent
|
from textwrap import dedent
|
||||||
from zipfile import ZipFile
|
from zipfile import ZipFile
|
||||||
@@ -496,3 +496,162 @@ def test_libcxx(tmp_path, capfd):
|
|||||||
assert len(wheels) == 1
|
assert len(wheels) == 1
|
||||||
for name in ZipFile(output_dir / wheels[0]).namelist():
|
for name in ZipFile(output_dir / wheels[0]).namelist():
|
||||||
assert ".libs" not in name
|
assert ".libs" not in name
|
||||||
|
|
||||||
|
|
||||||
|
@needs_emulator
|
||||||
|
def test_setuptools_rust(tmp_path, capfd):
|
||||||
|
"""
|
||||||
|
Test Android cross-compilation using the setuptools-rust toolchain.
|
||||||
|
"""
|
||||||
|
if not which("rustup") or not which("cargo"):
|
||||||
|
pytest.skip("rustup and cargo are required for this test")
|
||||||
|
|
||||||
|
# Initialize a basic project and override files for setuptools-rust
|
||||||
|
project = new_c_project()
|
||||||
|
project.files["pyproject.toml"] = dedent(
|
||||||
|
"""\
|
||||||
|
[build-system]
|
||||||
|
requires = ["setuptools", "wheel", "setuptools-rust"]
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
project.files["setup.py"] = dedent(
|
||||||
|
"""\
|
||||||
|
from setuptools import setup
|
||||||
|
from setuptools_rust import Binding, RustExtension
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name="spam",
|
||||||
|
version="0.1.0",
|
||||||
|
rust_extensions=[RustExtension("spam.rust_ext", binding=Binding.PyO3)],
|
||||||
|
zip_safe=False,
|
||||||
|
)
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
project.files["Cargo.toml"] = dedent(
|
||||||
|
"""\
|
||||||
|
[package]
|
||||||
|
name = "rust_ext"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
name = "rust_ext"
|
||||||
|
crate-type = ["cdylib"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
pyo3 = { version = "0.23.3", features = ["extension-module"] }
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
# Create the Rust source directory and file
|
||||||
|
(tmp_path / "src").mkdir()
|
||||||
|
project.files["src/lib.rs"] = dedent(
|
||||||
|
"""\
|
||||||
|
use pyo3::prelude::*;
|
||||||
|
|
||||||
|
#[pyfunction]
|
||||||
|
fn hello() -> PyResult<String> {
|
||||||
|
Ok("Hello from Rust via setuptools-rust!".to_string())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[pymodule]
|
||||||
|
fn rust_ext(_py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> {
|
||||||
|
m.add_function(wrap_pyfunction!(hello, m)?)?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
project.generate(tmp_path)
|
||||||
|
|
||||||
|
# Command to verify the built extension on the Android emulator
|
||||||
|
test_command = "python -c 'import spam.rust_ext; print(spam.rust_ext.hello())'"
|
||||||
|
|
||||||
|
# Run cibuildwheel to build and test the wheel
|
||||||
|
wheels = cibuildwheel_run(
|
||||||
|
tmp_path,
|
||||||
|
add_env={
|
||||||
|
**cp313_env,
|
||||||
|
"CIBW_TEST_COMMAND": test_command,
|
||||||
|
"CIBW_BUILD_VERBOSITY": "1",
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
# Verification
|
||||||
|
assert len(wheels) == 1
|
||||||
|
stdout = capfd.readouterr().out
|
||||||
|
assert "Hello from Rust via setuptools-rust!" in stdout
|
||||||
|
|
||||||
|
|
||||||
|
@needs_emulator
|
||||||
|
def test_maturin(tmp_path, capfd):
|
||||||
|
"""
|
||||||
|
Test Android cross-compilation using the maturin backend.
|
||||||
|
"""
|
||||||
|
if not which("rustup") or not which("cargo"):
|
||||||
|
pytest.skip("rustup and cargo are required for this test")
|
||||||
|
|
||||||
|
project = new_c_project()
|
||||||
|
project.files["pyproject.toml"] = dedent(
|
||||||
|
"""\
|
||||||
|
[build-system]
|
||||||
|
# maturin >= 1.11.0 is required for reliable Android cross-compilation support.
|
||||||
|
requires = ["maturin>=1.11.0,<2.0"]
|
||||||
|
build-backend = "maturin"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "spam"
|
||||||
|
version = "0.1.0"
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
project.files["Cargo.toml"] = dedent(
|
||||||
|
"""\
|
||||||
|
[package]
|
||||||
|
name = "spam"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
name = "spam"
|
||||||
|
crate-type = ["cdylib"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
pyo3 = { version = "0.23.3", features = ["extension-module"] }
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
(tmp_path / "src").mkdir()
|
||||||
|
project.files["src/lib.rs"] = dedent(
|
||||||
|
"""\
|
||||||
|
use pyo3::prelude::*;
|
||||||
|
|
||||||
|
#[pyfunction]
|
||||||
|
fn hello() -> PyResult<String> {
|
||||||
|
Ok("Hello from Rust via maturin!".to_string())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[pymodule]
|
||||||
|
fn spam(_py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> {
|
||||||
|
m.add_function(wrap_pyfunction!(hello, m)?)?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
project.generate(tmp_path)
|
||||||
|
(tmp_path / "setup.py").unlink()
|
||||||
|
|
||||||
|
test_command = "python -c 'import spam; print(spam.hello())'"
|
||||||
|
|
||||||
|
wheels = cibuildwheel_run(
|
||||||
|
tmp_path,
|
||||||
|
add_env={
|
||||||
|
**cp313_env,
|
||||||
|
"CIBW_TEST_COMMAND": test_command,
|
||||||
|
"CIBW_BUILD_VERBOSITY": "1",
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
assert len(wheels) == 1
|
||||||
|
stdout = capfd.readouterr().out
|
||||||
|
assert "Hello from Rust via maturin!" in stdout
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ def test_pyodide_version_incompatible(tmp_path, capfd):
|
|||||||
tmp_path,
|
tmp_path,
|
||||||
add_args=["--platform", "pyodide"],
|
add_args=["--platform", "pyodide"],
|
||||||
add_env={
|
add_env={
|
||||||
"CIBW_DEPENDENCY_VERSIONS": "packages: pyodide-build==0.29.3",
|
"CIBW_DEPENDENCY_VERSIONS": "packages: pyodide-build==0.31.2",
|
||||||
"CIBW_PYODIDE_VERSION": "0.26.0a6",
|
"CIBW_PYODIDE_VERSION": "0.26.0a6",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,134 @@
|
|||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
from cibuildwheel.audit import is_abi3_wheel, run_audit
|
||||||
|
|
||||||
|
|
||||||
|
class TestIsAbi3Wheel:
|
||||||
|
def test_abi3_wheel(self) -> None:
|
||||||
|
assert is_abi3_wheel(Path("example-1.0.0-cp38-abi3-manylinux_2_17_x86_64.whl"))
|
||||||
|
|
||||||
|
def test_abi3_wheel_macos(self) -> None:
|
||||||
|
assert is_abi3_wheel(Path("example-1.0.0-cp39-abi3-macosx_10_9_x86_64.whl"))
|
||||||
|
|
||||||
|
def test_abi3_wheel_windows(self) -> None:
|
||||||
|
assert is_abi3_wheel(Path("example-1.0.0-cp310-abi3-win_amd64.whl"))
|
||||||
|
|
||||||
|
def test_non_abi3_wheel(self) -> None:
|
||||||
|
assert not is_abi3_wheel(Path("example-1.0.0-cp310-cp310-manylinux_2_17_x86_64.whl"))
|
||||||
|
|
||||||
|
def test_pure_python_wheel(self) -> None:
|
||||||
|
assert not is_abi3_wheel(Path("example-1.0.0-py3-none-any.whl"))
|
||||||
|
|
||||||
|
|
||||||
|
class TestRunAudit:
|
||||||
|
def test_empty_command_does_nothing(self, tmp_path: Path) -> None:
|
||||||
|
# Create a wheel file
|
||||||
|
wheel_path = tmp_path / "example-1.0.0-cp38-abi3-manylinux_2_17_x86_64.whl"
|
||||||
|
wheel_path.touch()
|
||||||
|
|
||||||
|
# Should not raise and should be a no-op
|
||||||
|
run_audit(
|
||||||
|
audit_command="",
|
||||||
|
output_dir=tmp_path,
|
||||||
|
wheels_before=set(),
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_audit_runs_on_new_wheels(self, tmp_path: Path) -> None:
|
||||||
|
# Create a wheel file (simulating a build)
|
||||||
|
wheel_path = tmp_path / "example-1.0.0-cp310-cp310-manylinux_2_17_x86_64.whl"
|
||||||
|
wheel_path.touch()
|
||||||
|
|
||||||
|
# Create a marker file to verify command ran
|
||||||
|
marker = tmp_path / "audit_ran.txt"
|
||||||
|
|
||||||
|
run_audit(
|
||||||
|
audit_command=f"touch {marker}",
|
||||||
|
output_dir=tmp_path,
|
||||||
|
wheels_before=set(),
|
||||||
|
)
|
||||||
|
|
||||||
|
assert marker.exists()
|
||||||
|
|
||||||
|
def test_audit_skips_old_wheels(self, tmp_path: Path) -> None:
|
||||||
|
# Create a wheel file
|
||||||
|
wheel_path = tmp_path / "example-1.0.0-cp310-cp310-manylinux_2_17_x86_64.whl"
|
||||||
|
wheel_path.touch()
|
||||||
|
|
||||||
|
# Create a marker file to verify command ran
|
||||||
|
marker = tmp_path / "audit_ran.txt"
|
||||||
|
|
||||||
|
# Pre-existing wheel should be skipped
|
||||||
|
run_audit(
|
||||||
|
audit_command=f"touch {marker}",
|
||||||
|
output_dir=tmp_path,
|
||||||
|
wheels_before={wheel_path.name},
|
||||||
|
)
|
||||||
|
|
||||||
|
assert not marker.exists()
|
||||||
|
|
||||||
|
def test_abi3_only_mode_skips_non_abi3(self, tmp_path: Path) -> None:
|
||||||
|
# Create a non-abi3 wheel
|
||||||
|
wheel_path = tmp_path / "example-1.0.0-cp310-cp310-manylinux_2_17_x86_64.whl"
|
||||||
|
wheel_path.touch()
|
||||||
|
|
||||||
|
# Create a marker file to verify command ran
|
||||||
|
marker = tmp_path / "audit_ran.txt"
|
||||||
|
|
||||||
|
run_audit(
|
||||||
|
audit_command=f"echo {{abi3_wheel}} && touch {marker}",
|
||||||
|
output_dir=tmp_path,
|
||||||
|
wheels_before=set(),
|
||||||
|
)
|
||||||
|
|
||||||
|
# Should not run because no abi3 wheels
|
||||||
|
assert not marker.exists()
|
||||||
|
|
||||||
|
def test_abi3_only_mode_runs_on_abi3(self, tmp_path: Path) -> None:
|
||||||
|
# Create an abi3 wheel
|
||||||
|
wheel_path = tmp_path / "example-1.0.0-cp38-abi3-manylinux_2_17_x86_64.whl"
|
||||||
|
wheel_path.touch()
|
||||||
|
|
||||||
|
# Create a marker file to verify command ran
|
||||||
|
marker = tmp_path / "audit_ran.txt"
|
||||||
|
|
||||||
|
run_audit(
|
||||||
|
audit_command=f"echo {{abi3_wheel}} && touch {marker}",
|
||||||
|
output_dir=tmp_path,
|
||||||
|
wheels_before=set(),
|
||||||
|
)
|
||||||
|
|
||||||
|
assert marker.exists()
|
||||||
|
|
||||||
|
def test_wheel_placeholder_expanded(self, tmp_path: Path) -> None:
|
||||||
|
# Create a wheel file
|
||||||
|
wheel_path = tmp_path / "example-1.0.0-cp310-cp310-manylinux_2_17_x86_64.whl"
|
||||||
|
wheel_path.touch()
|
||||||
|
|
||||||
|
# Write wheel path to a file to verify expansion
|
||||||
|
output_file = tmp_path / "wheel_path.txt"
|
||||||
|
|
||||||
|
run_audit(
|
||||||
|
audit_command=f"echo {{wheel}} > {output_file}",
|
||||||
|
output_dir=tmp_path,
|
||||||
|
wheels_before=set(),
|
||||||
|
)
|
||||||
|
|
||||||
|
assert output_file.exists()
|
||||||
|
content = output_file.read_text().strip()
|
||||||
|
assert content == str(wheel_path)
|
||||||
|
|
||||||
|
def test_audit_fails_on_error(self, tmp_path: Path) -> None:
|
||||||
|
# Create a wheel file
|
||||||
|
wheel_path = tmp_path / "example-1.0.0-cp310-cp310-manylinux_2_17_x86_64.whl"
|
||||||
|
wheel_path.touch()
|
||||||
|
|
||||||
|
with pytest.raises(SystemExit) as exc_info:
|
||||||
|
run_audit(
|
||||||
|
audit_command="exit 1",
|
||||||
|
output_dir=tmp_path,
|
||||||
|
wheels_before=set(),
|
||||||
|
)
|
||||||
|
|
||||||
|
assert exc_info.value.code == 1
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
import os
|
|
||||||
import sys
|
import sys
|
||||||
import tomllib
|
import tomllib
|
||||||
from fnmatch import fnmatch
|
from fnmatch import fnmatch
|
||||||
@@ -142,70 +141,6 @@ def test_empty_selector(monkeypatch):
|
|||||||
assert e.value.code == 3
|
assert e.value.code == 3
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.usefixtures("platform", "intercepted_build_args")
|
|
||||||
def test_riscv64_warning1(monkeypatch, capsys):
|
|
||||||
monkeypatch.setenv("CIBW_ENABLE", "cpython-experimental-riscv64")
|
|
||||||
|
|
||||||
main()
|
|
||||||
|
|
||||||
_, err = capsys.readouterr()
|
|
||||||
print(err)
|
|
||||||
assert "'cpython-experimental-riscv64' enable is deprecated" in err
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.usefixtures("platform", "intercepted_build_args")
|
|
||||||
def test_riscv64_warning2(monkeypatch, capsys, tmp_path):
|
|
||||||
local_path = tmp_path / "tmp_project"
|
|
||||||
os.mkdir(local_path) # noqa:PTH102 Path.mkdir has been monkeypatched already
|
|
||||||
local_path.joinpath("setup.py").touch()
|
|
||||||
|
|
||||||
monkeypatch.setattr(
|
|
||||||
sys, "argv", ["cibuildwheel", "--only", "cp313-manylinux_riscv64", str(local_path)]
|
|
||||||
)
|
|
||||||
monkeypatch.setenv("CIBW_ENABLE", "cpython-experimental-riscv64")
|
|
||||||
|
|
||||||
main()
|
|
||||||
|
|
||||||
_, err = capsys.readouterr()
|
|
||||||
print(err)
|
|
||||||
assert "'cpython-experimental-riscv64' enable is deprecated" in err
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.usefixtures("platform", "intercepted_build_args")
|
|
||||||
def test_riscv64_no_warning(monkeypatch, capsys, tmp_path):
|
|
||||||
local_path = tmp_path / "tmp_project"
|
|
||||||
os.mkdir(local_path) # noqa:PTH102 Path.mkdir has been monkeypatched already
|
|
||||||
local_path.joinpath("setup.py").touch()
|
|
||||||
|
|
||||||
monkeypatch.setattr(
|
|
||||||
sys, "argv", ["cibuildwheel", "--only", "cp313-manylinux_riscv64", str(local_path)]
|
|
||||||
)
|
|
||||||
|
|
||||||
main()
|
|
||||||
|
|
||||||
_, err = capsys.readouterr()
|
|
||||||
print(err)
|
|
||||||
assert "'cpython-experimental-riscv64' enable is deprecated" not in err
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.usefixtures("platform", "intercepted_build_args")
|
|
||||||
def test_riscv64_no_warning2(monkeypatch, capsys, tmp_path):
|
|
||||||
local_path = tmp_path / "tmp_project"
|
|
||||||
os.mkdir(local_path) # noqa:PTH102 Path.mkdir has been monkeypatched already
|
|
||||||
local_path.joinpath("setup.py").touch()
|
|
||||||
|
|
||||||
monkeypatch.setattr(
|
|
||||||
sys, "argv", ["cibuildwheel", "--only", "cp313-manylinux_riscv64", str(local_path)]
|
|
||||||
)
|
|
||||||
monkeypatch.setenv("CIBW_ENABLE", "all")
|
|
||||||
|
|
||||||
main()
|
|
||||||
|
|
||||||
_, err = capsys.readouterr()
|
|
||||||
print(err)
|
|
||||||
assert "'cpython-experimental-riscv64' enable is deprecated" not in err
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
("architecture", "image", "full_image"),
|
("architecture", "image", "full_image"),
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -541,3 +541,46 @@ before-all = ["override2"]
|
|||||||
options_reader.get("config-settings", option_format=ShlexTableFormat())
|
options_reader.get("config-settings", option_format=ShlexTableFormat())
|
||||||
== "key1=value1 key2=override2 empty='' key3=value3"
|
== "key1=value1 key2=override2 empty='' key3=value3"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def test_audit_option(tmp_path, platform):
|
||||||
|
pyproject_toml: Path = tmp_path / "pyproject.toml"
|
||||||
|
pyproject_toml.write_text(
|
||||||
|
"""
|
||||||
|
[tool.cibuildwheel]
|
||||||
|
audit = "abi3audit {abi3_wheel}"
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
options_reader = OptionsReader(pyproject_toml, platform=platform, env={})
|
||||||
|
assert options_reader.get("audit", option_format=ListFormat(" && ")) == "abi3audit {abi3_wheel}"
|
||||||
|
|
||||||
|
|
||||||
|
def test_audit_option_list(tmp_path, platform):
|
||||||
|
pyproject_toml: Path = tmp_path / "pyproject.toml"
|
||||||
|
pyproject_toml.write_text(
|
||||||
|
"""
|
||||||
|
[tool.cibuildwheel]
|
||||||
|
audit = ["first command", "second command"]
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
options_reader = OptionsReader(pyproject_toml, platform=platform, env={})
|
||||||
|
assert (
|
||||||
|
options_reader.get("audit", option_format=ListFormat(" && "))
|
||||||
|
== "first command && second command"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def test_audit_option_env(tmp_path, platform):
|
||||||
|
pyproject_toml: Path = tmp_path / "pyproject.toml"
|
||||||
|
pyproject_toml.write_text(
|
||||||
|
"""
|
||||||
|
[tool.cibuildwheel]
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
options_reader = OptionsReader(
|
||||||
|
pyproject_toml, platform=platform, env={"CIBW_AUDIT": "my-audit-tool {wheel}"}
|
||||||
|
)
|
||||||
|
assert options_reader.get("audit", option_format=ListFormat(" && ")) == "my-audit-tool {wheel}"
|
||||||
|
|||||||
Reference in New Issue
Block a user