diff --git a/.cirrus.yml b/.cirrus.yml index 4ba969ea2..e6c502f92 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,3 +1,5 @@ +skip: changesIncludeOnly('docs/*', '.pre-commit-config.yaml') + run_tests: &RUN_TESTS install_cibuildwheel_script: - python -m pip install -e ".[dev]" pytest-custom-exit-code diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 94f65c05d..99e6b784a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,6 +7,7 @@ on: pull_request: paths-ignore: - 'docs/**' + - .pre-commit-config.yaml workflow_dispatch: # allow manual runs on branches without a PR diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b1de3c5bb..e66479bba 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,25 +13,25 @@ repos: - id: mixed-line-ending - id: trailing-whitespace -- repo: https://github.com/psf/black - rev: 23.3.0 +- repo: https://github.com/psf/black-pre-commit-mirror + rev: 23.7.0 hooks: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.275 + rev: v0.0.285 hooks: - id: ruff args: ["--fix", "--show-fixes"] - repo: https://github.com/asottile/setup-cfg-fmt - rev: v2.3.0 + rev: v2.4.0 hooks: - id: setup-cfg-fmt - args: [--include-version-classifiers, --max-py-version=3.11] + args: [--include-version-classifiers, --min-py-version=3.8, --max-py-version=3.11] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.4.1 + rev: v1.5.1 hooks: - id: mypy name: mypy 3.8 on cibuildwheel/ diff --git a/README.md b/README.md index 003bf4c81..969068e66 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ What does it do? ² Windows arm64 support is experimental.
³ 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.
⁴ Cross-compilation not supported with PyPy - to build these wheels you need to run cibuildwheel on an Apple Silicon machine.
-⁵ CPython 3.12 is available using the [CIBW_PRERELEASE_PYTHONS](https://cibuildwheel.readthedocs.io/en/stable/options/#prerelease-pythons) option.
+⁵ CPython 3.12 is built by default using Python RCs, starting with cibuildwheel 2.15.
- 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 @@ -98,7 +98,7 @@ jobs: - uses: actions/setup-python@v3 - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.13.1 + run: python -m pip install cibuildwheel==2.15.0 - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse @@ -164,7 +164,7 @@ Here are some repos that use cibuildwheel. | [scikit-learn][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The machine learning library. A complex but clean config using many of cibuildwheel's features to build a large project with Cython and C++ extensions. | | [pytorch-fairseq][] | ![github icon][] | ![apple icon][] ![linux icon][] | Facebook AI Research Sequence-to-Sequence Toolkit written in Python. | | [NumPy][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The fundamental package for scientific computing with Python. | -| [Tornado][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. | +| [Tornado][] | ![github icon][] | ![linux icon][] ![apple icon][] ![windows icon][] | Tornado is a Python web framework and asynchronous networking library. Uses stable ABI for a small C extension. | | [Matplotlib][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The venerable Matplotlib, a Python library with C++ portions | | [NCNN][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | ncnn is a high-performance neural network inference framework optimized for the mobile platform | | [Prophet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth. | @@ -214,42 +214,45 @@ Changelog -### v2.13.1 +### v2.15.0 -_10 June 2023_ +_8 August 2023_ -- 🛠 Updates the prerelease CPython 3.12 version to 3.12.0b2. (#1516) -- 🛠 Adds a moving `v.` tag for use in GitHub Actions workflow files. If you use this, you'll get the latest patch release within a minor version. Additionally, Dependabot won't send you PRs for patch releases. (#1517) +- 🌟 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.13.0 +### v2.14.1 -_28 May 2023_ +_15 July 2023_ -- ✨ Adds CPython 3.12 support, under the prerelease flag [CIBW_PRERELEASE_PYTHONS](https://cibuildwheel.readthedocs.io/en/stable/options/#prerelease-pythons). This version of cibuildwheel uses 3.12.0b1. +- 🛠 Updates the prerelease CPython 3.12 version to 3.12.0b4 (#1550) - While CPython is in beta, the ABI can change, so your wheels might not be compatible with the final release. For this reason, we don't recommend distributing wheels until RC1, at which point 3.12 will be available in cibuildwheel without the flag. (#1507) +### v2.14.0 -- ✨ Adds the ability to pass arguments to the container engine when the container is created, using the [CIBW_CONTAINER_ENGINE](https://cibuildwheel.readthedocs.io/en/stable/options/#container-engine) option. (#1499) +_10 July 2023_ -### v2.12.3 +- ✨ Adds support for building PyPy 3.10 wheels. (#1525) +- 🛠 Updates the prerelease CPython 3.12 version to 3.12.0b3. +- ✨ Allow the use of the `{wheel}` placeholder in CIBW_TEST_COMMAND (#1533) +- 📚 Docs & examples updates (#1532, #1416) +- ⚠️ Removed support for running cibuildwheel in Python 3.7. Python 3.7 is EOL. However, cibuildwheel continues to build Python 3.7 wheels for the moment. (#1175) -_19 April 2023_ +### v2.13.1 -- 🐛 Fix an import error when running on Python 3.7. (#1479) +_10 June 2023_ -### v2.12.2 +- 🛠 Updates the prerelease CPython 3.12 version to 3.12.0b2. (#1516) +- 🛠 Adds a moving `v.` tag for use in GitHub Actions workflow files. If you use this, you'll get the latest patch release within a minor version. Additionally, Dependabot won't send you PRs for patch releases. (#1517) -_18 April 2023_ +### v2.13.0 -- 🐛 Fix a bug that caused an extra empty config-setting to be passed to the backend when CIBW_BUILD_FRONTEND is set to `build`. (#1474) -- 🐛 Fix a crash that occurred when overwriting an existing wheel on Windows. (#1464) -- 🛠 Pinned version updates, including CPython 3.10.11, 3.11.3, pip 23.1 and wheel 0.40.0. +_28 May 2023_ -### v2.12.1 +- ✨ Adds CPython 3.12 support, under the prerelease flag [CIBW_PRERELEASE_PYTHONS](https://cibuildwheel.readthedocs.io/en/stable/options/#prerelease-pythons). This version of cibuildwheel uses 3.12.0b1. -_11 March 2023_ + While CPython is in beta, the ABI can change, so your wheels might not be compatible with the final release. For this reason, we don't recommend distributing wheels until RC1, at which point 3.12 will be available in cibuildwheel without the flag. (#1507) -- 🐛 Fix a bug that prevented the use of CIBW_CONFIG_SETTINGS with the 'pip' build backend. (#1430) +- ✨ Adds the ability to pass arguments to the container engine when the container is created, using the [CIBW_CONTAINER_ENGINE](https://cibuildwheel.readthedocs.io/en/stable/options/#container-engine) option. (#1499) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ee0d47471..4f3570641 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,3 +1,9 @@ +pr: + paths: + exclude: + - docs/* + - .pre-commit-config.yaml + jobs: - job: linux_38 timeoutInMinutes: 120 diff --git a/bin/bump_version.py b/bin/bump_version.py index 2af6e37d8..cf0727db7 100755 --- a/bin/bump_version.py +++ b/bin/bump_version.py @@ -60,7 +60,7 @@ def bump_version() -> None: print(e) print("Failed to get previous version tag information.") - git_changes_result = subprocess.run(["git diff-index --quiet HEAD --"], shell=True) + git_changes_result = subprocess.run(["git diff-index --quiet HEAD --"], shell=True, check=False) repo_has_uncommitted_changes = git_changes_result.returncode != 0 if repo_has_uncommitted_changes: @@ -142,7 +142,8 @@ def bump_version() -> None: "pre-commit", "run", "--files=docs/changelog.md", - ] + ], + check=False, ) # run pre-commit to check that no errors occurred on the second run diff --git a/bin/make_dependency_update_pr.py b/bin/make_dependency_update_pr.py index be8a57ad5..cfbdef913 100755 --- a/bin/make_dependency_update_pr.py +++ b/bin/make_dependency_update_pr.py @@ -12,13 +12,13 @@ import click -def shell(cmd, **kwargs): - return run([cmd], shell=True, **kwargs) +def shell(cmd, *, check: bool, **kwargs): + return run([cmd], shell=True, check=check, **kwargs) def git_repo_has_changes(): - unstaged_changes = shell("git diff-index --quiet HEAD --").returncode != 0 - staged_changes = shell("git diff-index --quiet --cached HEAD --").returncode != 0 + unstaged_changes = shell("git diff-index --quiet HEAD --", check=False).returncode != 0 + staged_changes = shell("git diff-index --quiet --cached HEAD --", check=False).returncode != 0 return unstaged_changes or staged_changes @@ -73,7 +73,7 @@ def main(): print("Done.") finally: # remove any local changes - shell("git checkout -- .") + shell("git checkout -- .", check=True) shell(f"git checkout {previous_branch}", check=True) shell(f"git branch -D --force {branch_name}", check=True) diff --git a/bin/run_example_ci_configs.py b/bin/run_example_ci_configs.py index 07f3a6cde..ef3c6eaad 100755 --- a/bin/run_example_ci_configs.py +++ b/bin/run_example_ci_configs.py @@ -16,13 +16,13 @@ import click -def shell(cmd, **kwargs): - return run([cmd], shell=True, **kwargs) +def shell(cmd, *, check: bool, **kwargs): + return run([cmd], shell=True, check=check, **kwargs) def git_repo_has_changes(): - unstaged_changes = shell("git diff-index --quiet HEAD --").returncode != 0 - staged_changes = shell("git diff-index --quiet --cached HEAD --").returncode != 0 + unstaged_changes = shell("git diff-index --quiet HEAD --", check=False).returncode != 0 + staged_changes = shell("git diff-index --quiet --cached HEAD --", check=False).returncode != 0 return unstaged_changes or staged_changes @@ -163,7 +163,7 @@ def run_example_ci_configs(config_files=None): finally: # remove any local changes shutil.rmtree(example_project, ignore_errors=True) - shell("git checkout -- .") + shell("git checkout -- .", check=True) shell(f"git checkout {previous_branch}", check=True) shell(f"git branch -D --force {branch_name}", check=True) diff --git a/bin/sample_build.py b/bin/sample_build.py index 90c636ed6..9e8e64204 100755 --- a/bin/sample_build.py +++ b/bin/sample_build.py @@ -24,4 +24,8 @@ check=True, ) - sys.exit(subprocess.run([sys.executable, "-m", "cibuildwheel"], cwd=project_dir).returncode) + sys.exit( + subprocess.run( + [sys.executable, "-m", "cibuildwheel"], cwd=project_dir, check=False + ).returncode + ) diff --git a/bin/update_docker.py b/bin/update_docker.py index fa91cd009..9be3ae03d 100755 --- a/bin/update_docker.py +++ b/bin/update_docker.py @@ -59,6 +59,12 @@ class Image: Image("musllinux_1_1", "aarch64", "quay.io/pypa/musllinux_1_1_aarch64", None), Image("musllinux_1_1", "ppc64le", "quay.io/pypa/musllinux_1_1_ppc64le", None), Image("musllinux_1_1", "s390x", "quay.io/pypa/musllinux_1_1_s390x", None), + # musllinux_1_2 images + Image("musllinux_1_2", "x86_64", "quay.io/pypa/musllinux_1_2_x86_64", None), + Image("musllinux_1_2", "i686", "quay.io/pypa/musllinux_1_2_i686", None), + Image("musllinux_1_2", "aarch64", "quay.io/pypa/musllinux_1_2_aarch64", None), + Image("musllinux_1_2", "ppc64le", "quay.io/pypa/musllinux_1_2_ppc64le", None), + Image("musllinux_1_2", "s390x", "quay.io/pypa/musllinux_1_2_s390x", None), ] config = configparser.ConfigParser() diff --git a/bin/update_how_it_works_image.py b/bin/update_how_it_works_image.py index b7b433fb6..39ecfec9b 100755 --- a/bin/update_how_it_works_image.py +++ b/bin/update_how_it_works_image.py @@ -19,7 +19,7 @@ def main(): - subprocess.run(["mkdocs", "build"]) + subprocess.run(["mkdocs", "build"], check=True) hti = Html2Image(custom_flags=["--force-device-scale-factor=2"]) diff --git a/cibuildwheel/__init__.py b/cibuildwheel/__init__.py index 33607129f..79a44705c 100644 --- a/cibuildwheel/__init__.py +++ b/cibuildwheel/__init__.py @@ -1,3 +1,3 @@ from __future__ import annotations -__version__ = "2.13.1" +__version__ = "2.15.0" diff --git a/cibuildwheel/linux.py b/cibuildwheel/linux.py index 88bd201b5..a4d7c184d 100644 --- a/cibuildwheel/linux.py +++ b/cibuildwheel/linux.py @@ -185,7 +185,7 @@ def build_in_container( constraints_file = build_options.dependency_constraints.get_for_python_version( config.version ) - container_constraints_file = PurePath("/constraints.txt") + container_constraints_file = PurePosixPath("/constraints.txt") container.copy_into(constraints_file, container_constraints_file) dependency_constraint_flags = ["-c", container_constraints_file] diff --git a/cibuildwheel/options.py b/cibuildwheel/options.py index fd6fabfe1..581e576b8 100644 --- a/cibuildwheel/options.py +++ b/cibuildwheel/options.py @@ -450,6 +450,7 @@ def globals(self) -> GlobalOptions: build_config = args.only skip_config = "" architectures = Architecture.all_archs(self.platform) + prerelease_pythons = True build_selector = BuildSelector( build_config=build_config, diff --git a/cibuildwheel/resources/build-platforms.toml b/cibuildwheel/resources/build-platforms.toml index ed53715f7..33d3c26d6 100644 --- a/cibuildwheel/resources/build-platforms.toml +++ b/cibuildwheel/resources/build-platforms.toml @@ -100,9 +100,9 @@ python_configurations = [ { identifier = "cp311-macosx_x86_64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.4/python-3.11.4-macos11.pkg" }, { identifier = "cp311-macosx_arm64", version = "3.11", url = "https://www.python.org/ftp/python/3.11.4/python-3.11.4-macos11.pkg" }, { identifier = "cp311-macosx_universal2", version = "3.11", url = "https://www.python.org/ftp/python/3.11.4/python-3.11.4-macos11.pkg" }, - { identifier = "cp312-macosx_x86_64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.0/python-3.12.0b3-macos11.pkg" }, - { identifier = "cp312-macosx_arm64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.0/python-3.12.0b3-macos11.pkg" }, - { identifier = "cp312-macosx_universal2", version = "3.12", url = "https://www.python.org/ftp/python/3.12.0/python-3.12.0b3-macos11.pkg" }, + { identifier = "cp312-macosx_x86_64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.0/python-3.12.0rc1-macos11.pkg" }, + { identifier = "cp312-macosx_arm64", version = "3.12", url = "https://www.python.org/ftp/python/3.12.0/python-3.12.0rc1-macos11.pkg" }, + { identifier = "cp312-macosx_universal2", version = "3.12", url = "https://www.python.org/ftp/python/3.12.0/python-3.12.0rc1-macos11.pkg" }, { identifier = "pp37-macosx_x86_64", version = "3.7", url = "https://downloads.python.org/pypy/pypy3.7-v7.3.9-osx64.tar.bz2" }, { identifier = "pp38-macosx_x86_64", version = "3.8", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-macos_x86_64.tar.bz2" }, { identifier = "pp38-macosx_arm64", version = "3.8", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-macos_arm64.tar.bz2" }, @@ -126,12 +126,12 @@ python_configurations = [ { identifier = "cp310-win_amd64", version = "3.10.11", arch = "64" }, { identifier = "cp311-win32", version = "3.11.4", arch = "32" }, { identifier = "cp311-win_amd64", version = "3.11.4", arch = "64" }, - { identifier = "cp312-win32", version = "3.12.0-b3", arch = "32" }, - { identifier = "cp312-win_amd64", version = "3.12.0-b3", arch = "64" }, + { identifier = "cp312-win32", version = "3.12.0-rc1", arch = "32" }, + { identifier = "cp312-win_amd64", version = "3.12.0-rc1", arch = "64" }, { identifier = "cp39-win_arm64", version = "3.9.10", arch = "ARM64" }, { identifier = "cp310-win_arm64", version = "3.10.11", arch = "ARM64" }, { identifier = "cp311-win_arm64", version = "3.11.4", arch = "ARM64" }, - { identifier = "cp312-win_arm64", version = "3.12.0-b3", arch = "ARM64" }, + { identifier = "cp312-win_arm64", version = "3.12.0-rc1", arch = "ARM64" }, { identifier = "pp37-win_amd64", version = "3.7", arch = "64", url = "https://downloads.python.org/pypy/pypy3.7-v7.3.9-win64.zip" }, { identifier = "pp38-win_amd64", version = "3.8", arch = "64", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-win64.zip" }, { identifier = "pp39-win_amd64", version = "3.9", arch = "64", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.12-win64.zip" }, diff --git a/cibuildwheel/resources/constraints-python310.txt b/cibuildwheel/resources/constraints-python310.txt index 9b6bbf837..02a99d2bc 100644 --- a/cibuildwheel/resources/constraints-python310.txt +++ b/cibuildwheel/resources/constraints-python310.txt @@ -6,23 +6,23 @@ # delocate==0.10.4 # via -r cibuildwheel/resources/constraints.in -distlib==0.3.6 +distlib==0.3.7 # via virtualenv filelock==3.12.2 # via virtualenv packaging==23.1 # via delocate -platformdirs==3.8.0 +platformdirs==3.10.0 # via virtualenv typing-extensions==4.7.1 # via delocate -virtualenv==20.23.1 +virtualenv==20.24.3 # via -r cibuildwheel/resources/constraints.in -wheel==0.40.0 +wheel==0.41.1 # via -r cibuildwheel/resources/constraints.in # The following packages are considered to be unsafe in a requirements file: -pip==23.1.2 +pip==23.2.1 # via -r cibuildwheel/resources/constraints.in -setuptools==68.0.0 +setuptools==68.1.2 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints-python311.txt b/cibuildwheel/resources/constraints-python311.txt index 3728ede4a..4236f3ec6 100644 --- a/cibuildwheel/resources/constraints-python311.txt +++ b/cibuildwheel/resources/constraints-python311.txt @@ -6,23 +6,23 @@ # delocate==0.10.4 # via -r cibuildwheel/resources/constraints.in -distlib==0.3.6 +distlib==0.3.7 # via virtualenv filelock==3.12.2 # via virtualenv packaging==23.1 # via delocate -platformdirs==3.8.0 +platformdirs==3.10.0 # via virtualenv typing-extensions==4.7.1 # via delocate -virtualenv==20.23.1 +virtualenv==20.24.3 # via -r cibuildwheel/resources/constraints.in -wheel==0.40.0 +wheel==0.41.1 # via -r cibuildwheel/resources/constraints.in # The following packages are considered to be unsafe in a requirements file: -pip==23.1.2 +pip==23.2.1 # via -r cibuildwheel/resources/constraints.in -setuptools==68.0.0 +setuptools==68.1.2 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints-python312.txt b/cibuildwheel/resources/constraints-python312.txt index 3d1260a26..8de5466f9 100644 --- a/cibuildwheel/resources/constraints-python312.txt +++ b/cibuildwheel/resources/constraints-python312.txt @@ -6,23 +6,23 @@ # delocate==0.10.4 # via -r cibuildwheel/resources/constraints.in -distlib==0.3.6 +distlib==0.3.7 # via virtualenv filelock==3.12.2 # via virtualenv packaging==23.1 # via delocate -platformdirs==3.8.0 +platformdirs==3.10.0 # via virtualenv typing-extensions==4.7.1 # via delocate -virtualenv==20.23.1 +virtualenv==20.24.3 # via -r cibuildwheel/resources/constraints.in -wheel==0.40.0 +wheel==0.41.1 # via -r cibuildwheel/resources/constraints.in # The following packages are considered to be unsafe in a requirements file: -pip==23.1.2 +pip==23.2.1 # via -r cibuildwheel/resources/constraints.in -setuptools==68.0.0 +setuptools==68.1.2 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints-python37.txt b/cibuildwheel/resources/constraints-python37.txt index 9f0559796..7acc677bf 100644 --- a/cibuildwheel/resources/constraints-python37.txt +++ b/cibuildwheel/resources/constraints-python37.txt @@ -6,7 +6,7 @@ # delocate==0.10.4 # via -r cibuildwheel/resources/constraints.in -distlib==0.3.6 +distlib==0.3.7 # via virtualenv filelock==3.12.2 # via virtualenv @@ -14,22 +14,22 @@ importlib-metadata==6.7.0 # via virtualenv packaging==23.1 # via delocate -platformdirs==3.8.0 +platformdirs==3.10.0 # via virtualenv typing-extensions==4.7.1 # via # delocate # importlib-metadata # platformdirs -virtualenv==20.23.1 +virtualenv==20.24.3 # via -r cibuildwheel/resources/constraints.in -wheel==0.40.0 +wheel==0.41.1 # via -r cibuildwheel/resources/constraints.in zipp==3.15.0 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: -pip==23.1.2 +pip==23.2.1 # via -r cibuildwheel/resources/constraints.in setuptools==68.0.0 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints-python38.txt b/cibuildwheel/resources/constraints-python38.txt index 4a0bfa45d..fa8eb6558 100644 --- a/cibuildwheel/resources/constraints-python38.txt +++ b/cibuildwheel/resources/constraints-python38.txt @@ -6,23 +6,23 @@ # delocate==0.10.4 # via -r cibuildwheel/resources/constraints.in -distlib==0.3.6 +distlib==0.3.7 # via virtualenv filelock==3.12.2 # via virtualenv packaging==23.1 # via delocate -platformdirs==3.8.0 +platformdirs==3.10.0 # via virtualenv typing-extensions==4.7.1 # via delocate -virtualenv==20.23.1 +virtualenv==20.24.3 # via -r cibuildwheel/resources/constraints.in -wheel==0.40.0 +wheel==0.41.1 # via -r cibuildwheel/resources/constraints.in # The following packages are considered to be unsafe in a requirements file: -pip==23.1.2 +pip==23.2.1 # via -r cibuildwheel/resources/constraints.in -setuptools==68.0.0 +setuptools==68.1.2 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints-python39.txt b/cibuildwheel/resources/constraints-python39.txt index dce0fea62..58870b808 100644 --- a/cibuildwheel/resources/constraints-python39.txt +++ b/cibuildwheel/resources/constraints-python39.txt @@ -6,23 +6,23 @@ # delocate==0.10.4 # via -r cibuildwheel/resources/constraints.in -distlib==0.3.6 +distlib==0.3.7 # via virtualenv filelock==3.12.2 # via virtualenv packaging==23.1 # via delocate -platformdirs==3.8.0 +platformdirs==3.10.0 # via virtualenv typing-extensions==4.7.1 # via delocate -virtualenv==20.23.1 +virtualenv==20.24.3 # via -r cibuildwheel/resources/constraints.in -wheel==0.40.0 +wheel==0.41.1 # via -r cibuildwheel/resources/constraints.in # The following packages are considered to be unsafe in a requirements file: -pip==23.1.2 +pip==23.2.1 # via -r cibuildwheel/resources/constraints.in -setuptools==68.0.0 +setuptools==68.1.2 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/constraints.txt b/cibuildwheel/resources/constraints.txt index 3d1260a26..8de5466f9 100644 --- a/cibuildwheel/resources/constraints.txt +++ b/cibuildwheel/resources/constraints.txt @@ -6,23 +6,23 @@ # delocate==0.10.4 # via -r cibuildwheel/resources/constraints.in -distlib==0.3.6 +distlib==0.3.7 # via virtualenv filelock==3.12.2 # via virtualenv packaging==23.1 # via delocate -platformdirs==3.8.0 +platformdirs==3.10.0 # via virtualenv typing-extensions==4.7.1 # via delocate -virtualenv==20.23.1 +virtualenv==20.24.3 # via -r cibuildwheel/resources/constraints.in -wheel==0.40.0 +wheel==0.41.1 # via -r cibuildwheel/resources/constraints.in # The following packages are considered to be unsafe in a requirements file: -pip==23.1.2 +pip==23.2.1 # via -r cibuildwheel/resources/constraints.in -setuptools==68.0.0 +setuptools==68.1.2 # via -r cibuildwheel/resources/constraints.in diff --git a/cibuildwheel/resources/pinned_docker_images.cfg b/cibuildwheel/resources/pinned_docker_images.cfg index c7e7993b1..0ec09d169 100644 --- a/cibuildwheel/resources/pinned_docker_images.cfg +++ b/cibuildwheel/resources/pinned_docker_images.cfg @@ -1,49 +1,54 @@ [x86_64] -manylinux1 = quay.io/pypa/manylinux1_x86_64:2023-06-25-d2e0575 +manylinux1 = quay.io/pypa/manylinux1_x86_64:2023-08-20-dcf13fc manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177 -manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2023-06-25-a3ead0d +manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2023-08-20-323dd42 manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-12-26-0d38463 -manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2023-06-25-a3ead0d -musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2023-06-25-a3ead0d +manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2023-08-20-323dd42 +musllinux_1_1 = quay.io/pypa/musllinux_1_1_x86_64:2023-08-20-323dd42 +musllinux_1_2 = quay.io/pypa/musllinux_1_2_x86_64:2023-08-20-323dd42 [i686] -manylinux1 = quay.io/pypa/manylinux1_i686:2023-06-25-d2e0575 +manylinux1 = quay.io/pypa/manylinux1_i686:2023-08-20-dcf13fc manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177 -manylinux2014 = quay.io/pypa/manylinux2014_i686:2023-06-25-a3ead0d +manylinux2014 = quay.io/pypa/manylinux2014_i686:2023-08-20-323dd42 manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-12-26-0d38463 -musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2023-06-25-a3ead0d +musllinux_1_1 = quay.io/pypa/musllinux_1_1_i686:2023-08-20-323dd42 +musllinux_1_2 = quay.io/pypa/musllinux_1_2_i686:2023-08-20-323dd42 [pypy_x86_64] manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2022-08-05-4535177 -manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2023-06-25-a3ead0d +manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2023-08-20-323dd42 manylinux_2_24 = quay.io/pypa/manylinux_2_24_x86_64:2022-12-26-0d38463 -manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2023-06-25-a3ead0d +manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2023-08-20-323dd42 [pypy_i686] manylinux2010 = quay.io/pypa/manylinux2010_i686:2022-08-05-4535177 -manylinux2014 = quay.io/pypa/manylinux2014_i686:2023-06-25-a3ead0d +manylinux2014 = quay.io/pypa/manylinux2014_i686:2023-08-20-323dd42 manylinux_2_24 = quay.io/pypa/manylinux_2_24_i686:2022-12-26-0d38463 [aarch64] -manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2023-06-25-a3ead0d +manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2023-08-20-323dd42 manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-12-26-0d38463 -manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2023-06-25-a3ead0d -musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2023-06-25-a3ead0d +manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2023-08-20-323dd42 +musllinux_1_1 = quay.io/pypa/musllinux_1_1_aarch64:2023-08-20-323dd42 +musllinux_1_2 = quay.io/pypa/musllinux_1_2_aarch64:2023-08-20-323dd42 [ppc64le] -manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2023-06-25-a3ead0d +manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2023-08-20-323dd42 manylinux_2_24 = quay.io/pypa/manylinux_2_24_ppc64le:2022-12-26-0d38463 -manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2023-06-25-a3ead0d -musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2023-06-25-a3ead0d +manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2023-08-20-323dd42 +musllinux_1_1 = quay.io/pypa/musllinux_1_1_ppc64le:2023-08-20-323dd42 +musllinux_1_2 = quay.io/pypa/musllinux_1_2_ppc64le:2023-08-20-323dd42 [s390x] -manylinux2014 = quay.io/pypa/manylinux2014_s390x:2023-06-25-a3ead0d +manylinux2014 = quay.io/pypa/manylinux2014_s390x:2023-08-20-323dd42 manylinux_2_24 = quay.io/pypa/manylinux_2_24_s390x:2022-12-26-0d38463 -manylinux_2_28 = quay.io/pypa/manylinux_2_28_s390x:2023-06-25-a3ead0d -musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2023-06-25-a3ead0d +manylinux_2_28 = quay.io/pypa/manylinux_2_28_s390x:2023-08-20-323dd42 +musllinux_1_1 = quay.io/pypa/musllinux_1_1_s390x:2023-08-20-323dd42 +musllinux_1_2 = quay.io/pypa/musllinux_1_2_s390x:2023-08-20-323dd42 [pypy_aarch64] -manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2023-06-25-a3ead0d +manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2023-08-20-323dd42 manylinux_2_24 = quay.io/pypa/manylinux_2_24_aarch64:2022-12-26-0d38463 -manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2023-06-25-a3ead0d +manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2023-08-20-323dd42 diff --git a/cibuildwheel/util.py b/cibuildwheel/util.py index 703475e2a..6ed975d74 100644 --- a/cibuildwheel/util.py +++ b/cibuildwheel/util.py @@ -251,7 +251,7 @@ class BuildSelector: requires_python: SpecifierSet | None = None # a pattern that skips prerelease versions, when include_prereleases is False. - PRERELEASE_SKIP: ClassVar[str] = "cp312-*" + PRERELEASE_SKIP: ClassVar[str] = "" prerelease_pythons: bool = False def __call__(self, build_id: str) -> bool: diff --git a/docs/changelog.md b/docs/changelog.md index 126b0f608..8d99c6333 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -4,6 +4,29 @@ title: Changelog # Changelog +### v2.15.0 + +_8 August 2023_ + +- 🌟 CPython 3.12 wheels are now built by default - without the CIBW_PRERELEASE_PYTHONS flag. It's time to build and upload these wheels to PyPI! This release includes CPython 3.12.0rc1, which is guaranteed to be ABI compatible with the final release. (#1565) +- ✨ Adds musllinux_1_2 support - this allows packagers to build for musl-based Linux distributions on a more recent Alpine image, and a newer musl libc. (#1561) + +### v2.14.1 + +_15 July 2023_ + +- 🛠 Updates the prerelease CPython 3.12 version to 3.12.0b4 (#1550) + +### v2.14.0 + +_10 July 2023_ + +- ✨ Adds support for building PyPy 3.10 wheels. (#1525) +- 🛠 Updates the prerelease CPython 3.12 version to 3.12.0b3. +- ✨ Allow the use of the `{wheel}` placeholder in CIBW_TEST_COMMAND (#1533) +- 📚 Docs & examples updates (#1532, #1416) +- ⚠️ Removed support for running cibuildwheel in Python 3.7. Python 3.7 is EOL. However, cibuildwheel continues to build Python 3.7 wheels for the moment. (#1175) + ### v2.13.1 _10 June 2023_ diff --git a/docs/data/projects.yml b/docs/data/projects.yml index cf9937354..dbfb29d2b 100644 --- a/docs/data/projects.yml +++ b/docs/data/projects.yml @@ -413,8 +413,9 @@ - name: Tornado gh: tornadoweb/tornado - ci: [travisci] - os: [apple, linux] + ci: [github] + os: [linux, apple, windows] + notes: Tornado is a Python web framework and asynchronous networking library. Uses stable ABI for a small C extension. - name: pytorch-fairseq gh: pytorch/fairseq diff --git a/docs/faq.md b/docs/faq.md index df166187b..91f2f6709 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -20,9 +20,13 @@ Linux wheels are built in [`manylinux`/`musllinux` containers](https://github.co ### Building macOS wheels for Apple Silicon {: #apple-silicon} -`cibuildwheel` supports cross-compiling `universal2` and `arm64` wheels on `x86_64` runners. With the introduction of Apple Silicon, you now have several choices for wheels for Python 3.8+: +`cibuildwheel` supports cross-compiling `universal2` and `arm64` wheels on `x86_64` runners. -#### `x86_64` +#### Overview of Mac architectures + +With the introduction of Apple Silicon, you now have several choices for wheels for Python 3.8+: + +##### `x86_64` The traditional wheel for Apple, loads on Intel machines, and on Apple Silicon when running Python under Rosetta 2 emulation. @@ -30,51 +34,61 @@ Apple Silicon when running Python under Rosetta 2 emulation. Due to a change in naming, Pip 20.3+ (or an installer using packaging 20.5+) is required to install a binary wheel on macOS Big Sur. -#### `arm64` +##### `arm64` The native wheel for macOS on Apple Silicon. Requires Pip 20.3+ (or packaging 20.5+) to install. -#### `universal2` +##### `universal2` This wheel contains both architectures, causing it to be up to twice the size (data files do not get doubled, only compiled code). It requires Pip 20.3 (Packaging 20.6+) to load on Intel, and Pip 21.0.1 (Packaging 20.9+) to load on Apple Silicon. -!!! note - The dual-architecture `universal2` has a few benefits, but a key benefit - to a universal wheel is that a user can bundle these wheels into an - application and ship a single binary. +The dual-architecture `universal2` has a few benefits, but a key benefit +to a universal wheel is that a user can bundle these wheels into an +application and ship a single binary. - However, if you have a large library, then you might prefer to ship - the two single-arch wheels instead - `x86_64` and `arm64`. In rare cases, - you might want to build all three, but in that case, pip will not download - the universal wheels, because it prefers the most specific wheel - available. +However, if you have a large library, then you might prefer to ship +the two single-arch wheels instead - `x86_64` and `arm64`. In rare cases, +you might want to build all three, but in that case, pip will not download +the universal wheels, because it prefers the most specific wheel +available. + +#### What to provide? Generally speaking, because Pip 20.3 is required for the `universal2` wheel, most packages should provide both `x86_64` and one of `universal2`/`arm64` -wheels for now. When Pip 20.3+ is common on macOS, then it might be possible -to ship only the `universal2` wheel. +wheels. When Pip 20.3+ is common on macOS, then it might be possible to ship +only the `universal2` wheel. + +Opinions vary on which of arch-specific or `universal2` wheels are best - some packagers prefer `universal2` because it's one wheel for all Mac users, so simpler, and easier to build into apps for downstream users. However, because they contain code for both architectures, their file size is larger, meaning they consume more disk space and bandwidth, and are harder to build for some projects. + +See [GitHub issue 1333](https://github.com/pypa/cibuildwheel/issues/1333) for more discussion. -**Apple Silicon wheels are not built by default on Intel runners**, but can be enabled by adding extra archs to the [`CIBW_ARCHS_MACOS` option](options.md#archs) - e.g. `x86_64 arm64`. Cross-compilation is provided by the Xcode toolchain. +#### How to cross-compile + +With the exception of Cirrus CI, macOS CI runners are still Intel-based, and Apple Silicon wheels are not built by default on Intel runners. However, cross-compilation can be enabled by adding extra archs to the [`CIBW_ARCHS_MACOS` option](options.md#archs) - e.g. `x86_64 arm64`. Cross-compilation is provided by the Xcode toolchain. !!! important When cross-compiling on Intel, it is not possible to test `arm64` and the `arm64` part of a `universal2` wheel. `cibuildwheel` will raise a warning to notify you of this - these warnings be be silenced by skipping testing on these platforms: `CIBW_TEST_SKIP: *_arm64 *_universal2:arm64`. -Hopefully, cross-compilation is a temporary situation. Once we have widely -available Apple Silicon CI runners, we can build and test `arm64` and -`universal2` wheels natively. That's why `universal2`/`arm64` wheels require opt-in by setting `CIBW_ARCHS_MACOS`. - !!! note Your runner needs Xcode Command Line Tools 12.2 or later to build `universal2` or `arm64`. Only CPython 3.8 and newer support `universal2` and `arm64` wheels. +!!! note + If your project uses **Poetry** as a build backend, cross-compiling on macOS [does not currently work](https://github.com/python-poetry/poetry/issues/7107). In some cases arm64 wheels can be built but their tags will be incorrect, with the platform tag showing `x86_64` instead of `arm64`. + + As a workaround, the tag can be fixed before running delocate to repair the wheel. The [`wheel tags`](https://wheel.readthedocs.io/en/stable/reference/wheel_tags.html) command is ideal for this. See [this workflow](https://gist.github.com/anderssonjohan/49f07e33fc5cb2420515a8ac76dc0c95#file-build-pendulum-wheels-yml-L39-L53) for an example usage of `wheel tags`. + +Hopefully, cross-compilation is a temporary situation. Once we have widely available Apple Silicon CI runners, we can build `arm64` wheels natively. Until then, cross-compiling `arm64` or `universal2` wheels requires opt-in by setting `CIBW_ARCHS_MACOS` on Intel runners. + Here's an example GitHub Actions workflow with a job that builds for Apple Silicon: > .github/workflows/build_macos.yml @@ -145,7 +159,7 @@ There are two suggested methods for keeping cibuildwheel up to date that instead If you use GitHub Actions for builds, you can use cibuildwheel as an action: ```yaml -uses: pypa/cibuildwheel@v2.13.1 +uses: pypa/cibuildwheel@v2.15.0 ``` This is a composite step that just runs cibuildwheel using pipx. You can set command-line options as `with:` parameters, and use `env:` as normal. @@ -167,7 +181,7 @@ The second option, and the only one that supports other CI systems, is using a ` ```bash # requirements-cibw.txt -cibuildwheel==2.13.1 +cibuildwheel==2.15.0 ``` Then your install step would have `python -m pip install -r requirements-cibw.txt` in it. Your `.github/dependabot.yml` file could look like this: @@ -311,7 +325,7 @@ Solutions to this vary, but the simplest is to use pipx: # most runners have pipx preinstalled, but in case you don't python3 -m pip install pipx -pipx run cibuildwheel==2.13.1 --output-dir wheelhouse +pipx run cibuildwheel==2.15.0 --output-dir wheelhouse pipx run twine upload wheelhouse/*.whl ``` diff --git a/docs/options.md b/docs/options.md index 3f3676ae4..085fcc2fe 100644 --- a/docs/options.md +++ b/docs/options.md @@ -984,7 +984,7 @@ Set an alternative Docker image to be used for building [manylinux / musllinux]( For `CIBW_MANYLINUX_*_IMAGE`, the value of this option can either be set to `manylinux1`, `manylinux2010`, `manylinux2014`, `manylinux_2_24` or `manylinux_2_28` to use a pinned version of the [official manylinux images](https://github.com/pypa/manylinux). Alternatively, set these options to any other valid Docker image name. For PyPy, the `manylinux1` image is not available. For architectures other than x86 (x86\_64 and i686) `manylinux2014`, `manylinux_2_24` or `manylinux_2_28` must be used, because the first version of the manylinux specification that supports additional architectures is `manylinux2014`. `manylinux_2_28` is not supported for `i686` architecture. -For `CIBW_MUSLLINUX_*_IMAGE`, the value of this option can either be set to `musllinux_1_1` to use a pinned version of the [official musllinux images](https://github.com/pypa/musllinux). Alternatively, set these options to any other valid Docker image name. +For `CIBW_MUSLLINUX_*_IMAGE`, the value of this option can either be set to `musllinux_1_1` or `musllinux_1_2` to use a pinned version of the [official musllinux images](https://github.com/pypa/musllinux). Alternatively, set these options to any other valid Docker image name. If this option is blank, it will fall though to the next available definition (environment variable -> pyproject.toml -> default). @@ -1348,11 +1348,11 @@ Platform-specific environment variables are also available:
> Install your wheel for testing using `extras_require` List of -[extras_require](https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies) +[extras_require](https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#declaring-required-dependency) options that should be included when installing the wheel prior to running the tests. This can be used to avoid having to redefine test dependencies in -`CIBW_TEST_REQUIRES` if they are already defined in `setup.py` or -`setup.cfg`. +`CIBW_TEST_REQUIRES` if they are already defined in `pyproject.toml`, +`setup.cfg` or `setup.py`. Platform-specific environment variables are also available:
`CIBW_TEST_EXTRAS_MACOS` | `CIBW_TEST_EXTRAS_WINDOWS` | `CIBW_TEST_EXTRAS_LINUX` | `CIBW_TEST_EXTRAS_PYODIDE` diff --git a/docs/setup.md b/docs/setup.md index a1369a8e2..90526097d 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -184,7 +184,7 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/ - uses: actions/checkout@v3 - name: Build wheels - run: pipx run cibuildwheel==2.13.1 + run: pipx run cibuildwheel==2.15.0 - uses: actions/upload-artifact@v3 with: @@ -219,7 +219,7 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/ - uses: actions/setup-python@v3 - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.13.1 + run: python -m pip install cibuildwheel==2.15.0 - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse diff --git a/docs/working-examples.md b/docs/working-examples.md index 4c6647d18..0af26078b 100644 --- a/docs/working-examples.md +++ b/docs/working-examples.md @@ -11,7 +11,7 @@ title: Working examples | [scikit-learn][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The machine learning library. A complex but clean config using many of cibuildwheel's features to build a large project with Cython and C++ extensions. | | [pytorch-fairseq][] | ![github icon][] | ![apple icon][] ![linux icon][] | Facebook AI Research Sequence-to-Sequence Toolkit written in Python. | | [NumPy][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The fundamental package for scientific computing with Python. | -| [Tornado][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. | +| [Tornado][] | ![github icon][] | ![linux icon][] ![apple icon][] ![windows icon][] | Tornado is a Python web framework and asynchronous networking library. Uses stable ABI for a small C extension. | | [Matplotlib][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The venerable Matplotlib, a Python library with C++ portions | | [NCNN][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | ncnn is a high-performance neural network inference framework optimized for the mobile platform | | [Prophet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth. | @@ -22,8 +22,8 @@ title: Working examples | [uvloop][] | ![github icon][] | ![apple icon][] ![linux icon][] | Ultra fast asyncio event loop. | | [psutil][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Cross-platform lib for process and system monitoring in Python | | [vaex][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Out-of-Core hybrid Apache Arrow/NumPy DataFrame for Python, ML, visualization and exploration of big tabular data at a billion rows per second 🚀 | -| [Google Benchmark][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A microbenchmark support library | | [Triton][] | ![github icon][] | ![linux icon][] | Self hosted runners | +| [Google Benchmark][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A microbenchmark support library | | [Apache Beam][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Apache Beam is a unified programming model for Batch and Streaming data processing. | | [PyGame][] | ![github icon][] | ![apple icon][] ![linux icon][] | 🐍🎮 pygame (the library) is a Free and Open Source python programming language library for making multimedia applications like games built on top of the excellent SDL library. C, Python, Native, OpenGL. | | [asyncpg][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A fast PostgreSQL Database Client Library for Python/asyncio. | @@ -40,44 +40,44 @@ title: Working examples | [pyzmq][] | ![github icon][] ![circleci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Python bindings for zeromq, the networking library. Uses Cython on CPython and CFFI on PyPy. ARM wheels for linux are built natively on CircleCI. | | [Confluent client for Kafka][] | ![travisci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | setup in `tools/wheels/build-wheels.bat` | | [Implicit][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes GPU support for linux wheels | -| [vispy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Main repository for Vispy | | [Dependency Injector][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Dependency injection framework for Python, uses Windows TravisCI | +| [vispy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Main repository for Vispy | | [tinyobjloader][] | ![azurepipelines icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Tiny but powerful single file wavefront obj loader | | [coverage.py][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The coverage tool for Python | | [PyCryptodome][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A self-contained cryptographic library for Python | | [PyYAML][] | ![github icon][] | ![apple icon][] | Canonical source repository for PyYAML | +| [Line Profiler][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Line-by-line profiling for Python | | [numexpr][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Fast numerical array expression evaluator for Python, NumPy, PyTables, pandas, bcolz and more | | [PyAV][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Pythonic bindings for FFmpeg's libraries. | -| [Line Profiler][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Line-by-line profiling for Python | | [h5py][] | ![azurepipelines icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | HDF5 for Python -- The h5py package is a Pythonic interface to the HDF5 binary data format. | | [Wrapt][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python module for decorators, wrappers and monkey patching. | -| [pikepdf][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python library for reading and writing PDF, powered by qpdf | -| [envd][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | 🏕️ Reproducible development environment for AI/ML | +| [pikepdf][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python library for reading and writing PDF, powered by QPDF | +| [envd][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | 🏕️ Reproducible development environment for AI/ML (LLMOps) | +| [CTranslate2][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes libraries from the [Intel oneAPI toolkit](https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit.html) and CUDA kernels compiled for multiple GPU architectures. | | [SimpleJSON][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | simplejson is a simple, fast, extensible JSON encoder/decoder for Python | | [OpenColorIO][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | A color management framework for visual effects and animation. | | [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. | | [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 | -| [CTranslate2][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes libraries from the [Intel oneAPI toolkit](https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit.html) and CUDA kernels compiled for multiple GPU architectures. | | [Psycopg 3][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A modern implementation of a PostgreSQL adapter for Python | | [Parselmouth][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A Python interface to the Praat software package, using pybind11, C++17 and CMake, with the core Praat static library built only once and shared between wheels. | -| [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 | +| [DeepForest][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | An Efficient, Scalable and Optimized Python Framework for Deep Forest (2021.2.1) | | [AutoPy][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes a Windows Travis build. | | [H3-py][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Python bindings for H3, a hierarchical hexagonal geospatial indexing system | +| [mosec][] | ![github icon][] | ![linux icon][] ![apple icon][] | A high-performance ML model serving framework, offers dynamic batching and CPU/GPU pipelines to fully exploit your compute machine | | [Rtree][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Rtree: spatial index for Python GIS ¶ | | [markupsafe][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Safely add untrusted strings to HTML/XML markup. | | [Picologging][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A high-performance logging library for Python. | -| [mosec][] | ![github icon][] | ![linux icon][] ![apple icon][] | A high-performance serving framework for ML models, offers dynamic batching and multi-stage pipeline to fully exploit your compute machine | | [pybind11 cmake_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Example pybind11 module built with a CMake-based build system | +| [time-machine][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Time mocking library using only the CPython C API. | | [KDEpy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Kernel Density Estimation in Python | | [python-rapidjson][] | ![travisci icon][] ![gitlab icon][] ![appveyor icon][] | ![windows icon][] ![linux icon][] | Python wrapper around rapidjson | -| [time-machine][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Time mocking library using only the CPython C API. | | [python-snappy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Python bindings for the snappy google library | | [tgcalls][] | ![github icon][] | ![apple icon][] ![windows icon][] | Python `pybind11` binding to Telegram's WebRTC library with third party dependencies like `OpenSSL`, `MozJPEG`, `FFmpeg`, etc. | -| [pybind11 python_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Example pybind11 module built with a Python-based build system | | [dd-trace-py][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Uses custom alternate arch emulation on GitHub | +| [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. | | [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. | @@ -88,8 +88,8 @@ title: Working examples | [PyGLM][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Fast OpenGL Mathematics (GLM) for Python | | [TgCrypto][] | ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Includes a Windows Travis build. | | [bx-python][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | A library that includes Cython extensions. | -| [boost-histogram][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Supports full range of wheels, including PyPy and alternate archs. | | [iDynTree][] | ![github icon][] | ![linux icon][] | Uses manylinux_2_24 | +| [boost-histogram][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Supports full range of wheels, including PyPy and alternate archs. | | [pillow-heif][] | ![github icon][] ![cirrusci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Bindings to libheif library with third party dependencies. Fully automated CI for tests and publishing including Apple Silicon builds. | | [Python-WebRTC][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | a Python extension that provides bindings to WebRTC M92 | | [pybase64][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Fast Base64 encoding/decoding in Python | @@ -99,8 +99,8 @@ title: Working examples | [Imagecodecs (fork)][] | ![azurepipelines icon][] | ![apple icon][] ![linux icon][] | Over 20 external dependencies in compiled libraries, custom docker image, `libomp`, `openblas` and `install_name_tool` for macOS. | | [polaroid][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Full range of wheels for setuptools rust, with auto release and PyPI deploy. | | [etebase-py][] | ![travisci icon][] | ![linux icon][] | Python bindings to a Rust library using `setuptools-rust`, and `sccache` for improved speed. | -| [cf-units][] | ![github icon][] | ![apple icon][] ![linux icon][] | Units of measure as required by the Climate and Forecast (CF) Metadata Conventions | | [pybind11 scikit_build_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | An example combining scikit-build and pybind11 | +| [cf-units][] | ![github icon][] | ![apple icon][] ![linux icon][] | Units of measure as required by the Climate and Forecast (CF) Metadata Conventions | | [clang-format][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Scikit-build wrapper around LLVM's CMake, all platforms, generic wheels. | | [ninja][] | ![github icon][] ![travisci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Multitagged binary builds for all supported platforms, using cibw 2 config configuration. | | [numpythia][] | ![github icon][] | ![apple icon][] ![linux icon][] | The interface between PYTHIA and NumPy | @@ -128,8 +128,8 @@ title: Working examples [uvloop]: https://github.com/MagicStack/uvloop [psutil]: https://github.com/giampaolo/psutil [vaex]: https://github.com/vaexio/vaex -[Google Benchmark]: https://github.com/google/benchmark [Triton]: https://github.com/openai/triton +[Google Benchmark]: https://github.com/google/benchmark [Apache Beam]: https://github.com/apache/beam [PyGame]: https://github.com/pygame/pygame [asyncpg]: https://github.com/MagicStack/asyncpg @@ -146,44 +146,44 @@ title: Working examples [pyzmq]: https://github.com/zeromq/pyzmq [Confluent client for Kafka]: https://github.com/confluentinc/confluent-kafka-python [Implicit]: https://github.com/benfred/implicit -[vispy]: https://github.com/vispy/vispy [Dependency Injector]: https://github.com/ets-labs/python-dependency-injector +[vispy]: https://github.com/vispy/vispy [tinyobjloader]: https://github.com/tinyobjloader/tinyobjloader [coverage.py]: https://github.com/nedbat/coveragepy [PyCryptodome]: https://github.com/Legrandin/pycryptodome [PyYAML]: https://github.com/yaml/pyyaml +[Line Profiler]: https://github.com/pyutils/line_profiler [numexpr]: https://github.com/pydata/numexpr [PyAV]: https://github.com/PyAV-Org/PyAV -[Line Profiler]: https://github.com/pyutils/line_profiler [h5py]: https://github.com/h5py/h5py [Wrapt]: https://github.com/GrahamDumpleton/wrapt [pikepdf]: https://github.com/pikepdf/pikepdf [envd]: https://github.com/tensorchord/envd +[CTranslate2]: https://github.com/OpenNMT/CTranslate2 [SimpleJSON]: https://github.com/simplejson/simplejson [OpenColorIO]: https://github.com/AcademySoftwareFoundation/OpenColorIO [aioquic]: https://github.com/aiortc/aioquic [ruptures]: https://github.com/deepcharles/ruptures [OpenTimelineIO]: https://github.com/PixarAnimationStudios/OpenTimelineIO [PyTables]: https://github.com/PyTables/PyTables -[CTranslate2]: https://github.com/OpenNMT/CTranslate2 [Psycopg 3]: https://github.com/psycopg/psycopg [Parselmouth]: https://github.com/YannickJadoul/Parselmouth -[DeepForest]: https://github.com/LAMDA-NJU/Deep-Forest [google neuroglancer]: https://github.com/google/neuroglancer +[DeepForest]: https://github.com/LAMDA-NJU/Deep-Forest [AutoPy]: https://github.com/autopilot-rs/autopy [H3-py]: https://github.com/uber/h3-py +[mosec]: https://github.com/mosecorg/mosec [Rtree]: https://github.com/Toblerity/rtree [markupsafe]: https://github.com/pallets/markupsafe [Picologging]: https://github.com/microsoft/picologging -[mosec]: https://github.com/mosecorg/mosec [pybind11 cmake_example]: https://github.com/pybind/cmake_example +[time-machine]: https://github.com/adamchainz/time-machine [KDEpy]: https://github.com/tommyod/KDEpy [python-rapidjson]: https://github.com/python-rapidjson/python-rapidjson -[time-machine]: https://github.com/adamchainz/time-machine [python-snappy]: https://github.com/andrix/python-snappy [tgcalls]: https://github.com/MarshalX/tgcalls -[pybind11 python_example]: https://github.com/pybind/python_example [dd-trace-py]: https://github.com/DataDog/dd-trace-py +[pybind11 python_example]: https://github.com/pybind/python_example [sourmash]: https://github.com/dib-lab/sourmash [cyvcf2]: https://github.com/brentp/cyvcf2 [matrixprofile]: https://github.com/matrix-profile-foundation/matrixprofile @@ -194,8 +194,8 @@ title: Working examples [PyGLM]: https://github.com/Zuzu-Typ/PyGLM [TgCrypto]: https://github.com/pyrogram/tgcrypto [bx-python]: https://github.com/bxlab/bx-python -[boost-histogram]: https://github.com/scikit-hep/boost-histogram [iDynTree]: https://github.com/robotology/idyntree +[boost-histogram]: https://github.com/scikit-hep/boost-histogram [pillow-heif]: https://github.com/bigcat88/pillow_heif [Python-WebRTC]: https://github.com/MarshalX/python-webrtc [pybase64]: https://github.com/mayeut/pybase64 @@ -205,8 +205,8 @@ title: Working examples [Imagecodecs (fork)]: https://github.com/czaki/imagecodecs_build [polaroid]: https://github.com/daggy1234/polaroid [etebase-py]: https://github.com/etesync/etebase-py -[cf-units]: https://github.com/SciTools/cf-units [pybind11 scikit_build_example]: https://github.com/pybind/scikit_build_example +[cf-units]: https://github.com/SciTools/cf-units [clang-format]: https://github.com/ssciwr/clang-format-wheel [ninja]: https://github.com/scikit-build/ninja-python-distributions [numpythia]: https://github.com/scikit-hep/numpythia diff --git a/examples/appveyor-minimal.yml b/examples/appveyor-minimal.yml index c1ee0aab4..5ba6b666d 100644 --- a/examples/appveyor-minimal.yml +++ b/examples/appveyor-minimal.yml @@ -12,7 +12,7 @@ stack: python 3.7 init: - cmd: set PATH=C:\Python37;C:\Python37\Scripts;%PATH% -install: python -m pip install cibuildwheel==2.13.1 +install: python -m pip install cibuildwheel==2.15.0 build_script: python -m cibuildwheel --output-dir wheelhouse diff --git a/examples/azure-pipelines-minimal.yml b/examples/azure-pipelines-minimal.yml index 66984f9bc..90865ffc0 100644 --- a/examples/azure-pipelines-minimal.yml +++ b/examples/azure-pipelines-minimal.yml @@ -6,7 +6,7 @@ jobs: - bash: | set -o errexit python3 -m pip install --upgrade pip - pip3 install cibuildwheel==2.13.1 + pip3 install cibuildwheel==2.15.0 displayName: Install dependencies - bash: cibuildwheel --output-dir wheelhouse . displayName: Build wheels @@ -20,7 +20,7 @@ jobs: - bash: | set -o errexit python3 -m pip install --upgrade pip - python3 -m pip install cibuildwheel==2.13.1 + python3 -m pip install cibuildwheel==2.15.0 displayName: Install dependencies - bash: cibuildwheel --output-dir wheelhouse . displayName: Build wheels @@ -34,7 +34,7 @@ jobs: - bash: | set -o errexit python -m pip install --upgrade pip - pip install cibuildwheel==2.13.1 + pip install cibuildwheel==2.15.0 displayName: Install dependencies - bash: cibuildwheel --output-dir wheelhouse . displayName: Build wheels diff --git a/examples/circleci-minimal.yml b/examples/circleci-minimal.yml index eaf89e8a8..015aa5488 100644 --- a/examples/circleci-minimal.yml +++ b/examples/circleci-minimal.yml @@ -11,7 +11,7 @@ jobs: - run: name: Build the Linux wheels. command: | - pip3 install --user cibuildwheel==2.13.1 + pip3 install --user cibuildwheel==2.15.0 cibuildwheel --output-dir wheelhouse - store_artifacts: path: wheelhouse/ @@ -28,7 +28,7 @@ jobs: - run: name: Build the Linux aarch64 wheels. command: | - python3 -m pip install --user cibuildwheel==2.13.1 + python3 -m pip install --user cibuildwheel==2.15.0 python3 -m cibuildwheel --output-dir wheelhouse - store_artifacts: path: wheelhouse/ @@ -42,7 +42,7 @@ jobs: - run: name: Build the OS X wheels. command: | - pip3 install cibuildwheel==2.13.1 + pip3 install cibuildwheel==2.15.0 cibuildwheel --output-dir wheelhouse - store_artifacts: path: wheelhouse/ diff --git a/examples/cirrus-ci-intel-mac.yml b/examples/cirrus-ci-intel-mac.yml index 954b1cf1c..ab0b69c4e 100644 --- a/examples/cirrus-ci-intel-mac.yml +++ b/examples/cirrus-ci-intel-mac.yml @@ -1,6 +1,6 @@ build_and_store_wheels: &BUILD_AND_STORE_WHEELS install_cibuildwheel_script: - - python -m pip install cibuildwheel==2.13.1 + - python -m pip install cibuildwheel==2.15.0 run_cibuildwheel_script: - cibuildwheel wheels_artifacts: diff --git a/examples/cirrus-ci-minimal.yml b/examples/cirrus-ci-minimal.yml index 9fc01a3f8..176726c90 100644 --- a/examples/cirrus-ci-minimal.yml +++ b/examples/cirrus-ci-minimal.yml @@ -1,6 +1,6 @@ build_and_store_wheels: &BUILD_AND_STORE_WHEELS install_cibuildwheel_script: - - python -m pip install cibuildwheel==2.13.1 + - python -m pip install cibuildwheel==2.15.0 run_cibuildwheel_script: - cibuildwheel wheels_artifacts: diff --git a/examples/github-apple-silicon.yml b/examples/github-apple-silicon.yml index 825d157f8..3fec68f51 100644 --- a/examples/github-apple-silicon.yml +++ b/examples/github-apple-silicon.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v3 - name: Build wheels - uses: pypa/cibuildwheel@v2.13.1 + uses: pypa/cibuildwheel@v2.15.0 env: CIBW_ARCHS_MACOS: x86_64 arm64 diff --git a/examples/github-deploy.yml b/examples/github-deploy.yml index 627281baf..acafd7273 100644 --- a/examples/github-deploy.yml +++ b/examples/github-deploy.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v3 - name: Build wheels - uses: pypa/cibuildwheel@v2.13.1 + uses: pypa/cibuildwheel@v2.15.0 - uses: actions/upload-artifact@v3 with: diff --git a/examples/github-minimal.yml b/examples/github-minimal.yml index 55a9bf58b..53a028111 100644 --- a/examples/github-minimal.yml +++ b/examples/github-minimal.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v3 - name: Build wheels - uses: pypa/cibuildwheel@v2.13.1 + uses: pypa/cibuildwheel@v2.15.0 # env: # CIBW_SOME_OPTION: value # ... diff --git a/examples/github-with-qemu.yml b/examples/github-with-qemu.yml index 69953656b..e31253633 100644 --- a/examples/github-with-qemu.yml +++ b/examples/github-with-qemu.yml @@ -20,7 +20,7 @@ jobs: platforms: all - name: Build wheels - uses: pypa/cibuildwheel@v2.13.1 + uses: pypa/cibuildwheel@v2.15.0 env: # configure cibuildwheel to build native archs ('auto'), and some # emulated ones diff --git a/examples/gitlab-minimal.yml b/examples/gitlab-minimal.yml index 91e3f7b8c..454c5d27f 100644 --- a/examples/gitlab-minimal.yml +++ b/examples/gitlab-minimal.yml @@ -12,7 +12,7 @@ linux: DOCKER_TLS_CERTDIR: "" script: - curl -sSL https://get.docker.com/ | sh - - python -m pip install cibuildwheel==2.13.1 + - python -m pip install cibuildwheel==2.15.0 - cibuildwheel --output-dir wheelhouse artifacts: paths: @@ -23,7 +23,7 @@ windows: before_script: - choco install python -y --version 3.8.6 - choco install git.install -y - - py -m pip install cibuildwheel==2.13.1 + - py -m pip install cibuildwheel==2.15.0 script: - py -m cibuildwheel --output-dir wheelhouse --platform windows artifacts: diff --git a/examples/gitlab-with-qemu.yml b/examples/gitlab-with-qemu.yml index 13dba2680..6dd3f7575 100644 --- a/examples/gitlab-with-qemu.yml +++ b/examples/gitlab-with-qemu.yml @@ -14,7 +14,7 @@ linux: - curl -sSL https://get.docker.com/ | sh # Warning: This is extremely slow, be careful with how many wheels you build - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - - python -m pip install cibuildwheel==2.13.1 + - python -m pip install cibuildwheel==2.15.0 # Assuming your CI runner's default architecture is x86_64... - cibuildwheel --output-dir wheelhouse --platform linux --archs aarch64 artifacts: diff --git a/examples/travis-ci-deploy.yml b/examples/travis-ci-deploy.yml index 9a2c00e6a..a0c0ee7d3 100644 --- a/examples/travis-ci-deploy.yml +++ b/examples/travis-ci-deploy.yml @@ -20,7 +20,7 @@ jobs: - ln -s /c/Python38/python.exe /c/Python38/python3.exe install: - - python3 -m pip install cibuildwheel==2.13.1 + - python3 -m pip install cibuildwheel==2.15.0 script: # build the wheels, put them into './dist' diff --git a/examples/travis-ci-minimal.yml b/examples/travis-ci-minimal.yml index e36920930..34c06fedb 100644 --- a/examples/travis-ci-minimal.yml +++ b/examples/travis-ci-minimal.yml @@ -26,7 +26,7 @@ jobs: - ln -s /c/Python38/python.exe /c/Python38/python3.exe install: - - python3 -m pip install cibuildwheel==2.13.1 + - python3 -m pip install cibuildwheel==2.15.0 script: # build the wheels, put them into './wheelhouse' diff --git a/examples/travis-ci-test-and-deploy.yml b/examples/travis-ci-test-and-deploy.yml index b56df96c8..32ac81e6f 100644 --- a/examples/travis-ci-test-and-deploy.yml +++ b/examples/travis-ci-test-and-deploy.yml @@ -54,7 +54,7 @@ jobs: - stage: deploy name: Build and deploy Linux wheels services: docker - install: python3 -m pip install cibuildwheel==2.13.1 twine + install: python3 -m pip install cibuildwheel==2.15.0 twine script: python3 -m cibuildwheel --output-dir wheelhouse after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl # Deploy on windows @@ -62,7 +62,7 @@ jobs: name: Build and deploy Windows wheels os: windows language: shell - install: python3 -m pip install cibuildwheel==2.13.1 twine + install: python3 -m pip install cibuildwheel==2.15.0 twine script: python3 -m cibuildwheel --output-dir wheelhouse after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl diff --git a/setup.cfg b/setup.cfg index 8275e8795..e9e0c7cf5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = cibuildwheel -version = 2.13.1 +version = 2.15.0 description = Build Python wheels on CI with minimal configuration. long_description = file: README.md long_description_content_type = text/markdown diff --git a/test/conftest.py b/test/conftest.py index 8088d278c..627852d56 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -1,8 +1,14 @@ from __future__ import annotations +import json +import subprocess +from typing import Generator + import pytest -from . import utils +from cibuildwheel.util import detect_ci_provider + +from .utils import platform def pytest_addoption(parser) -> None: @@ -22,6 +28,32 @@ def pytest_addoption(parser) -> None: params=[{"CIBW_BUILD_FRONTEND": "pip"}, {"CIBW_BUILD_FRONTEND": "build"}], ids=["pip", "build"] ) def build_frontend_env(request) -> dict[str, str]: - if utils.platform == "pyodide": + if platform == "pyodide": pytest.skip("Can't use pip as build frontend for pyodide platform") return request.param # type: ignore[no-any-return] + + +@pytest.fixture() +def docker_cleanup() -> Generator[None, None, None]: + def get_images() -> set[str]: + images = subprocess.run( + ["docker", "image", "ls", "--format", "{{json .ID}}"], + text=True, + check=True, + stdout=subprocess.PIPE, + ).stdout + return {json.loads(image.strip()) for image in images.splitlines() if image.strip()} + + if detect_ci_provider() is None or platform != "linux": + try: + yield + finally: + pass + return + images_before = get_images() + try: + yield + finally: + images_after = get_images() + for image in images_after - images_before: + subprocess.run(["docker", "rmi", image], check=False) diff --git a/test/test_container_images.py b/test/test_container_images.py index 75b102e38..12d486418 100644 --- a/test/test_container_images.py +++ b/test/test_container_images.py @@ -23,6 +23,7 @@ ) +@pytest.mark.usefixtures("docker_cleanup") def test(tmp_path): if utils.platform != "linux": pytest.skip("the test is only relevant to the linux build") diff --git a/test/test_manylinuxXXXX_only.py b/test/test_manylinuxXXXX_only.py index 4d1fe87e8..06082a7bb 100644 --- a/test/test_manylinuxXXXX_only.py +++ b/test/test_manylinuxXXXX_only.py @@ -53,6 +53,7 @@ "manylinux_image", ["manylinux1", "manylinux2010", "manylinux2014", "manylinux_2_24", "manylinux_2_28"], ) +@pytest.mark.usefixtures("docker_cleanup") def test(manylinux_image, tmp_path): if utils.platform != "linux": pytest.skip("the container image test is only relevant to the linux build") diff --git a/test/test_musllinux_X_Y_only.py b/test/test_musllinux_X_Y_only.py new file mode 100644 index 000000000..d05bc9f87 --- /dev/null +++ b/test/test_musllinux_X_Y_only.py @@ -0,0 +1,56 @@ +from __future__ import annotations + +import textwrap + +import pytest + +from . import test_projects, utils + +project_with_manylinux_symbols = test_projects.new_c_project( + spam_c_top_level_add=textwrap.dedent( + r""" + #include + + #if defined(__GLIBC_PREREQ) + #error "Must not run on a glibc linux environment" + #endif + """ + ), + spam_c_function_add=textwrap.dedent( + r""" + sts = 0; + """ + ), +) + + +@pytest.mark.parametrize( + "musllinux_image", + ["musllinux_1_1", "musllinux_1_2"], +) +@pytest.mark.usefixtures("docker_cleanup") +def test(musllinux_image, tmp_path): + if utils.platform != "linux": + pytest.skip("the container image test is only relevant to the linux build") + + project_dir = tmp_path / "project" + project_with_manylinux_symbols.generate(project_dir) + + # build the wheels + add_env = { + "CIBW_BUILD": "*-musllinux*", + "CIBW_MUSLLINUX_X86_64_IMAGE": musllinux_image, + "CIBW_MUSLLINUX_I686_IMAGE": musllinux_image, + "CIBW_MUSLLINUX_AARCH64_IMAGE": musllinux_image, + "CIBW_MUSLLINUX_PPC64LE_IMAGE": musllinux_image, + "CIBW_MUSLLINUX_S390X_IMAGE": musllinux_image, + } + + actual_wheels = utils.cibuildwheel_run(project_dir, add_env=add_env) + expected_wheels = utils.expected_wheels( + "spam", + "0.1.0", + manylinux_versions=[], + musllinux_versions=[musllinux_image], + ) + assert set(actual_wheels) == set(expected_wheels) diff --git a/test/utils.py b/test/utils.py index 9186ebe08..7ca134568 100644 --- a/test/utils.py +++ b/test/utils.py @@ -212,13 +212,14 @@ def expected_wheels( if machine_arch == "x86_64": architectures.append("i686") - platform_tags = [ - ".".join( - f"{manylinux_version}_{architecture}" - for manylinux_version in manylinux_versions - ) - for architecture in architectures - ] + if len(manylinux_versions) > 0: + platform_tags = [ + ".".join( + f"{manylinux_version}_{architecture}" + for manylinux_version in manylinux_versions + ) + for architecture in architectures + ] if len(musllinux_versions) > 0 and not python_abi_tag.startswith("pp"): platform_tags.extend( [ diff --git a/unit_test/build_selector_test.py b/unit_test/build_selector_test.py index b4c6e96a4..9fa7eabda 100644 --- a/unit_test/build_selector_test.py +++ b/unit_test/build_selector_test.py @@ -12,7 +12,7 @@ def test_build(): assert build_selector("cp37-manylinux_x86_64") assert build_selector("cp310-manylinux_x86_64") assert build_selector("cp311-manylinux_x86_64") - assert not build_selector("cp312-manylinux_x86_64") + assert build_selector("cp312-manylinux_x86_64") assert build_selector("pp36-manylinux_x86_64") assert build_selector("pp37-manylinux_x86_64") assert build_selector("cp36-manylinux_i686") @@ -32,7 +32,7 @@ def test_build(): assert build_selector("cp37-win_amd64") assert build_selector("cp310-win_amd64") assert build_selector("cp311-win_amd64") - assert not build_selector("cp312-win_amd64") + assert build_selector("cp312-win_amd64") assert not build_selector("pp36-win_amd64") assert not build_selector("pp37-win_amd64") diff --git a/unit_test/linux_build_steps_test.py b/unit_test/linux_build_steps_test.py index 065c53c35..29ee25990 100644 --- a/unit_test/linux_build_steps_test.py +++ b/unit_test/linux_build_steps_test.py @@ -62,8 +62,9 @@ def before_alls(step): "cp36-manylinux_x86_64", "cp37-manylinux_x86_64", "cp311-manylinux_x86_64", + "cp312-manylinux_x86_64", ] - assert before_alls(build_steps[0]) == ["", "", ""] + assert before_alls(build_steps[0]) == ["", "", "", ""] assert build_steps[1].container_image == "other_container_image" assert identifiers(build_steps[1]) == ["cp38-manylinux_x86_64", "cp310-manylinux_x86_64"] diff --git a/unit_test/main_tests/main_platform_test.py b/unit_test/main_tests/main_platform_test.py index 79424821c..782b32520 100644 --- a/unit_test/main_tests/main_platform_test.py +++ b/unit_test/main_tests/main_platform_test.py @@ -214,6 +214,7 @@ def test_only_argument(intercepted_build_args, monkeypatch, only, plat): assert options.globals.build_selector.skip_config == "" assert options.platform == plat assert options.globals.architectures == Architecture.all_archs(plat) + assert options.globals.build_selector.prerelease_pythons is True @pytest.mark.parametrize("only", ("cp311-manylxinux_x86_64", "some_linux_thing")) diff --git a/unit_test/option_prepare_test.py b/unit_test/option_prepare_test.py index f37badf20..fdf77c537 100644 --- a/unit_test/option_prepare_test.py +++ b/unit_test/option_prepare_test.py @@ -13,7 +13,19 @@ from cibuildwheel import linux, util from cibuildwheel.__main__ import main -ALL_IDS = {"cp36", "cp37", "cp38", "cp39", "cp310", "cp311", "pp37", "pp38", "pp39", "pp310"} +ALL_IDS = { + "cp36", + "cp37", + "cp38", + "cp39", + "cp310", + "cp311", + "cp312", + "pp37", + "pp38", + "pp39", + "pp310", +} @pytest.fixture() @@ -101,13 +113,15 @@ def test_build_with_override_launches(monkeypatch, tmp_path): cibw_toml.write_text( """ [tool.cibuildwheel] -manylinux-x86_64-image = "manylinux_2_24" +manylinux-x86_64-image = "manylinux_2_28" +musllinux-x86_64-image = "musllinux_1_2" -# Before Python 3.10, use manylinux2014 +# Before Python 3.10, use manylinux2014, musllinux_1_1 [[tool.cibuildwheel.overrides]] select = "cp3?-*" manylinux-x86_64-image = "manylinux2014" manylinux-i686-image = "manylinux2014" +musllinux-x86_64-image = "musllinux_1_1" [[tool.cibuildwheel.overrides]] select = "cp36-manylinux_x86_64" @@ -122,7 +136,7 @@ def test_build_with_override_launches(monkeypatch, tmp_path): build_in_container = typing.cast(mock.Mock, linux.build_in_container) - assert build_in_container.call_count == 6 + assert build_in_container.call_count == 7 kwargs = build_in_container.call_args_list[0][1] assert "quay.io/pypa/manylinux2014_x86_64" in kwargs["container"]["image"] @@ -141,17 +155,18 @@ def test_build_with_override_launches(monkeypatch, tmp_path): identifiers = {x.identifier for x in kwargs["platform_configs"]} assert identifiers == { f"{x}-manylinux_x86_64" - for x in ALL_IDS - {"cp36", "cp310", "cp311", "pp37", "pp38", "pp39", "pp310"} + for x in ALL_IDS - {"cp36", "cp310", "cp311", "cp312", "pp37", "pp38", "pp39", "pp310"} } assert kwargs["options"].build_options("cp37-manylinux_x86_64").before_all == "" kwargs = build_in_container.call_args_list[2][1] - assert "quay.io/pypa/manylinux_2_24_x86_64" in kwargs["container"]["image"] + assert "quay.io/pypa/manylinux_2_28_x86_64" in kwargs["container"]["image"] assert kwargs["container"]["cwd"] == PurePosixPath("/project") assert not kwargs["container"]["simulate_32_bit"] identifiers = {x.identifier for x in kwargs["platform_configs"]} assert identifiers == { - f"{x}-manylinux_x86_64" for x in ["cp310", "cp311", "pp37", "pp38", "pp39", "pp310"] + f"{x}-manylinux_x86_64" + for x in ["cp310", "cp311", "cp312", "pp37", "pp38", "pp39", "pp310"] } kwargs = build_in_container.call_args_list[3][1] @@ -169,10 +184,19 @@ def test_build_with_override_launches(monkeypatch, tmp_path): identifiers = {x.identifier for x in kwargs["platform_configs"]} assert identifiers == { - f"{x}-musllinux_x86_64" for x in ALL_IDS for x in ALL_IDS if "pp" not in x + f"{x}-musllinux_x86_64" for x in ALL_IDS & {"cp36", "cp37", "cp38", "cp39"} if "pp" not in x } kwargs = build_in_container.call_args_list[5][1] + assert "quay.io/pypa/musllinux_1_2_x86_64" in kwargs["container"]["image"] + assert kwargs["container"]["cwd"] == PurePosixPath("/project") + assert not kwargs["container"]["simulate_32_bit"] + identifiers = {x.identifier for x in kwargs["platform_configs"]} + assert identifiers == { + f"{x}-musllinux_x86_64" for x in ALL_IDS - {"cp36", "cp37", "cp38", "cp39"} if "pp" not in x + } + + kwargs = build_in_container.call_args_list[6][1] assert "quay.io/pypa/musllinux_1_1_i686" in kwargs["container"]["image"] assert kwargs["container"]["cwd"] == PurePosixPath("/project") assert kwargs["container"]["simulate_32_bit"]