Merge remote-tracking branch 'origin/main' into constraints-cleanup

This commit is contained in:
Joe Rickerby
2024-02-27 21:28:54 +00:00
50 changed files with 476 additions and 271 deletions
+35 -2
View File
@@ -24,7 +24,7 @@ jobs:
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
python-version: "3.x" python-version: "3.x"
- uses: pre-commit/action@v3.0.0 - uses: pre-commit/action@v3.0.1
- name: Check manifest - name: Check manifest
run: pipx run nox -s check_manifest run: pipx run nox -s check_manifest
- name: PyLint checks - name: PyLint checks
@@ -38,7 +38,7 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-20.04, windows-latest, macos-11] os: [ubuntu-20.04, windows-latest, macos-13, macos-14]
python_version: ['3.12'] python_version: ['3.12']
include: include:
- os: ubuntu-22.04 - os: ubuntu-22.04
@@ -85,6 +85,39 @@ jobs:
env: env:
CIBW_ARCHS_MACOS: x86_64 universal2 arm64 CIBW_ARCHS_MACOS: x86_64 universal2 arm64
- name: Run a sample build (GitHub Action, only)
uses: ./
with:
package-dir: sample_proj
output-dir: wheelhouse_only
only: cp312-${{ runner.os == 'Linux' && 'manylinux_x86_64' || (runner.os == 'Windows' && 'win_amd64' || 'macosx_x86_64') }}
- name: Create custom configuration file
shell: bash
run: |
cat > sample_proj/cibw.toml <<EOF
[tool.cibuildwheel]
# Only build on CPython 3.12 on native arch
archs = ["native"]
build = "cp312-*"
# Skip musllinux
skip = "*-musllinux*"
EOF
- name: Run a sample build (GitHub Action, config-file)
uses: ./
with:
package-dir: sample_proj
output-dir: wheelhouse_config_file
config-file: sample_proj/cibw.toml
- name: Check Action artefacts
shell: bash
run: |
test $(find wheelhouse -name '*.whl' | wc -l) -ge 1
test $(find wheelhouse_only -name '*.whl' | wc -l) -eq 1
test $(find wheelhouse_config_file -name '*.whl' | wc -l) -eq 1
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
+1 -1
View File
@@ -44,7 +44,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@v5 uses: peter-evans/create-pull-request@v6
with: with:
commit-message: Update dependencies commit-message: Update dependencies
title: '[Bot] Update dependencies' title: '[Bot] Update dependencies'
+18 -1
View File
@@ -14,7 +14,7 @@ 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.1.13 rev: v0.2.2
hooks: hooks:
- id: ruff - id: ruff
args: ["--fix", "--show-fixes"] args: ["--fix", "--show-fixes"]
@@ -79,3 +79,20 @@ repos:
- id: codespell - id: codespell
args: ["-L", "sur", "-w"] args: ["-L", "sur", "-w"]
exclude: ^docs/working-examples\.md$ # Autogenerated exclude: ^docs/working-examples\.md$ # Autogenerated
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.0
hooks:
- id: check-dependabot
- id: check-github-actions
- id: check-github-workflows
- id: check-gitlab-ci
- id: check-readthedocs
- id: check-travis
- id: check-jsonschema
name: Check projects
args: [--schemafile, docs/data/projects.schema.json]
files: '^docs/data/projects.yml$'
- id: check-metaschema
files: '^docs/data/projects.schema.json$'
+34 -44
View File
@@ -8,7 +8,6 @@ cibuildwheel
[![Appveyor status](https://ci.appveyor.com/api/projects/status/gt3vwl88yt0y3hur/branch/main?svg=true)](https://ci.appveyor.com/project/joerick/cibuildwheel/branch/main) [![Appveyor status](https://ci.appveyor.com/api/projects/status/gt3vwl88yt0y3hur/branch/main?svg=true)](https://ci.appveyor.com/project/joerick/cibuildwheel/branch/main)
[![CircleCI Status](https://img.shields.io/circleci/build/gh/pypa/cibuildwheel/main?logo=circleci)](https://circleci.com/gh/pypa/cibuildwheel) [![CircleCI Status](https://img.shields.io/circleci/build/gh/pypa/cibuildwheel/main?logo=circleci)](https://circleci.com/gh/pypa/cibuildwheel)
[![Azure Status](https://dev.azure.com/joerick0429/cibuildwheel/_apis/build/status/pypa.cibuildwheel?branchName=main)](https://dev.azure.com/joerick0429/cibuildwheel/_build/latest?definitionId=4&branchName=main) [![Azure Status](https://dev.azure.com/joerick0429/cibuildwheel/_apis/build/status/pypa.cibuildwheel?branchName=main)](https://dev.azure.com/joerick0429/cibuildwheel/_build/latest?definitionId=4&branchName=main)
[![Cirrus CI Status](https://img.shields.io/cirrus/github/pypa/cibuildwheel/main?logo=cirrusci)](https://cirrus-ci.com/github/pypa/cibuildwheel)
[Documentation](https://cibuildwheel.readthedocs.org) [Documentation](https://cibuildwheel.readthedocs.org)
@@ -28,20 +27,17 @@ What does it do?
| CPython 3.6 | ✅ | N/A | ✅ | ✅ | N/A | ✅ | ✅ | ✅ | ✅ | ✅ | | CPython 3.6 | ✅ | N/A | ✅ | ✅ | N/A | ✅ | ✅ | ✅ | ✅ | ✅ |
| CPython 3.7 | ✅ | N/A | ✅ | ✅ | N/A | ✅ | ✅ | ✅ | ✅ | ✅ | | CPython 3.7 | ✅ | N/A | ✅ | ✅ | N/A | ✅ | ✅ | ✅ | ✅ | ✅ |
| CPython 3.8 | ✅ | ✅ | ✅ | ✅ | N/A | ✅ | ✅ | ✅ | ✅ | ✅ | | CPython 3.8 | ✅ | ✅ | ✅ | ✅ | N/A | ✅ | ✅ | ✅ | ✅ | ✅ |
| CPython 3.9 | ✅ | ✅ | ✅ | ✅ | ✅² | ✅³ | ✅ | ✅ | ✅ | ✅ | | CPython 3.9 | ✅ | ✅ | ✅ | ✅ | ✅² | ✅ | ✅ | ✅ | ✅ | ✅ |
| CPython 3.10 | ✅ | ✅ | ✅ | ✅ | ✅² | ✅ | ✅ | ✅ | ✅ | ✅ | | CPython 3.10 | ✅ | ✅ | ✅ | ✅ | ✅² | ✅ | ✅ | ✅ | ✅ | ✅ |
| CPython 3.11 | ✅ | ✅ | ✅ | ✅ | ✅² | ✅ | ✅ | ✅ | ✅ | ✅ | | CPython 3.11 | ✅ | ✅ | ✅ | ✅ | ✅² | ✅ | ✅ | ✅ | ✅ | ✅ |
| CPython 3.12 | ✅ | ✅ | ✅ | ✅ | ✅² | ✅ | ✅ | ✅ | ✅ | ✅ | | CPython 3.12 | ✅ | ✅ | ✅ | ✅ | ✅² | ✅ | ✅ | ✅ | ✅ | ✅ |
| PyPy 3.7 v7.3 | ✅ | N/A | ✅ | N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A | | PyPy 3.7 v7.3 | ✅ | N/A | ✅ | N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A |
| PyPy 3.8 v7.3 | ✅ | ✅ | ✅ | N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A | | PyPy 3.8 v7.3 | ✅ | ✅ | ✅ | N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A |
| PyPy 3.9 v7.3 | ✅ | ✅ | ✅ | N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A | | PyPy 3.9 v7.3 | ✅ | ✅ | ✅ | N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A |
| PyPy 3.10 v7.3 | ✅ | ✅ | ✅ | N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A | | PyPy 3.10 v7.3 | ✅ | ✅ | ✅ | N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A |
<sup>¹ PyPy is only supported for manylinux wheels.</sup><br> <sup>¹ PyPy is only supported for manylinux wheels.</sup><br>
<sup>² Windows arm64 support is experimental.</sup><br> <sup>² Windows arm64 support is experimental.</sup><br>
<sup>³ Alpine 3.14 and very briefly 3.15's default python3 [was not able to load](https://github.com/pypa/cibuildwheel/issues/934) musllinux wheels. This has been fixed; please upgrade the python package if using Alpine from before the fix.</sup><br>
<sup>⁴ Cross-compilation not supported with PyPy - to build these wheels you need to run cibuildwheel on an Apple Silicon machine.</sup><br>
<sup>⁵ CPython 3.12 is built by default using Python RCs, starting with cibuildwheel 2.15.</sup><br>
- Builds manylinux, musllinux, macOS 10.9+, and Windows wheels for CPython and PyPy - Builds manylinux, musllinux, macOS 10.9+, and Windows wheels for CPython and PyPy
- Works on GitHub Actions, Azure Pipelines, Travis CI, AppVeyor, CircleCI, GitLab CI, and Cirrus CI - Works on GitHub Actions, Azure Pipelines, Travis CI, AppVeyor, CircleCI, GitLab CI, and Cirrus CI
@@ -57,18 +53,16 @@ Usage
| | Linux | macOS | Windows | Linux ARM | macOS ARM | Windows ARM | | | Linux | macOS | Windows | Linux ARM | macOS ARM | Windows ARM |
|-----------------|-------|-------|---------|-----------|-----------|-------------| |-----------------|-------|-------|---------|-----------|-----------|-------------|
| GitHub Actions | ✅ | ✅ | ✅ | ✅¹ | ✅² | ✅ | | GitHub Actions | ✅ | ✅ | ✅ | ✅¹ | ✅ | ✅² |
| Azure Pipelines | ✅ | ✅ | ✅ | | ✅² | ✅ | | Azure Pipelines | ✅ | ✅ | ✅ | | ✅ | ✅² |
| Travis CI | ✅ | | ✅ | ✅ | | | | Travis CI | ✅ | | ✅ | ✅ | | |
| AppVeyor | ✅ | ✅ | ✅ | | ✅² | ✅ | | AppVeyor | ✅ | ✅ | ✅ | | ✅ | ✅² |
| CircleCI | ✅ | ✅ | | ✅ | ✅² | | | CircleCI | ✅ | ✅ | | ✅ | ✅ | |
| Gitlab CI | ✅ | | ✅ | ✅¹ | | | | Gitlab CI | ✅ | | ✅ | ✅¹ | | |
| Cirrus CI | ✅ | ✅³ | ✅ | ✅ | ✅ | | | Cirrus CI | ✅ | ✅ | ✅ | ✅ | ✅ | |
<sup>¹ [Requires emulation](https://cibuildwheel.readthedocs.io/en/stable/faq/#emulation), distributed separately. Other services may also support Linux ARM through emulation or third-party build hosts, but these are not tested in our CI.</sup><br> <sup>¹ [Requires emulation](https://cibuildwheel.readthedocs.io/en/stable/faq/#emulation), distributed separately. Other services may also support Linux ARM through emulation or third-party build hosts, but these are not tested in our CI.</sup><br>
<sup>² [Uses cross-compilation](https://cibuildwheel.readthedocs.io/en/stable/faq/#universal2). It is not possible to test `arm64` and the `arm64` part of a `universal2` wheel on this CI platform.</sup><br> <sup>² [Uses cross-compilation](https://cibuildwheel.readthedocs.io/en/stable/faq/#windows-arm64). It is not possible to test `arm64` on this CI platform.</sup>
<sup>³ [Uses cross-compilation](https://cibuildwheel.readthedocs.io/en/stable/faq/#universal2). Thanks to Rosetta 2 emulation, it is possible to test `x86_64` and both parts of a `universal2` wheel on this CI platform.</sup><br>
<sup>⁴ [Uses cross-compilation](https://cibuildwheel.readthedocs.io/en/stable/faq/#windows-arm64). It is not possible to test `arm64` on this CI platform.</sup>
<!--intro-end--> <!--intro-end-->
@@ -88,7 +82,7 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-20.04, windows-2019, macOS-11] os: [ubuntu-latest, windows-latest, macos-13, macos-14]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -97,7 +91,7 @@ jobs:
- uses: actions/setup-python@v3 - uses: actions/setup-python@v3
- name: Install cibuildwheel - name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.16.2 run: python -m pip install cibuildwheel==2.16.5
- name: Build wheels - name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse run: python -m cibuildwheel --output-dir wheelhouse
@@ -214,6 +208,27 @@ Changelog
<!-- this section was generated by bin/update_readme_changelog.py -- do not edit manually --> <!-- this section was generated by bin/update_readme_changelog.py -- do not edit manually -->
### v2.16.5
_30 January 2024_
- 🐛 Fix an incompatibility with the GitHub Action and new GitHub Runner images for Windows that bundle Powershell 7.3+ (#1741)
- 🛠 Preliminary support for new `macos-14` arm64 runners (#1743)
### v2.16.4
_28 January 2024_
- 🛠 Update manylinux pins to upgrade from a problematic PyPy version. (#1737)
### v2.16.3
_26 January 2024_
- 🐛 Fix a bug when building from sdist, where relative paths to files in the package didn't work because the working directory was wrong (#1687)
- 🛠 Adds the ability to disable mounting the host filesystem in containers to `/host`, through the `disable_host_mount` suboption on [`CIBW_CONTAINER_ENGINE`](https://cibuildwheel.readthedocs.io/en/stable/options/#container-engine).
- 📚 A lot of docs improvements! (#1708, #1705, #1686, #1679, #1667, #1665)
### v2.16.2 ### v2.16.2
_3 October 2023_ _3 October 2023_
@@ -232,31 +247,6 @@ _26 September 2023_
- 🛠 Updates the prerelease CPython 3.12 version to 3.12.0rc3 (#1625) - 🛠 Updates the prerelease CPython 3.12 version to 3.12.0rc3 (#1625)
- 🛠 Only calls `linux32` in containers when necessary (#1599) - 🛠 Only calls `linux32` in containers when necessary (#1599)
### v2.16.0
_18 September 2023_
- ✨ Add the ability to pass additional flags to a build frontend through the [CIBW_BUILD_FRONTEND](https://cibuildwheel.readthedocs.io/en/stable/options/#build-frontend) option (#1588).
- ✨ The environment variable SOURCE_DATE_EPOCH is now automatically passed through to container Linux builds (useful for [reproducible builds](https://reproducible-builds.org/docs/source-date-epoch/)!) (#1589)
- 🛠 Updates the prerelease CPython 3.12 version to 3.12.0rc2 (#1604)
- 🐛 Fix `requires_python` auto-detection from setup.py when the call to `setup()` is within an `if __name__ == "__main__"` block (#1613)
- 🐛 Fix a bug that prevented building Linux wheels in Docker on a Windows host (#1573)
- 🐛 `--only` can now select prerelease-pythons (#1564)
- 📚 Docs & examples updates (#1582, #1593, #1598, #1615)
### v2.15.0
_8 August 2023_
- 🌟 CPython 3.12 wheels are now built by default - without the CIBW_PRERELEASE_PYTHONS flag. It's time to build and upload these wheels to PyPI! This release includes CPython 3.12.0rc1, which is guaranteed to be ABI compatible with the final release. (#1565)
- ✨ Adds musllinux_1_2 support - this allows packagers to build for musl-based Linux distributions on a more recent Alpine image, and a newer musl libc. (#1561)
### v2.14.1
_15 July 2023_
- 🛠 Updates the prerelease CPython 3.12 version to 3.12.0b4 (#1550)
<!-- END bin/update_readme_changelog.py --> <!-- END bin/update_readme_changelog.py -->
--- ---
+13 -10
View File
@@ -31,29 +31,32 @@ runs:
python-version: "3.8 - 3.12" python-version: "3.8 - 3.12"
update-environment: false update-environment: false
# macos-14 (M1) may be missing pipx (due to it not having CPython)
- run: |
"${{ steps.python.outputs.python-path }}" -m pip install pipx
shell: bash
# Redirecting stderr to stdout to fix interleaving issue in Actions. # Redirecting stderr to stdout to fix interleaving issue in Actions.
- run: > - run: >
pipx run "${{ steps.python.outputs.python-path }}" -m pipx run
--python '${{ steps.python.outputs.python-path }}'
--spec '${{ github.action_path }}' --spec '${{ github.action_path }}'
cibuildwheel cibuildwheel
"${{ inputs.package-dir }}" "${{ inputs.package-dir }}"
--output-dir "${{ inputs.output-dir }}" ${{ inputs.output-dir != '' && format('--output-dir "{0}"', inputs.output-dir) || ''}}
--config-file "${{ inputs.config-file }}" ${{ inputs.config-file != '' && format('--config-file "{0}"', inputs.config-file) || ''}}
--only "${{ inputs.only }}" ${{ inputs.only != '' && format('--only "{0}"', inputs.only) || ''}}
2>&1 2>&1
shell: bash shell: bash
if: runner.os != 'Windows' if: runner.os != 'Windows'
# Windows needs powershell to interact nicely with Meson # Windows needs powershell to interact nicely with Meson
- run: > - run: >
pipx run & "${{ steps.python.outputs.python-path }}" -m pipx run
--python "${{ steps.python.outputs.python-path }}"
--spec "${{ github.action_path }}" --spec "${{ github.action_path }}"
cibuildwheel cibuildwheel
"${{ inputs.package-dir }}" "${{ inputs.package-dir }}"
--output-dir '"${{ inputs.output-dir }}"' ${{ inputs.output-dir != '' && format('--output-dir "{0}"', inputs.output-dir) || ''}}
--config-file '"${{ inputs.config-file }}"' ${{ inputs.config-file != '' && format('--config-file "{0}"', inputs.config-file) || ''}}
--only '"${{ inputs.only }}"' ${{ inputs.only != '' && format('--only "{0}"', inputs.only) || ''}}
shell: pwsh shell: pwsh
if: runner.os == 'Windows' if: runner.os == 'Windows'
+4 -2
View File
@@ -66,9 +66,9 @@ properties:
oneOf: oneOf:
- enum: [docker, podman] - enum: [docker, podman]
- type: string - type: string
pattern: '^docker; ?create_args:' pattern: '^docker; ?(create_args|disable_host_mount):'
- type: string - type: string
pattern: '^podman; ?create_args:' pattern: '^podman; ?(create_args|disable_host_mount):'
- type: object - type: object
additionalProperties: false additionalProperties: false
required: [name] required: [name]
@@ -79,6 +79,8 @@ properties:
type: array type: array
items: items:
type: string type: string
disable-host-mount:
type: boolean
dependency-versions: dependency-versions:
default: pinned default: pinned
description: Specify how cibuildwheel controls the versions of the tools it uses description: Specify how cibuildwheel controls the versions of the tools it uses
+1 -1
View File
@@ -1,3 +1,3 @@
from __future__ import annotations from __future__ import annotations
__version__ = "2.16.2" __version__ = "2.16.5"
+1 -1
View File
@@ -160,7 +160,7 @@ def main() -> None:
# This is now the new package dir # This is now the new package dir
args.package_dir = project_dir.resolve() args.package_dir = project_dir.resolve()
with chdir(temp_dir): with chdir(project_dir):
build_in_directory(args) build_in_directory(args)
finally: finally:
# avoid https://github.com/python/cpython/issues/86962 by performing # avoid https://github.com/python/cpython/issues/86962 by performing
+8 -9
View File
@@ -486,9 +486,8 @@ def build(options: Options, tmp_path: Path) -> None:
unwrap( unwrap(
""" """
While arm64 wheels can be built on x86_64, they cannot be While arm64 wheels can be built on x86_64, they cannot be
tested. The ability to test the arm64 wheels will be added in a tested. Consider building arm64 wheels natively, if your CI
future release of cibuildwheel, once Apple Silicon CI runners provider offers this. To silence this warning, set
are widely available. To silence this warning, set
`CIBW_TEST_SKIP: "*-macosx_arm64"`. `CIBW_TEST_SKIP: "*-macosx_arm64"`.
""" """
) )
@@ -498,11 +497,11 @@ def build(options: Options, tmp_path: Path) -> None:
unwrap( unwrap(
""" """
While universal2 wheels can be built on x86_64, the arm64 part While universal2 wheels can be built on x86_64, the arm64 part
of them cannot currently be tested. The ability to test the of the wheel cannot be tested on x86_64. Consider building
arm64 part of a universal2 wheel will be added in a future universal2 wheels on an arm64 runner, if your CI provider offers
release of cibuildwheel, once Apple Silicon CI runners are this. Notably, an arm64 runner can also test the x86_64 part of
widely available. To silence this warning, set the wheel, through Rosetta emulation. To silence this warning,
`CIBW_TEST_SKIP: "*-macosx_universal2:arm64"`. set `CIBW_TEST_SKIP: "*-macosx_universal2:arm64"`.
""" """
) )
) )
@@ -541,7 +540,7 @@ def build(options: Options, tmp_path: Path) -> None:
# there are no dependencies that were pulled in at build time. # there are no dependencies that were pulled in at build time.
call("pip", "install", "virtualenv", *dependency_constraint_flags, env=env) call("pip", "install", "virtualenv", *dependency_constraint_flags, env=env)
venv_dir = identifier_tmp_dir / "venv-test" venv_dir = identifier_tmp_dir / f"venv-test-{testing_arch}"
arch_prefix = [] arch_prefix = []
if testing_arch != machine_arch: if testing_arch != machine_arch:
+21 -5
View File
@@ -33,11 +33,14 @@ ContainerEngineName = Literal["docker", "podman"]
class OCIContainerEngineConfig: class OCIContainerEngineConfig:
name: ContainerEngineName name: ContainerEngineName
create_args: Sequence[str] = () create_args: Sequence[str] = ()
disable_host_mount: bool = False
@staticmethod @staticmethod
def from_config_string(config_string: str) -> OCIContainerEngineConfig: def from_config_string(config_string: str) -> OCIContainerEngineConfig:
config_dict = parse_key_value_string( config_dict = parse_key_value_string(
config_string, ["name"], ["create_args", "create-args"] config_string,
["name"],
["create_args", "create-args", "disable_host_mount", "disable-host-mount"],
) )
name = " ".join(config_dict["name"]) name = " ".join(config_dict["name"])
if name not in {"docker", "podman"}: if name not in {"docker", "podman"}:
@@ -45,15 +48,28 @@ class OCIContainerEngineConfig:
raise ValueError(msg) raise ValueError(msg)
name = typing.cast(ContainerEngineName, name) name = typing.cast(ContainerEngineName, name)
# some flexibility in the option name to cope with TOML conventions # some flexibility in the option names to cope with TOML conventions
create_args = config_dict.get("create_args") or config_dict.get("create-args") or [] create_args = config_dict.get("create_args") or config_dict.get("create-args") or []
return OCIContainerEngineConfig(name=name, create_args=create_args) disable_host_mount_options = (
config_dict.get("disable_host_mount") or config_dict.get("disable-host-mount") or []
)
disable_host_mount = (
strtobool(disable_host_mount_options[-1]) if disable_host_mount_options else False
)
return OCIContainerEngineConfig(
name=name, create_args=create_args, disable_host_mount=disable_host_mount
)
def options_summary(self) -> str | dict[str, str]: def options_summary(self) -> str | dict[str, str]:
if not self.create_args: if not self.create_args:
return self.name return self.name
else: else:
return {"name": self.name, "create_args": repr(self.create_args)} return {
"name": self.name,
"create_args": repr(self.create_args),
"disable_host_mount": str(self.disable_host_mount),
}
DEFAULT_ENGINE = OCIContainerEngineConfig("docker") DEFAULT_ENGINE = OCIContainerEngineConfig("docker")
@@ -137,7 +153,7 @@ class OCIContainer:
"--env=SOURCE_DATE_EPOCH", "--env=SOURCE_DATE_EPOCH",
f"--name={self.name}", f"--name={self.name}",
"--interactive", "--interactive",
"--volume=/:/host", # ignored on CircleCI *(["--volume=/:/host"] if not self.engine.disable_host_mount else []),
*network_args, *network_args,
*self.engine.create_args, *self.engine.create_args,
self.image, self.image,
+3
View File
@@ -378,6 +378,9 @@ def _inner_fmt(k: str, v: Any, table: TableFmt) -> Iterator[str]:
for inner_v in v: for inner_v in v:
qv = quote_function(inner_v) qv = quote_function(inner_v)
yield table["item"].format(k=k, v=qv) yield table["item"].format(k=k, v=qv)
elif isinstance(v, bool):
qv = quote_function(str(v))
yield table["item"].format(k=k, v=qv)
else: else:
qv = quote_function(v) qv = quote_function(v)
yield table["item"].format(k=k, v=qv) yield table["item"].format(k=k, v=qv)
+18 -18
View File
@@ -97,19 +97,19 @@ python_configurations = [
{ identifier = "cp310-macosx_x86_64", version = "3.10", url = "https://www.python.org/ftp/python/3.10.11/python-3.10.11-macos11.pkg" }, { identifier = "cp310-macosx_x86_64", version = "3.10", url = "https://www.python.org/ftp/python/3.10.11/python-3.10.11-macos11.pkg" },
{ identifier = "cp310-macosx_arm64", version = "3.10", url = "https://www.python.org/ftp/python/3.10.11/python-3.10.11-macos11.pkg" }, { identifier = "cp310-macosx_arm64", version = "3.10", url = "https://www.python.org/ftp/python/3.10.11/python-3.10.11-macos11.pkg" },
{ identifier = "cp310-macosx_universal2", version = "3.10", url = "https://www.python.org/ftp/python/3.10.11/python-3.10.11-macos11.pkg" }, { identifier = "cp310-macosx_universal2", version = "3.10", url = "https://www.python.org/ftp/python/3.10.11/python-3.10.11-macos11.pkg" },
{ identifier = "cp311-macosx_x86_64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.7/python-3.11.7-macos11.pkg" }, { identifier = "cp311-macosx_x86_64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.8/python-3.11.8-macos11.pkg" },
{ identifier = "cp311-macosx_arm64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.7/python-3.11.7-macos11.pkg" }, { identifier = "cp311-macosx_arm64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.8/python-3.11.8-macos11.pkg" },
{ identifier = "cp311-macosx_universal2", version = "3.11", url = "https://www.python.org/ftp/python/3.11.7/python-3.11.7-macos11.pkg" }, { identifier = "cp311-macosx_universal2", version = "3.11", url = "https://www.python.org/ftp/python/3.11.8/python-3.11.8-macos11.pkg" },
{ identifier = "cp312-macosx_x86_64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.1/python-3.12.1-macos11.pkg" }, { identifier = "cp312-macosx_x86_64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.2/python-3.12.2-macos11.pkg" },
{ identifier = "cp312-macosx_arm64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.1/python-3.12.1-macos11.pkg" }, { identifier = "cp312-macosx_arm64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.2/python-3.12.2-macos11.pkg" },
{ identifier = "cp312-macosx_universal2", version = "3.12", url = "https://www.python.org/ftp/python/3.12.1/python-3.12.1-macos11.pkg" }, { identifier = "cp312-macosx_universal2", version = "3.12", url = "https://www.python.org/ftp/python/3.12.2/python-3.12.2-macos11.pkg" },
{ identifier = "pp37-macosx_x86_64", version = "3.7", url = "https://downloads.python.org/pypy/pypy3.7-v7.3.9-osx64.tar.bz2" }, { identifier = "pp37-macosx_x86_64", version = "3.7", url = "https://downloads.python.org/pypy/pypy3.7-v7.3.9-osx64.tar.bz2" },
{ identifier = "pp38-macosx_x86_64", version = "3.8", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-macos_x86_64.tar.bz2" }, { identifier = "pp38-macosx_x86_64", version = "3.8", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-macos_x86_64.tar.bz2" },
{ identifier = "pp38-macosx_arm64", version = "3.8", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-macos_arm64.tar.bz2" }, { identifier = "pp38-macosx_arm64", version = "3.8", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-macos_arm64.tar.bz2" },
{ identifier = "pp39-macosx_x86_64", version = "3.9", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.14-macos_x86_64.tar.bz2" }, { identifier = "pp39-macosx_x86_64", version = "3.9", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.15-macos_x86_64.tar.bz2" },
{ identifier = "pp39-macosx_arm64", version = "3.9", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.14-macos_arm64.tar.bz2" }, { identifier = "pp39-macosx_arm64", version = "3.9", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.15-macos_arm64.tar.bz2" },
{ identifier = "pp310-macosx_x86_64", version = "3.10", url = "https://downloads.python.org/pypy/pypy3.10-v7.3.14-macos_x86_64.tar.bz2" }, { identifier = "pp310-macosx_x86_64", version = "3.10", url = "https://downloads.python.org/pypy/pypy3.10-v7.3.15-macos_x86_64.tar.bz2" },
{ identifier = "pp310-macosx_arm64", version = "3.10", url = "https://downloads.python.org/pypy/pypy3.10-v7.3.14-macos_arm64.tar.bz2" }, { identifier = "pp310-macosx_arm64", version = "3.10", url = "https://downloads.python.org/pypy/pypy3.10-v7.3.15-macos_arm64.tar.bz2" },
] ]
[windows] [windows]
@@ -124,16 +124,16 @@ python_configurations = [
{ identifier = "cp39-win_amd64", version = "3.9.13", arch = "64" }, { identifier = "cp39-win_amd64", version = "3.9.13", arch = "64" },
{ identifier = "cp310-win32", version = "3.10.11", arch = "32" }, { identifier = "cp310-win32", version = "3.10.11", arch = "32" },
{ identifier = "cp310-win_amd64", version = "3.10.11", arch = "64" }, { identifier = "cp310-win_amd64", version = "3.10.11", arch = "64" },
{ identifier = "cp311-win32", version = "3.11.7", arch = "32" }, { identifier = "cp311-win32", version = "3.11.8", arch = "32" },
{ identifier = "cp311-win_amd64", version = "3.11.7", arch = "64" }, { identifier = "cp311-win_amd64", version = "3.11.8", arch = "64" },
{ identifier = "cp312-win32", version = "3.12.1", arch = "32" }, { identifier = "cp312-win32", version = "3.12.2", arch = "32" },
{ identifier = "cp312-win_amd64", version = "3.12.1", arch = "64" }, { identifier = "cp312-win_amd64", version = "3.12.2", arch = "64" },
{ identifier = "cp39-win_arm64", version = "3.9.10", arch = "ARM64" }, { identifier = "cp39-win_arm64", version = "3.9.10", arch = "ARM64" },
{ identifier = "cp310-win_arm64", version = "3.10.11", arch = "ARM64" }, { identifier = "cp310-win_arm64", version = "3.10.11", arch = "ARM64" },
{ identifier = "cp311-win_arm64", version = "3.11.7", arch = "ARM64" }, { identifier = "cp311-win_arm64", version = "3.11.8", arch = "ARM64" },
{ identifier = "cp312-win_arm64", version = "3.12.1", arch = "ARM64" }, { identifier = "cp312-win_arm64", version = "3.12.2", arch = "ARM64" },
{ identifier = "pp37-win_amd64", version = "3.7", arch = "64", url = "https://downloads.python.org/pypy/pypy3.7-v7.3.9-win64.zip" }, { identifier = "pp37-win_amd64", version = "3.7", arch = "64", url = "https://downloads.python.org/pypy/pypy3.7-v7.3.9-win64.zip" },
{ identifier = "pp38-win_amd64", version = "3.8", arch = "64", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-win64.zip" }, { identifier = "pp38-win_amd64", version = "3.8", arch = "64", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-win64.zip" },
{ identifier = "pp39-win_amd64", version = "3.9", arch = "64", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.14-win64.zip" }, { identifier = "pp39-win_amd64", version = "3.9", arch = "64", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.15-win64.zip" },
{ identifier = "pp310-win_amd64", version = "3.10", arch = "64", url = "https://downloads.python.org/pypy/pypy3.10-v7.3.14-win64.zip" }, { identifier = "pp310-win_amd64", version = "3.10", arch = "64", url = "https://downloads.python.org/pypy/pypy3.10-v7.3.15-win64.zip" },
] ]
@@ -172,11 +172,11 @@
}, },
{ {
"type": "string", "type": "string",
"pattern": "^docker; ?create_args:" "pattern": "^docker; ?(create_args|disable_host_mount):"
}, },
{ {
"type": "string", "type": "string",
"pattern": "^podman; ?create_args:" "pattern": "^podman; ?(create_args|disable_host_mount):"
}, },
{ {
"type": "object", "type": "object",
@@ -196,6 +196,9 @@
"items": { "items": {
"type": "string" "type": "string"
} }
},
"disable-host-mount": {
"type": "boolean"
} }
} }
} }
@@ -13,10 +13,8 @@ distlib==0.3.8
filelock==3.13.1 filelock==3.13.1
# via virtualenv # via virtualenv
packaging==23.2 packaging==23.2
# via # via delocate
# build platformdirs==4.2.0
# delocate
platformdirs==4.1.0
# via virtualenv # via virtualenv
pyproject-hooks==1.0.0 pyproject-hooks==1.0.0
# via build # via build
@@ -30,5 +28,7 @@ virtualenv==20.25.0
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
# The following packages are considered to be unsafe in a requirements file: # The following packages are considered to be unsafe in a requirements file:
pip==23.3.2 pip==24.0
# via -r cibuildwheel/resources/constraints.in
setuptools==69.1.0
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
@@ -13,10 +13,8 @@ distlib==0.3.8
filelock==3.13.1 filelock==3.13.1
# via virtualenv # via virtualenv
packaging==23.2 packaging==23.2
# via # via delocate
# build platformdirs==4.2.0
# delocate
platformdirs==4.1.0
# via virtualenv # via virtualenv
pyproject-hooks==1.0.0 pyproject-hooks==1.0.0
# via build # via build
@@ -26,5 +24,7 @@ virtualenv==20.25.0
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
# The following packages are considered to be unsafe in a requirements file: # The following packages are considered to be unsafe in a requirements file:
pip==23.3.2 pip==24.0
# via -r cibuildwheel/resources/constraints.in
setuptools==69.1.0
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
@@ -13,10 +13,8 @@ distlib==0.3.8
filelock==3.13.1 filelock==3.13.1
# via virtualenv # via virtualenv
packaging==23.2 packaging==23.2
# via # via delocate
# build platformdirs==4.2.0
# delocate
platformdirs==4.1.0
# via virtualenv # via virtualenv
pyproject-hooks==1.0.0 pyproject-hooks==1.0.0
# via build # via build
@@ -26,5 +24,7 @@ virtualenv==20.25.0
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
# The following packages are considered to be unsafe in a requirements file: # The following packages are considered to be unsafe in a requirements file:
pip==23.3.2 pip==24.0
# via -r cibuildwheel/resources/constraints.in
setuptools==69.1.0
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
@@ -39,5 +39,5 @@ zipp==3.15.0
# via importlib-metadata # via importlib-metadata
# The following packages are considered to be unsafe in a requirements file: # The following packages are considered to be unsafe in a requirements file:
pip==23.3.2 pip==24.0
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
@@ -15,10 +15,8 @@ filelock==3.13.1
importlib-metadata==7.0.1 importlib-metadata==7.0.1
# via build # via build
packaging==23.2 packaging==23.2
# via # via delocate
# build platformdirs==4.2.0
# delocate
platformdirs==4.1.0
# via virtualenv # via virtualenv
pyproject-hooks==1.0.0 pyproject-hooks==1.0.0
# via build # via build
@@ -34,5 +32,7 @@ zipp==3.17.0
# via importlib-metadata # via importlib-metadata
# The following packages are considered to be unsafe in a requirements file: # The following packages are considered to be unsafe in a requirements file:
pip==23.3.2 pip==24.0
# via -r cibuildwheel/resources/constraints.in
setuptools==69.1.0
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
@@ -15,10 +15,8 @@ filelock==3.13.1
importlib-metadata==7.0.1 importlib-metadata==7.0.1
# via build # via build
packaging==23.2 packaging==23.2
# via # via delocate
# build platformdirs==4.2.0
# delocate
platformdirs==4.1.0
# via virtualenv # via virtualenv
pyproject-hooks==1.0.0 pyproject-hooks==1.0.0
# via build # via build
@@ -34,5 +32,7 @@ zipp==3.17.0
# via importlib-metadata # via importlib-metadata
# The following packages are considered to be unsafe in a requirements file: # The following packages are considered to be unsafe in a requirements file:
pip==23.3.2 pip==24.0
# via -r cibuildwheel/resources/constraints.in
setuptools==69.1.0
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
+5 -5
View File
@@ -13,10 +13,8 @@ distlib==0.3.8
filelock==3.13.1 filelock==3.13.1
# via virtualenv # via virtualenv
packaging==23.2 packaging==23.2
# via # via delocate
# build platformdirs==4.2.0
# delocate
platformdirs==4.1.0
# via virtualenv # via virtualenv
pyproject-hooks==1.0.0 pyproject-hooks==1.0.0
# via build # via build
@@ -26,5 +24,7 @@ virtualenv==20.25.0
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
# The following packages are considered to be unsafe in a requirements file: # The following packages are considered to be unsafe in a requirements file:
pip==23.3.2 pip==24.0
# via -r cibuildwheel/resources/constraints.in
setuptools==69.1.0
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
+26 -26
View File
@@ -1,54 +1,54 @@
[x86_64] [x86_64]
manylinux1 = quay.io/pypa/manylinux1_x86_64:2023-12-10-cee9633 manylinux1 = quay.io/pypa/manylinux1_x86_64:2024-01-28-7b6687a
manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177 manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2024-01-08-eb135ed manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2024-02-08-a1b4ddc
manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-12-26-0d38463 manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-12-26-0d38463
manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2024-01-08-eb135ed manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2024-02-08-a1b4ddc
musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2024-01-08-eb135ed musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2024-02-08-a1b4ddc
musllinux_1_2 = quay.io/pypa/musllinux_1_2_x86_64:2024-01-08-eb135ed musllinux_1_2 = quay.io/pypa/musllinux_1_2_x86_64:2024-02-08-a1b4ddc
[i686] [i686]
manylinux1 = quay.io/pypa/manylinux1_i686:2023-12-10-cee9633 manylinux1 = quay.io/pypa/manylinux1_i686:2024-01-28-7b6687a
manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177 manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177
manylinux2014 = quay.io/pypa/manylinux2014_i686:2024-01-08-eb135ed manylinux2014 = quay.io/pypa/manylinux2014_i686:2024-02-08-a1b4ddc
manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-12-26-0d38463 manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-12-26-0d38463
musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2024-01-08-eb135ed musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2024-02-08-a1b4ddc
musllinux_1_2 = quay.io/pypa/musllinux_1_2_i686:2024-01-08-eb135ed musllinux_1_2 = quay.io/pypa/musllinux_1_2_i686:2024-02-08-a1b4ddc
[pypy_x86_64] [pypy_x86_64]
manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177 manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2024-01-08-eb135ed manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2024-02-08-a1b4ddc
manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-12-26-0d38463 manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-12-26-0d38463
manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2024-01-08-eb135ed manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2024-02-08-a1b4ddc
[pypy_i686] [pypy_i686]
manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177 manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177
manylinux2014 = quay.io/pypa/manylinux2014_i686:2024-01-08-eb135ed manylinux2014 = quay.io/pypa/manylinux2014_i686:2024-02-08-a1b4ddc
manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-12-26-0d38463 manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-12-26-0d38463
[aarch64] [aarch64]
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2024-01-08-eb135ed manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2024-02-08-a1b4ddc
manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-12-26-0d38463 manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-12-26-0d38463
manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2024-01-08-eb135ed manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2024-02-08-a1b4ddc
musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2024-01-08-eb135ed musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2024-02-08-a1b4ddc
musllinux_1_2 = quay.io/pypa/musllinux_1_2_aarch64:2024-01-08-eb135ed musllinux_1_2 = quay.io/pypa/musllinux_1_2_aarch64:2024-02-08-a1b4ddc
[ppc64le] [ppc64le]
manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2024-01-08-eb135ed manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2024-02-08-a1b4ddc
manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2022-12-26-0d38463 manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2022-12-26-0d38463
manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2024-01-08-eb135ed manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2024-02-08-a1b4ddc
musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2024-01-08-eb135ed musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2024-02-08-a1b4ddc
musllinux_1_2 = quay.io/pypa/musllinux_1_2_ppc64le:2024-01-08-eb135ed musllinux_1_2 = quay.io/pypa/musllinux_1_2_ppc64le:2024-02-08-a1b4ddc
[s390x] [s390x]
manylinux2014 = quay.io/pypa/manylinux2014_s390x:2024-01-08-eb135ed manylinux2014 = quay.io/pypa/manylinux2014_s390x:2024-02-08-a1b4ddc
manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2022-12-26-0d38463 manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2022-12-26-0d38463
manylinux_2_28 = quay.io/pypa/manylinux_2_28_s390x:2024-01-08-eb135ed manylinux_2_28 = quay.io/pypa/manylinux_2_28_s390x:2024-02-08-a1b4ddc
musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2024-01-08-eb135ed musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2024-02-08-a1b4ddc
musllinux_1_2 = quay.io/pypa/musllinux_1_2_s390x:2024-01-08-eb135ed musllinux_1_2 = quay.io/pypa/musllinux_1_2_s390x:2024-02-08-a1b4ddc
[pypy_aarch64] [pypy_aarch64]
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2024-01-08-eb135ed manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2024-02-08-a1b4ddc
manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-12-26-0d38463 manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-12-26-0d38463
manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2024-01-08-eb135ed manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2024-02-08-a1b4ddc
+2 -2
View File
@@ -738,7 +738,7 @@ def parse_key_value_string(
# split by semicolon # split by semicolon
fields = [list(group) for k, group in itertools.groupby(parts, lambda x: x == ";") if not k] fields = [list(group) for k, group in itertools.groupby(parts, lambda x: x == ";") if not k]
result: dict[str, list[str]] = defaultdict(list) result: defaultdict[str, list[str]] = defaultdict(list)
for field_i, field in enumerate(fields): for field_i, field in enumerate(fields):
# check to see if the option name is specified # check to see if the option name is specified
field_name, sep, first_value = field[0].partition(":") field_name, sep, first_value = field[0].partition(":")
@@ -759,4 +759,4 @@ def parse_key_value_string(
result[field_name] += values result[field_name] += values
return result return dict(result)
+21
View File
@@ -4,6 +4,27 @@ title: Changelog
# Changelog # Changelog
### v2.16.5
_30 January 2024_
- 🐛 Fix an incompatibility with the GitHub Action and new GitHub Runner images for Windows that bundle Powershell 7.3+ (#1741)
- 🛠 Preliminary support for new `macos-14` arm64 runners (#1743)
### v2.16.4
_28 January 2024_
- 🛠 Update manylinux pins to upgrade from a problematic PyPy version. (#1737)
### v2.16.3
_26 January 2024_
- 🐛 Fix a bug when building from sdist, where relative paths to files in the package didn't work because the working directory was wrong (#1687)
- 🛠 Adds the ability to disable mounting the host filesystem in containers to `/host`, through the `disable_host_mount` suboption on [`CIBW_CONTAINER_ENGINE`](https://cibuildwheel.readthedocs.io/en/stable/options/#container-engine).
- 📚 A lot of docs improvements! (#1708, #1705, #1686, #1679, #1667, #1665)
### v2.16.2 ### v2.16.2
_3 October 2023_ _3 October 2023_
+37
View File
@@ -0,0 +1,37 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://github.com/pypa/cibuildwheel/blob/main/cibuildwheel/docs/data/projects.schema.json",
"type": "array",
"description": "The projects file for cibuildwheel",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": { "type": "string" },
"gh": { "type": "string", "pattern": "[^/]*/[^/]*" },
"stars": { "$ref": "#/items/properties/gh" },
"pypi": { "type": "string" },
"notes": { "type": "string" },
"ci": {
"type": "array",
"items": {
"enum": [
"github",
"travisci",
"appveyor",
"circleci",
"gitlab",
"cirrusci",
"azurepipelines"
]
}
},
"ci_config": { "type": "string" },
"os": {
"type": "array",
"items": { "enum": ["windows", "apple", "linux"] }
}
},
"required": ["name", "gh", "ci", "os"]
}
}
+9 -2
View File
@@ -603,13 +603,13 @@
gh: tensorchord/envd gh: tensorchord/envd
ci: [github] ci: [github]
os: [apple, linux, windows] os: [apple, linux, windows]
note: A machine learning development environment build tool notes: A machine learning development environment build tool
- name: mosec - name: mosec
gh: mosecorg/mosec gh: mosecorg/mosec
ci: [github] ci: [github]
os: [linux, apple] os: [linux, apple]
note: A machine learning model serving framework powered by Rust notes: A machine learning model serving framework powered by Rust
- name: ril - name: ril
gh: Cryptex-github/ril-py gh: Cryptex-github/ril-py
@@ -638,3 +638,10 @@
os: [windows, linux, apple] os: [windows, linux, apple]
pypi: werpy pypi: werpy
notes: An ultra-fast python package using optimized dynamic programming to compute the Word Error Rate (WER). notes: An ultra-fast python package using optimized dynamic programming to compute the Word Error Rate (WER).
- name: keyvi
gh: KeyviDev/keyvi
ci: [github]
os: [linux, apple]
pypi: keyvi
notes: FST based key value index highly optimized for size and lookup performance, utilizes ccache action for improved runtime
+7 -1
View File
@@ -255,7 +255,7 @@ h1, h2, h3, h4, h5, h6 {
border: none; border: none;
color: inherit; color: inherit;
background-color: #f0f1f1; background-color: #f0f1f1;
font-size: 100%; font-size: 80%;
} }
@@ -315,3 +315,9 @@ h1, h2, h3, h4, h5, h6 {
.wy-menu-vertical li.current a { .wy-menu-vertical li.current a {
} }
/* word wrap in table cells */
.wy-table-responsive table td, .wy-table-responsive table th {
white-space: normal;
line-height: 1.4;
}
+15 -32
View File
@@ -14,17 +14,17 @@ Linux wheels are built in [`manylinux`/`musllinux` containers](https://github.co
`cibuildwheel` supports this by providing the [`CIBW_ENVIRONMENT`](options.md#environment) and [`CIBW_BEFORE_ALL`](options.md#before-all) options to setup the build environment inside the running container. `cibuildwheel` supports this by providing the [`CIBW_ENVIRONMENT`](options.md#environment) and [`CIBW_BEFORE_ALL`](options.md#before-all) options to setup the build environment inside the running container.
- The project directory is copied into the container as `/project`, the output directory for the wheels to be copied out is `/output`. In general, this is handled transparently by `cibuildwheel`. For a more finegrained level of control however, the root of the host file system is mounted as `/host`, allowing for example to access shared files, caches, etc. on the host file system. Note that `/host` is not available on CircleCI due to their Docker policies. - The project directory is copied into the container as `/project`, the output directory for the wheels to be copied out is `/output`. In general, this is handled transparently by `cibuildwheel`. For a more finegrained level of control however, the root of the host file system is mounted as `/host`, allowing for example to access shared files, caches, etc. on the host file system. Note that `/host` is not available on CircleCI and GitLab CI due to their Docker policies.
- Alternative Docker images can be specified with the `CIBW_MANYLINUX_*_IMAGE`/`CIBW_MUSLLINUX_*_IMAGE` options to allow for a custom, preconfigured build environment for the Linux builds. See [options](options.md#linux-image) for more details. - Alternative Docker images can be specified with the `CIBW_MANYLINUX_*_IMAGE`/`CIBW_MUSLLINUX_*_IMAGE` options to allow for a custom, preconfigured build environment for the Linux builds. See [options](options.md#linux-image) for more details.
### Building macOS wheels for Apple Silicon {: #apple-silicon} ### Building macOS wheels for Apple Silicon {: #apple-silicon}
`cibuildwheel` supports cross-compiling `universal2` and `arm64` wheels on `x86_64` runners. `cibuildwheel` supports both native builds and cross-compiling between `arm64` (Apple Silicon) and `x86_64` (Intel) architectures, including the cross-compatible `universal2` format.
#### Overview of Mac architectures #### Overview of Mac architectures
With the introduction of Apple Silicon, you now have several choices for wheels for Python 3.8+: You have several choices for wheels for Python 3.8+:
##### `x86_64` ##### `x86_64`
@@ -68,43 +68,26 @@ Opinions vary on which of arch-specific or `universal2` wheels are best - some p
See [GitHub issue 1333](https://github.com/pypa/cibuildwheel/issues/1333) for more discussion. See [GitHub issue 1333](https://github.com/pypa/cibuildwheel/issues/1333) for more discussion.
#### How to cross-compile #### How?
With the exception of Cirrus CI, macOS CI runners are still Intel-based, and Apple Silicon wheels are not built by default on Intel runners. However, cross-compilation can be enabled by adding extra archs to the [`CIBW_ARCHS_MACOS` option](options.md#archs) - e.g. `x86_64 arm64`. Cross-compilation is provided by the Xcode toolchain. It's easiest to build `x86_64` wheels on `x86_64` runners, and `arm64` wheels on `arm64` runners.
!!! important On GitHub Actions, `macos-14` runners are `arm64`, and `macos-13` runners are `x86_64`. So all you need to do is ensure both are in your build matrix.
When cross-compiling on Intel, it is not possible to test `arm64` and the `arm64` part of a `universal2` wheel.
`cibuildwheel` will raise a warning to notify you of this - these warnings be be silenced by skipping testing on these platforms: `CIBW_TEST_SKIP: "*_arm64 *_universal2:arm64"`. #### Cross-compiling
!!! note If your CI provider doesn't offer arm64 runners yet, or you want to create `universal2`, you'll have to cross-compile. Cross-compilation can be enabled by adding extra archs to the [`CIBW_ARCHS_MACOS` option](options.md#archs) - e.g. `CIBW_ARCHS_MACOS="x86_64 universal2"`. Cross-compilation is provided by Xcode toolchain v12.2+.
Your runner needs Xcode Command Line Tools 12.2 or later to build `universal2` or `arm64`.
Only CPython 3.8 and newer support `universal2` and `arm64` wheels. Regarding testing,
- On an arm64 runner, it is possible to test x86_64 wheels and both parts of a universal2 wheel using Rosetta 2 emulation.
- On an x86_64 runner, arm64 code can be compiled but it can't be tested. `cibuildwheel` will raise a warning to notify you of this - these warnings can be silenced by skipping testing on these platforms: `CIBW_TEST_SKIP: "*_arm64 *_universal2:arm64"`.
!!! note !!! note
If your project uses **Poetry** as a build backend, cross-compiling on macOS [does not currently work](https://github.com/python-poetry/poetry/issues/7107). In some cases arm64 wheels can be built but their tags will be incorrect, with the platform tag showing `x86_64` instead of `arm64`. If your project uses **Poetry** as a build backend, cross-compiling on macOS [does not currently work](https://github.com/python-poetry/poetry/issues/7107). In some cases arm64 wheels can be built but their tags will be incorrect, with the platform tag showing `x86_64` instead of `arm64`.
As a workaround, the tag can be fixed before running delocate to repair the wheel. The [`wheel tags`](https://wheel.readthedocs.io/en/stable/reference/wheel_tags.html) command is ideal for this. See [this workflow](https://gist.github.com/anderssonjohan/49f07e33fc5cb2420515a8ac76dc0c95#file-build-pendulum-wheels-yml-L39-L53) for an example usage of `wheel tags`. As a workaround, the tag can be fixed before running delocate to repair the wheel. The [`wheel tags`](https://wheel.readthedocs.io/en/stable/reference/wheel_tags.html) command is ideal for this. See [this workflow](https://gist.github.com/anderssonjohan/49f07e33fc5cb2420515a8ac76dc0c95#file-build-pendulum-wheels-yml-L39-L53) for an example usage of `wheel tags`.
Hopefully, cross-compilation is a temporary situation. Once we have widely available Apple Silicon CI runners, we can build `arm64` wheels natively. Until then, cross-compiling `arm64` or `universal2` wheels requires opt-in by setting `CIBW_ARCHS_MACOS` on Intel runners.
Here's an example GitHub Actions workflow with a job that builds for Apple Silicon:
> .github/workflows/build_macos.yml
```yml
{% include "../examples/github-apple-silicon.yml" %}
```
Here's an example Cirrus CI workflow with a job that builds for macOS Intel through Rosetta 2 emulation and for Apple Silicon natively:
> .cirrus.yml
```yml
{% include "../examples/cirrus-ci-intel-mac.yml" %}
```
### Building Linux wheels for non-native archs using emulation {: #emulation} ### Building Linux wheels for non-native archs using emulation {: #emulation}
cibuildwheel supports building non-native architectures on Linux, via cibuildwheel supports building non-native architectures on Linux, via
@@ -159,7 +142,7 @@ There are two suggested methods for keeping cibuildwheel up to date that instead
If you use GitHub Actions for builds, you can use cibuildwheel as an action: If you use GitHub Actions for builds, you can use cibuildwheel as an action:
```yaml ```yaml
uses: pypa/cibuildwheel@v2.16.2 uses: pypa/cibuildwheel@v2.16.5
``` ```
This is a composite step that just runs cibuildwheel using pipx. You can set command-line options as `with:` parameters, and use `env:` as normal. This is a composite step that just runs cibuildwheel using pipx. You can set command-line options as `with:` parameters, and use `env:` as normal.
@@ -181,7 +164,7 @@ The second option, and the only one that supports other CI systems, is using a `
```bash ```bash
# requirements-cibw.txt # requirements-cibw.txt
cibuildwheel==2.16.2 cibuildwheel==2.16.5
``` ```
Then your install step would have `python -m pip install -r requirements-cibw.txt` in it. Your `.github/dependabot.yml` file could look like this: Then your install step would have `python -m pip install -r requirements-cibw.txt` in it. Your `.github/dependabot.yml` file could look like this:
@@ -324,7 +307,7 @@ Solutions to this vary, but the simplest is to use pipx:
# most runners have pipx preinstalled, but in case you don't # most runners have pipx preinstalled, but in case you don't
python3 -m pip install pipx python3 -m pip install pipx
pipx run cibuildwheel==2.16.2 --output-dir wheelhouse pipx run cibuildwheel==2.16.5 --output-dir wheelhouse
pipx run twine upload wheelhouse/*.whl pipx run twine upload wheelhouse/*.whl
``` ```
+17 -9
View File
@@ -343,8 +343,8 @@ See the [cibuildwheel 1 documentation](https://cibuildwheel.readthedocs.io/en/1.
A list of architectures to build. A list of architectures to build.
On macOS, this option can be used to cross-compile between `x86_64`, On macOS, this option can be used to [cross-compile](faq.md#cross-compiling)
`universal2` and `arm64` for Apple Silicon support. between `x86_64`, `universal2` and `arm64`.
On Linux, this option can be used to build non-native architectures under On Linux, this option can be used to build non-native architectures under
emulation. See [this guide](faq.md#emulation) for more information. emulation. See [this guide](faq.md#emulation) for more information.
@@ -1071,8 +1071,8 @@ Auditwheel detects the version of the manylinux / musllinux standard in the imag
Options: Options:
- `docker[;create_args: ...]` - `docker[;create_args: ...][;disable_host_mount: true/false]`
- `podman[;create_args: ...]` - `podman[;create_args: ...][;disable_host_mount: true/false]`
Default: `docker` Default: `docker`
@@ -1081,11 +1081,13 @@ Set the container engine to use. Docker is the default, or you can switch to
running and `docker` available on PATH. To use Podman, it needs to be running and `docker` available on PATH. To use Podman, it needs to be
installed and `podman` available on PATH. installed and `podman` available on PATH.
Arguments can be supplied to the container engine. Currently, the only option Options can be supplied after the name.
that's customisable is 'create_args'. Parameters to create_args are
space-separated strings, which are passed to the container engine on the | Option name | Description
command line when it's creating the container. If you want to include spaces |---|---
inside a parameter, use shell-style quoting. | `create_args` | Space-separated strings, which are passed to the container engine on the command line when it's creating the container. If you want to include spaces inside a parameter, use shell-style quoting.
| `disable_host_mount` | By default, cibuildwheel will mount the root of the host filesystem as a volume at `/host` in the container. To disable the host mount, pass `true` to this option.
!!! tip !!! tip
@@ -1106,6 +1108,9 @@ inside a parameter, use shell-style quoting.
# pass command line options to 'docker create' # pass command line options to 'docker create'
CIBW_CONTAINER_ENGINE: "docker; create_args: --gpus all" CIBW_CONTAINER_ENGINE: "docker; create_args: --gpus all"
# disable the /host mount
CIBW_CONTAINER_ENGINE: "docker; disable_host_mount: true"
``` ```
!!! tab examples "pyproject.toml" !!! tab examples "pyproject.toml"
@@ -1117,6 +1122,9 @@ inside a parameter, use shell-style quoting.
# pass command line options to 'docker create' # pass command line options to 'docker create'
container-engine = { name = "docker", create-args = ["--gpus", "all"]} container-engine = { name = "docker", create-args = ["--gpus", "all"]}
# disable the /host mount
container-engine = { name = "docker", disable-host-mount = true }
``` ```
+9 -7
View File
@@ -61,7 +61,7 @@ You should see the builds taking place. You can experiment with options using en
```sh ```sh
# run a command to set up the build system # run a command to set up the build system
export CIBW_BEFORE_ALL='apt install libpng-dev' export CIBW_BEFORE_ALL='uname -a'
cibuildwheel --platform linux cibuildwheel --platform linux
``` ```
@@ -69,7 +69,7 @@ You should see the builds taking place. You can experiment with options using en
> CMD (Windows) > CMD (Windows)
```bat ```bat
set CIBW_BEFORE_ALL='apt install libpng-dev' set CIBW_BEFORE_ALL='uname -a'
cibuildwheel --platform linux cibuildwheel --platform linux
``` ```
@@ -82,7 +82,7 @@ You should see the builds taking place. You can experiment with options using en
``` ```
[tool.cibuildwheel] [tool.cibuildwheel]
before-all = "apt install libpng-dev" before-all = "uname -a"
``` ```
Then invoke cibuildwheel, like: Then invoke cibuildwheel, like:
@@ -178,13 +178,14 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-20.04, windows-2019, macos-11] # macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-20.04, windows-2019, macos-13, macos-14]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Build wheels - name: Build wheels
run: pipx run cibuildwheel==2.16.2 run: pipx run cibuildwheel==2.16.5
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
@@ -211,7 +212,8 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-20.04, windows-2019, macos-11] # macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-20.04, windows-2019, macos-13, macos-14]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -220,7 +222,7 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/
- uses: actions/setup-python@v3 - uses: actions/setup-python@v3
- name: Install cibuildwheel - name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.16.2 run: python -m pip install cibuildwheel==2.16.5
- name: Build wheels - name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse run: python -m cibuildwheel --output-dir wheelhouse
+14 -12
View File
@@ -53,20 +53,20 @@ title: Working examples
| [h5py][] | ![azurepipelines icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | HDF5 for Python -- The h5py package is a Pythonic interface to the HDF5 binary data format. | | [h5py][] | ![azurepipelines icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | HDF5 for Python -- The h5py package is a Pythonic interface to the HDF5 binary data format. |
| [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 |
| [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. |
| [envd][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | 🏕️ Reproducible development environment | | [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. |
| [SimpleJSON][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | simplejson is a simple, fast, extensible JSON encoder/decoder for Python | | [SimpleJSON][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | simplejson is a simple, fast, extensible JSON encoder/decoder for Python |
| [aioquic][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | QUIC and HTTP/3 implementation in Python | | [aioquic][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | QUIC and HTTP/3 implementation in Python |
| [ruptures][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Extensive Cython + NumPy [pyproject.toml](https://github.com/deepcharles/ruptures/blob/master/pyproject.toml) example. | | [ruptures][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Extensive Cython + NumPy [pyproject.toml](https://github.com/deepcharles/ruptures/blob/master/pyproject.toml) example. |
| [OpenTimelineIO][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Open Source API and interchange format for editorial timeline information. |
| [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 |
| [OpenTimelineIO][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Open Source API and interchange format for editorial timeline information. |
| [PyTables][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python package to manage extremely large amounts of data | | [PyTables][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python package to manage extremely large amounts of data |
| [Parselmouth][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python interface to the Praat software package, using pybind11, C++17 and CMake, with the core Praat static library built only once and shared between wheels. | | [Parselmouth][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python interface to the Praat software package, using pybind11, C++17 and CMake, with the core Praat static library built only once and shared between wheels. |
| [DeepForest][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | An Efficient, Scalable and Optimized Python Framework for Deep Forest (2021.2.1) | | [DeepForest][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | An Efficient, Scalable and Optimized Python Framework for Deep Forest (2021.2.1) |
| [google neuroglancer][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | WebGL-based viewer for volumetric data | | [google neuroglancer][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | WebGL-based viewer for volumetric data |
| [AutoPy][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes a Windows Travis build. | | [AutoPy][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes a Windows Travis build. |
| [H3-py][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Python bindings for H3, a hierarchical hexagonal geospatial indexing system | | [H3-py][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Python bindings for H3, a hierarchical hexagonal geospatial indexing system |
| [mosec][] | ![github icon][] | ![linux icon][] ![apple icon][] | A high-performance ML model serving framework, offers dynamic batching and CPU/GPU pipelines to fully exploit your compute machine | | [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. |
| [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 |
| [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. |
@@ -80,22 +80,23 @@ title: Working examples
| [pybind11 python_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Example pybind11 module built with a Python-based build system | | [pybind11 python_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Example pybind11 module built with a Python-based build system |
| [sourmash][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Quickly search, compare, and analyze genomic and metagenomic data sets. | | [sourmash][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Quickly search, compare, and analyze genomic and metagenomic data sets. |
| [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. |
| [cyvcf2][] | ![github icon][] | ![apple icon][] ![linux icon][] | cython + htslib == fast VCF and BCF processing |
| [matrixprofile][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python 3 library making time series data mining tasks, utilizing matrix profile algorithms, accessible to everyone. | | [matrixprofile][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python 3 library making time series data mining tasks, utilizing matrix profile algorithms, accessible to everyone. |
| [cyvcf2][] | ![github icon][] | ![apple icon][] ![linux icon][] | cython + htslib == fast VCF and BCF processing |
| [jq.py][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | Python bindings for jq | | [jq.py][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | Python bindings for jq |
| [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 |
| [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 |
| [keyvi][] | ![github icon][] | ![linux icon][] ![apple icon][] | FST based key value index highly optimized for size and lookup performance, utilizes ccache action for improved runtime |
| [PyGLM][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Fast OpenGL Mathematics (GLM) for Python | | [PyGLM][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Fast OpenGL Mathematics (GLM) for Python |
| [TgCrypto][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes a Windows Travis build. |
| [pillow-heif][] | ![github icon][] ![cirrusci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Bindings to libheif library with third party dependencies. Fully automated CI for tests and publishing including Apple Silicon builds. | | [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. |
| [iDynTree][] | ![github icon][] | ![linux icon][] | Uses manylinux_2_24 | | [TgCrypto][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes a Windows Travis build. |
| [bx-python][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | A library that includes Cython extensions. | | [bx-python][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | A library that includes Cython extensions. |
| [iDynTree][] | ![github icon][] | ![linux icon][] | Uses manylinux_2_24 |
| [boost-histogram][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Supports full range of wheels, including PyPy and alternate archs. | | [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 |
| [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 |
| [power-grid-model][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Python/C++ library for distribution power system analysis |
| [fathon][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | python package for DFA (Detrended Fluctuation Analysis) and related algorithms | | [fathon][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | python package for DFA (Detrended Fluctuation Analysis) and related algorithms |
| [Arbor][] | ![github icon][] | ![apple icon][] ![linux icon][] | Arbor is a multi-compartment neuron simulation library; compatible with next-generation accelerators; best-practices applied to research software; focused on community-driven development. Includes a [small script](https://github.com/arbor-sim/arbor/blob/master/scripts/patchwheel.py) patching `rpath` in bundled libraries. | | [Arbor][] | ![github icon][] | ![apple icon][] ![linux icon][] | Arbor is a multi-compartment neuron simulation library; compatible with next-generation accelerators; best-practices applied to research software; focused on community-driven development. Includes a [small script](https://github.com/arbor-sim/arbor/blob/master/scripts/patchwheel.py) patching `rpath` in bundled libraries. |
| [power-grid-model][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Python/C++ library for distribution power system analysis |
| [Imagecodecs (fork)][] | ![azurepipelines icon][] | ![apple icon][] ![linux icon][] | Over 20 external dependencies in compiled libraries, custom docker image, `libomp`, `openblas` and `install_name_tool` for macOS. | | [Imagecodecs (fork)][] | ![azurepipelines icon][] | ![apple icon][] ![linux icon][] | Over 20 external dependencies in compiled libraries, custom docker image, `libomp`, `openblas` and `install_name_tool` for macOS. |
| [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 |
| [polaroid][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Full range of wheels for setuptools rust, with auto release and PyPI deploy. | | [polaroid][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Full range of wheels for setuptools rust, with auto release and PyPI deploy. |
@@ -165,8 +166,8 @@ title: Working examples
[SimpleJSON]: https://github.com/simplejson/simplejson [SimpleJSON]: https://github.com/simplejson/simplejson
[aioquic]: https://github.com/aiortc/aioquic [aioquic]: https://github.com/aiortc/aioquic
[ruptures]: https://github.com/deepcharles/ruptures [ruptures]: https://github.com/deepcharles/ruptures
[OpenTimelineIO]: https://github.com/PixarAnimationStudios/OpenTimelineIO
[Psycopg 3]: https://github.com/psycopg/psycopg [Psycopg 3]: https://github.com/psycopg/psycopg
[OpenTimelineIO]: https://github.com/PixarAnimationStudios/OpenTimelineIO
[PyTables]: https://github.com/PyTables/PyTables [PyTables]: https://github.com/PyTables/PyTables
[Parselmouth]: https://github.com/YannickJadoul/Parselmouth [Parselmouth]: https://github.com/YannickJadoul/Parselmouth
[DeepForest]: https://github.com/LAMDA-NJU/Deep-Forest [DeepForest]: https://github.com/LAMDA-NJU/Deep-Forest
@@ -187,22 +188,23 @@ title: Working examples
[pybind11 python_example]: https://github.com/pybind/python_example [pybind11 python_example]: https://github.com/pybind/python_example
[sourmash]: https://github.com/dib-lab/sourmash [sourmash]: https://github.com/dib-lab/sourmash
[abess]: https://github.com/abess-team/abess [abess]: https://github.com/abess-team/abess
[cyvcf2]: https://github.com/brentp/cyvcf2
[matrixprofile]: https://github.com/matrix-profile-foundation/matrixprofile [matrixprofile]: https://github.com/matrix-profile-foundation/matrixprofile
[cyvcf2]: https://github.com/brentp/cyvcf2
[jq.py]: https://github.com/mwilliamson/jq.py [jq.py]: https://github.com/mwilliamson/jq.py
[iminuit]: https://github.com/scikit-hep/iminuit [iminuit]: https://github.com/scikit-hep/iminuit
[Tokenizer]: https://github.com/OpenNMT/Tokenizer [Tokenizer]: https://github.com/OpenNMT/Tokenizer
[keyvi]: https://github.com/KeyviDev/keyvi
[PyGLM]: https://github.com/Zuzu-Typ/PyGLM [PyGLM]: https://github.com/Zuzu-Typ/PyGLM
[TgCrypto]: https://github.com/pyrogram/tgcrypto
[pillow-heif]: https://github.com/bigcat88/pillow_heif [pillow-heif]: https://github.com/bigcat88/pillow_heif
[iDynTree]: https://github.com/robotology/idyntree [TgCrypto]: https://github.com/pyrogram/tgcrypto
[bx-python]: https://github.com/bxlab/bx-python [bx-python]: https://github.com/bxlab/bx-python
[iDynTree]: https://github.com/robotology/idyntree
[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
[pybase64]: https://github.com/mayeut/pybase64 [pybase64]: https://github.com/mayeut/pybase64
[power-grid-model]: https://github.com/alliander-opensource/power-grid-model
[fathon]: https://github.com/stfbnc/fathon [fathon]: https://github.com/stfbnc/fathon
[Arbor]: https://github.com/arbor-sim/arbor [Arbor]: https://github.com/arbor-sim/arbor
[power-grid-model]: https://github.com/alliander-opensource/power-grid-model
[Imagecodecs (fork)]: https://github.com/czaki/imagecodecs_build [Imagecodecs (fork)]: https://github.com/czaki/imagecodecs_build
[pybind11 scikit_build_example]: https://github.com/pybind/scikit_build_example [pybind11 scikit_build_example]: https://github.com/pybind/scikit_build_example
[polaroid]: https://github.com/daggy1234/polaroid [polaroid]: https://github.com/daggy1234/polaroid
+1 -1
View File
@@ -12,7 +12,7 @@ stack: python 3.7
init: init:
- cmd: set PATH=C:\Python37;C:\Python37\Scripts;%PATH% - cmd: set PATH=C:\Python37;C:\Python37\Scripts;%PATH%
install: python -m pip install cibuildwheel==2.16.2 install: python -m pip install cibuildwheel==2.16.5
build_script: python -m cibuildwheel --output-dir wheelhouse build_script: python -m cibuildwheel --output-dir wheelhouse
+3 -3
View File
@@ -6,7 +6,7 @@ jobs:
- bash: | - bash: |
set -o errexit set -o errexit
python3 -m pip install --upgrade pip python3 -m pip install --upgrade pip
pip3 install cibuildwheel==2.16.2 pip3 install cibuildwheel==2.16.5
displayName: Install dependencies displayName: Install dependencies
- bash: cibuildwheel --output-dir wheelhouse . - bash: cibuildwheel --output-dir wheelhouse .
displayName: Build wheels displayName: Build wheels
@@ -20,7 +20,7 @@ jobs:
- bash: | - bash: |
set -o errexit set -o errexit
python3 -m pip install --upgrade pip python3 -m pip install --upgrade pip
python3 -m pip install cibuildwheel==2.16.2 python3 -m pip install cibuildwheel==2.16.5
displayName: Install dependencies displayName: Install dependencies
- bash: cibuildwheel --output-dir wheelhouse . - bash: cibuildwheel --output-dir wheelhouse .
displayName: Build wheels displayName: Build wheels
@@ -34,7 +34,7 @@ jobs:
- bash: | - bash: |
set -o errexit set -o errexit
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install cibuildwheel==2.16.2 pip install cibuildwheel==2.16.5
displayName: Install dependencies displayName: Install dependencies
- bash: cibuildwheel --output-dir wheelhouse . - bash: cibuildwheel --output-dir wheelhouse .
displayName: Build wheels displayName: Build wheels
+3 -3
View File
@@ -11,7 +11,7 @@ jobs:
- run: - run:
name: Build the Linux wheels. name: Build the Linux wheels.
command: | command: |
pip3 install --user cibuildwheel==2.16.2 pip3 install --user cibuildwheel==2.16.5
cibuildwheel --output-dir wheelhouse cibuildwheel --output-dir wheelhouse
- store_artifacts: - store_artifacts:
path: wheelhouse/ path: wheelhouse/
@@ -28,7 +28,7 @@ jobs:
- run: - run:
name: Build the Linux aarch64 wheels. name: Build the Linux aarch64 wheels.
command: | command: |
python3 -m pip install --user cibuildwheel==2.16.2 python3 -m pip install --user cibuildwheel==2.16.5
python3 -m cibuildwheel --output-dir wheelhouse python3 -m cibuildwheel --output-dir wheelhouse
- store_artifacts: - store_artifacts:
path: wheelhouse/ path: wheelhouse/
@@ -42,7 +42,7 @@ jobs:
- run: - run:
name: Build the OS X wheels. name: Build the OS X wheels.
command: | command: |
pip3 install cibuildwheel==2.16.2 pip3 install cibuildwheel==2.16.5
cibuildwheel --output-dir wheelhouse cibuildwheel --output-dir wheelhouse
- store_artifacts: - store_artifacts:
path: wheelhouse/ path: wheelhouse/
+1 -1
View File
@@ -1,6 +1,6 @@
build_and_store_wheels: &BUILD_AND_STORE_WHEELS build_and_store_wheels: &BUILD_AND_STORE_WHEELS
install_cibuildwheel_script: install_cibuildwheel_script:
- python -m pip install cibuildwheel==2.16.2 - python -m pip install cibuildwheel==2.16.5
run_cibuildwheel_script: run_cibuildwheel_script:
- cibuildwheel - cibuildwheel
wheels_artifacts: wheels_artifacts:
+1 -1
View File
@@ -1,6 +1,6 @@
build_and_store_wheels: &BUILD_AND_STORE_WHEELS build_and_store_wheels: &BUILD_AND_STORE_WHEELS
install_cibuildwheel_script: install_cibuildwheel_script:
- python -m pip install cibuildwheel==2.16.2 - python -m pip install cibuildwheel==2.16.5
run_cibuildwheel_script: run_cibuildwheel_script:
- cibuildwheel - cibuildwheel
wheels_artifacts: wheels_artifacts:
-20
View File
@@ -1,20 +0,0 @@
name: Build
on: [push, pull_request]
jobs:
build_wheels_macos:
name: Build wheels on macos-11
runs-on: macos-11
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.2
env:
CIBW_ARCHS_MACOS: x86_64 arm64
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-macos
path: ./wheelhouse/*.whl
+3 -2
View File
@@ -16,13 +16,14 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-22.04, windows-2022, macos-11] # macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-22.04, windows-2022, macos-13, macos-14]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Build wheels - name: Build wheels
uses: pypa/cibuildwheel@v2.16.2 uses: pypa/cibuildwheel@v2.16.5
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
+3 -2
View File
@@ -8,13 +8,14 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-20.04, windows-2019, macos-11] # macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-20.04, windows-2019, macos-13, macos-14]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Build wheels - name: Build wheels
uses: pypa/cibuildwheel@v2.16.2 uses: pypa/cibuildwheel@v2.16.5
# env: # env:
# CIBW_SOME_OPTION: value # CIBW_SOME_OPTION: value
# ... # ...
+2 -2
View File
@@ -8,7 +8,7 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-20.04, windows-2019, macos-11] os: [ubuntu-20.04, windows-2019, macos-13, macos-14]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -20,7 +20,7 @@ jobs:
platforms: all platforms: all
- name: Build wheels - name: Build wheels
uses: pypa/cibuildwheel@v2.16.2 uses: pypa/cibuildwheel@v2.16.5
env: env:
# configure cibuildwheel to build native archs ('auto'), and some # configure cibuildwheel to build native archs ('auto'), and some
# emulated ones # emulated ones
+2 -2
View File
@@ -12,7 +12,7 @@ linux:
DOCKER_TLS_CERTDIR: "" DOCKER_TLS_CERTDIR: ""
script: script:
- curl -sSL https://get.docker.com/ | sh - curl -sSL https://get.docker.com/ | sh
- python -m pip install cibuildwheel==2.16.2 - python -m pip install cibuildwheel==2.16.5
- cibuildwheel --output-dir wheelhouse - cibuildwheel --output-dir wheelhouse
artifacts: artifacts:
paths: paths:
@@ -23,7 +23,7 @@ windows:
before_script: before_script:
- choco install python -y --version 3.8.6 - choco install python -y --version 3.8.6
- choco install git.install -y - choco install git.install -y
- py -m pip install cibuildwheel==2.16.2 - py -m pip install cibuildwheel==2.16.5
script: script:
- py -m cibuildwheel --output-dir wheelhouse --platform windows - py -m cibuildwheel --output-dir wheelhouse --platform windows
artifacts: artifacts:
+1 -1
View File
@@ -14,7 +14,7 @@ linux:
- curl -sSL https://get.docker.com/ | sh - curl -sSL https://get.docker.com/ | sh
# Warning: This is extremely slow, be careful with how many wheels you build # Warning: This is extremely slow, be careful with how many wheels you build
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- python -m pip install cibuildwheel==2.16.2 - python -m pip install cibuildwheel==2.16.5
# Assuming your CI runner's default architecture is x86_64... # Assuming your CI runner's default architecture is x86_64...
- cibuildwheel --output-dir wheelhouse --platform linux --archs aarch64 - cibuildwheel --output-dir wheelhouse --platform linux --archs aarch64
artifacts: artifacts:
+1 -1
View File
@@ -20,7 +20,7 @@ jobs:
- ln -s /c/Python38/python.exe /c/Python38/python3.exe - ln -s /c/Python38/python.exe /c/Python38/python3.exe
install: install:
- python3 -m pip install cibuildwheel==2.16.2 - python3 -m pip install cibuildwheel==2.16.5
script: script:
# build the wheels, put them into './dist' # build the wheels, put them into './dist'
+1 -1
View File
@@ -26,7 +26,7 @@ jobs:
- ln -s /c/Python38/python.exe /c/Python38/python3.exe - ln -s /c/Python38/python.exe /c/Python38/python3.exe
install: install:
- python3 -m pip install cibuildwheel==2.16.2 - python3 -m pip install cibuildwheel==2.16.5
script: script:
# build the wheels, put them into './wheelhouse' # build the wheels, put them into './wheelhouse'
+2 -2
View File
@@ -54,7 +54,7 @@ jobs:
- stage: deploy - stage: deploy
name: Build and deploy Linux wheels name: Build and deploy Linux wheels
services: docker services: docker
install: python3 -m pip install cibuildwheel==2.16.2 twine install: python3 -m pip install cibuildwheel==2.16.5 twine
script: python3 -m cibuildwheel --output-dir wheelhouse script: python3 -m cibuildwheel --output-dir wheelhouse
after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl
# Deploy on windows # Deploy on windows
@@ -62,7 +62,7 @@ jobs:
name: Build and deploy Windows wheels name: Build and deploy Windows wheels
os: windows os: windows
language: shell language: shell
install: python3 -m pip install cibuildwheel==2.16.2 twine install: python3 -m pip install cibuildwheel==2.16.5 twine
script: python3 -m cibuildwheel --output-dir wheelhouse script: python3 -m cibuildwheel --output-dir wheelhouse
after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl
+4 -2
View File
@@ -15,7 +15,7 @@ log_cli_level = "info"
[tool.mypy] [tool.mypy]
python_version = 3.8 python_version = "3.8"
files = [ files = [
"cibuildwheel/*.py", "cibuildwheel/*.py",
"test/**/*.py", "test/**/*.py",
@@ -24,7 +24,6 @@ files = [
"noxfile.py", "noxfile.py",
] ]
warn_unused_configs = true warn_unused_configs = true
show_error_codes = true
warn_redundant_casts = true warn_redundant_casts = true
no_implicit_reexport = true no_implicit_reexport = true
@@ -163,3 +162,6 @@ flake8-unused-arguments.ignore-variadic-names = true
[tool.ruff.lint.per-file-ignores] [tool.ruff.lint.per-file-ignores]
"unit_test/*" = ["PLC1901"] "unit_test/*" = ["PLC1901"]
"cibuildwheel/_compat/**.py" = ["TID251"] "cibuildwheel/_compat/**.py" = ["TID251"]
[tool.repo-review]
ignore = ["PC170", "PP303"]
+1 -1
View File
@@ -1,6 +1,6 @@
[metadata] [metadata]
name = cibuildwheel name = cibuildwheel
version = 2.16.2 version = 2.16.5
description = Build Python wheels on CI with minimal configuration. description = Build Python wheels on CI with minimal configuration.
long_description = file: README.md long_description = file: README.md
long_description_content_type = text/markdown long_description_content_type = text/markdown
+14 -1
View File
@@ -61,10 +61,23 @@ def test_simple(tmp_path):
sdist_dir.mkdir() sdist_dir.mkdir()
sdist_path = make_sdist(basic_project, sdist_dir) sdist_path = make_sdist(basic_project, sdist_dir)
setup_py_assertion_snippet = textwrap.dedent(
"""
import os
assert os.path.exists('setup.py')
assert os.path.exists('{package}/setup.py')
""",
)
setup_py_assertion_cmd = f'python3 -c "{setup_py_assertion_snippet !s}"'
# build the wheels from sdist # build the wheels from sdist
actual_wheels = cibuildwheel_from_sdist_run( actual_wheels = cibuildwheel_from_sdist_run(
sdist_path, sdist_path,
add_env={"CIBW_BUILD": "cp39-*"}, add_env={
"CIBW_BEFORE_BUILD": setup_py_assertion_cmd,
"CIBW_BUILD": "cp39-*",
},
) )
# check that the expected wheels are produced # check that the expected wheels are produced
+33 -4
View File
@@ -83,7 +83,7 @@ def test_cross_compiled_test(tmp_path, capfd, build_universal2):
assert "running tests on arm64" not in captured.out assert "running tests on arm64" not in captured.out
if build_universal2: if build_universal2:
assert ( assert (
"While universal2 wheels can be built on x86_64, the arm64 part of them cannot currently be tested" "While universal2 wheels can be built on x86_64, the arm64 part of the wheel cannot be tested"
in captured.err in captured.err
) )
else: else:
@@ -95,7 +95,7 @@ def test_cross_compiled_test(tmp_path, capfd, build_universal2):
assert "running tests on x86_64" in captured.out assert "running tests on x86_64" in captured.out
assert "running tests on arm64" in captured.out assert "running tests on arm64" in captured.out
assert ( assert (
"While universal2 wheels can be built on x86_64, the arm64 part of them cannot currently be tested" "While universal2 wheels can be built on x86_64, the arm64 part of the wheel cannot be tested"
not in captured.err not in captured.err
) )
assert ( assert (
@@ -135,7 +135,7 @@ def test_deployment_target_warning_is_firing(tmp_path, capfd):
@pytest.mark.parametrize("skip_arm64_test", [False, True]) @pytest.mark.parametrize("skip_arm64_test", [False, True])
def test_universal2_testing(tmp_path, capfd, skip_arm64_test): def test_universal2_testing_on_x86_64(tmp_path, capfd, skip_arm64_test):
if utils.platform != "macos": if utils.platform != "macos":
pytest.skip("this test is only relevant to macos") pytest.skip("this test is only relevant to macos")
if get_xcode_version() < (12, 2): if get_xcode_version() < (12, 2):
@@ -162,7 +162,7 @@ def test_universal2_testing(tmp_path, capfd, skip_arm64_test):
assert "running tests on x86_64" in captured.out assert "running tests on x86_64" in captured.out
assert "running tests on arm64" not in captured.out assert "running tests on arm64" not in captured.out
warning_message = "While universal2 wheels can be built on x86_64, the arm64 part of them cannot currently be tested" warning_message = "While universal2 wheels can be built on x86_64, the arm64 part of the wheel cannot be tested"
if skip_arm64_test: if skip_arm64_test:
assert warning_message not in captured.err assert warning_message not in captured.err
else: else:
@@ -173,6 +173,35 @@ def test_universal2_testing(tmp_path, capfd, skip_arm64_test):
assert set(actual_wheels) == set(expected_wheels) assert set(actual_wheels) == set(expected_wheels)
def test_universal2_testing_on_arm64(tmp_path, capfd):
# cibuildwheel should test the universal2 wheel on both x86_64 and arm64, when run on arm64
if utils.platform != "macos":
pytest.skip("this test is only relevant to macos")
if platform.machine() != "arm64":
pytest.skip("this test only works on arm64")
project_dir = tmp_path / "project"
basic_project.generate(project_dir)
actual_wheels = utils.cibuildwheel_run(
project_dir,
add_env={
"CIBW_BUILD": "cp39-*",
"CIBW_ARCHS": "universal2",
# check that a native dependency is correctly installed, once per each testing arch
"CIBW_TEST_REQUIRES": "numpy",
"CIBW_TEST_COMMAND": '''python -c "import numpy, platform; print(f'running tests on {platform.machine()} with numpy {numpy.__version__}')"''',
},
)
captured = capfd.readouterr()
assert "running tests on arm64" in captured.out
assert "running tests on x86_64" in captured.out
expected_wheels = [w for w in ALL_MACOS_WHEELS if "cp39" in w and "universal2" in w]
assert set(actual_wheels) == set(expected_wheels)
def test_cp38_arm64_testing(tmp_path, capfd): def test_cp38_arm64_testing(tmp_path, capfd):
if utils.platform != "macos": if utils.platform != "macos":
pytest.skip("this test is only relevant to macos") pytest.skip("this test is only relevant to macos")
+27 -1
View File
@@ -14,7 +14,7 @@ import tomli_w
from cibuildwheel.environment import EnvironmentAssignmentBash from cibuildwheel.environment import EnvironmentAssignmentBash
from cibuildwheel.oci_container import OCIContainer, OCIContainerEngineConfig from cibuildwheel.oci_container import OCIContainer, OCIContainerEngineConfig
from cibuildwheel.util import detect_ci_provider from cibuildwheel.util import CIProvider, detect_ci_provider
# Test utilities # Test utilities
@@ -415,3 +415,29 @@ def test_enforce_32_bit(container_engine, image, shell_args):
text=True, text=True,
).stdout ).stdout
assert json.loads(container_args) == shell_args assert json.loads(container_args) == shell_args
@pytest.mark.parametrize(
("config", "should_have_host_mount"),
[
("{name}", True),
("{name}; disable_host_mount: false", True),
("{name}; disable_host_mount: true", False),
],
)
def test_disable_host_mount(tmp_path: Path, container_engine, config, should_have_host_mount):
if detect_ci_provider() in {CIProvider.circle_ci, CIProvider.gitlab}:
pytest.skip("Skipping test because docker on this platform does not support host mounts")
engine = OCIContainerEngineConfig.from_config_string(config.format(name=container_engine.name))
sentinel_file = tmp_path / "sentinel"
sentinel_file.write_text("12345")
with OCIContainer(engine=engine, image=DEFAULT_IMAGE) as container:
host_mount_path = "/host" + str(sentinel_file)
if should_have_host_mount:
assert container.call(["cat", host_mount_path], capture_output=True) == "12345"
else:
with pytest.raises(subprocess.CalledProcessError):
container.call(["cat", host_mount_path], capture_output=True)
+23 -2
View File
@@ -201,41 +201,61 @@ def test_toml_environment_quoting(tmp_path: Path, toml_assignment, result_value)
@pytest.mark.parametrize( @pytest.mark.parametrize(
("toml_assignment", "result_name", "result_create_args"), ("toml_assignment", "result_name", "result_create_args", "result_disable_host_mount"),
[ [
( (
'container-engine = "podman"', 'container-engine = "podman"',
"podman", "podman",
[], [],
False,
), ),
( (
'container-engine = {name = "podman"}', 'container-engine = {name = "podman"}',
"podman", "podman",
[], [],
False,
), ),
( (
'container-engine = "docker; create_args: --some-option"', 'container-engine = "docker; create_args: --some-option"',
"docker", "docker",
["--some-option"], ["--some-option"],
False,
), ),
( (
'container-engine = {name = "docker", create-args = ["--some-option"]}', 'container-engine = {name = "docker", create-args = ["--some-option"]}',
"docker", "docker",
["--some-option"], ["--some-option"],
False,
), ),
( (
'container-engine = {name = "docker", create-args = ["--some-option", "value that contains spaces"]}', 'container-engine = {name = "docker", create-args = ["--some-option", "value that contains spaces"]}',
"docker", "docker",
["--some-option", "value that contains spaces"], ["--some-option", "value that contains spaces"],
False,
), ),
( (
'container-engine = {name = "docker", create-args = ["--some-option", "value;that;contains;semicolons"]}', 'container-engine = {name = "docker", create-args = ["--some-option", "value;that;contains;semicolons"]}',
"docker", "docker",
["--some-option", "value;that;contains;semicolons"], ["--some-option", "value;that;contains;semicolons"],
False,
),
(
'container-engine = {name = "docker", disable-host-mount = true}',
"docker",
[],
True,
),
(
'container-engine = {name = "docker", disable_host_mount = true}',
"docker",
[],
True,
), ),
], ],
) )
def test_container_engine_option(tmp_path: Path, toml_assignment, result_name, result_create_args): def test_container_engine_option(
tmp_path: Path, toml_assignment, result_name, result_create_args, result_disable_host_mount
):
args = CommandLineArguments.defaults() args = CommandLineArguments.defaults()
args.package_dir = tmp_path args.package_dir = tmp_path
@@ -253,6 +273,7 @@ def test_container_engine_option(tmp_path: Path, toml_assignment, result_name, r
assert parsed_container_engine.name == result_name assert parsed_container_engine.name == result_name
assert parsed_container_engine.create_args == result_create_args assert parsed_container_engine.create_args == result_create_args
assert parsed_container_engine.disable_host_mount == result_disable_host_mount
def test_environment_pass_references(): def test_environment_pass_references():