Compare commits

...
5 Commits
Author SHA1 Message Date
Henry Schreiner cf078b0954 Bump version: v3.0.0b4 2025-05-29 00:27:20 -04:00
Henry Schreiner b9f1942e8d chore: use cog for quick README updates (#2428)
* chore: use cog for quick README updates

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* refactor: rename scripts

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2025-05-28 23:36:16 -04:00
Henry Schreiner 2d6c328457 fix: drop PYTHONSAFEPATH (#2429)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2025-05-28 19:43:19 -04:00
cibuildwheel-bot[bot]cibuildwheel-bot[bot] <83877280+cibuildwheel-bot[bot]@users.noreply.github.com>Henry Schreinermayeut
0e8f4f777d [Bot] Update dependencies (#2426)
* Update dependencies

* tests: ignore tag order

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* tests: use sorted platform tags

Per PEP 425, compressed tag sets should be sorted.
This was fixed in auditwheel 6.4.0

* tests: use sorted platform tags

this shouldn't change that often, use static order to allow override.

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: cibuildwheel-bot[bot] <83877280+cibuildwheel-bot[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: mayeut <mayeut@users.noreply.github.com>
2025-05-28 19:42:00 -04:00
Joe Rickerby 7e099863cd docs: update options table in README and keep up-to-date with commit hook (#2427)
* Update options table in README and keep up-to-date with commit hook

* Separate multiple options with a newline

* remove the old javascript version
2025-05-28 15:38:53 -04:00
36 changed files with 237 additions and 225 deletions
+7 -6
View File
@@ -62,14 +62,15 @@ repos:
name: Disallow improper capitalization
language: pygrep
entry: PyBind|Numpy|Cmake|Github|PyTest
types:
- markdown
types: [markdown]
exclude: ^docs/working-examples\.md$ # Autogenerated
- id: update-readme-changelog
name: Update README changelog
- id: cog
name: Cog the README
language: python
entry: bin/update_readme_changelog.py
files: ^docs/changelog.md$
pass_filenames: false
entry: cog -c -P -r -I ./bin README.md
files: '^(README\.md|docs/changelog\.md|docs/options\.md|bin/readme.*)$'
additional_dependencies: [cogapp]
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
+49 -37
View File
@@ -97,7 +97,7 @@ jobs:
- uses: actions/setup-python@v5
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==3.0.0b3
run: python -m pip install cibuildwheel==3.0.0b4
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
@@ -124,35 +124,47 @@ The following diagram summarises the steps that cibuildwheel takes on each platf
<sup>Explore an interactive version of this diagram [in the docs](https://cibuildwheel.pypa.io/en/stable/#how-it-works).</sup>
Options
-------
<!--[[[cog from readme_options_table import get_table; print(get_table()) ]]]-->
<!-- This table is auto-generated from docs/options.md by bin/readme_options_table.py -->
| | Option | Description |
|---|--------|-------------|
| **Build selection** | [`CIBW_PLATFORM`](https://cibuildwheel.pypa.io/en/stable/options/#platform) | Override the auto-detected target platform |
| | [`CIBW_BUILD`](https://cibuildwheel.pypa.io/en/stable/options/#build-skip) <br> [`CIBW_SKIP`](https://cibuildwheel.pypa.io/en/stable/options/#build-skip) | Choose the Python versions to build |
| | [`CIBW_ARCHS`](https://cibuildwheel.pypa.io/en/stable/options/#archs) | Change the architectures built on your machine by default. |
| | [`CIBW_PROJECT_REQUIRES_PYTHON`](https://cibuildwheel.pypa.io/en/stable/options/#requires-python) | Manually set the Python compatibility of your project |
| | [`CIBW_PRERELEASE_PYTHONS`](https://cibuildwheel.pypa.io/en/stable/options/#prerelease-pythons) | Enable building with pre-release versions of Python if available |
| **Build customization** | [`CIBW_BUILD_FRONTEND`](https://cibuildwheel.pypa.io/en/stable/options/#build-frontend) | Set the tool to use to build, either "pip" (default for now) or "build" |
| | [`CIBW_ENVIRONMENT`](https://cibuildwheel.pypa.io/en/stable/options/#environment) | Set environment variables needed during the build |
| | [`CIBW_ENVIRONMENT_PASS_LINUX`](https://cibuildwheel.pypa.io/en/stable/options/#environment-pass) | Set environment variables on the host to pass-through to the container during the build. |
| | [`CIBW_BEFORE_ALL`](https://cibuildwheel.pypa.io/en/stable/options/#before-all) | Execute a shell command on the build system before any wheels are built. |
| | [`CIBW_BEFORE_BUILD`](https://cibuildwheel.pypa.io/en/stable/options/#before-build) | Execute a shell command preparing each wheel's build |
| | [`CIBW_XBUILD_TOOLS`](https://cibuildwheel.pypa.io/en/stable/options/#xbuild-tools) | Binaries on the path that should be included in an isolated cross-build environment. |
| | [`CIBW_REPAIR_WHEEL_COMMAND`](https://cibuildwheel.pypa.io/en/stable/options/#repair-wheel-command) | Execute a shell command to repair each built wheel |
| | [`CIBW_MANYLINUX_*_IMAGE`<br/>`CIBW_MUSLLINUX_*_IMAGE`](https://cibuildwheel.pypa.io/en/stable/options/#linux-image) | Specify alternative manylinux / musllinux Docker images |
| | [`CIBW_CONTAINER_ENGINE`](https://cibuildwheel.pypa.io/en/stable/options/#container-engine) | Specify which container engine to use when building Linux wheels |
| | [`CIBW_DEPENDENCY_VERSIONS`](https://cibuildwheel.pypa.io/en/stable/options/#dependency-versions) | Specify how cibuildwheel controls the versions of the tools it uses |
| **Testing** | [`CIBW_TEST_COMMAND`](https://cibuildwheel.pypa.io/en/stable/options/#test-command) | Execute a shell command to test each built wheel |
| | [`CIBW_BEFORE_TEST`](https://cibuildwheel.pypa.io/en/stable/options/#before-test) | Execute a shell command before testing each wheel |
| | [`CIBW_TEST_SOURCES`](https://cibuildwheel.pypa.io/en/stable/options/#test-sources) | Files and folders from the source tree that are copied into an isolated tree before running the tests |
| | [`CIBW_TEST_REQUIRES`](https://cibuildwheel.pypa.io/en/stable/options/#test-requires) | Install Python dependencies before running the tests |
| | [`CIBW_TEST_EXTRAS`](https://cibuildwheel.pypa.io/en/stable/options/#test-extras) | Install your wheel for testing using extras_require |
| | [`CIBW_TEST_SKIP`](https://cibuildwheel.pypa.io/en/stable/options/#test-skip) | Skip running tests on some builds |
| **Other** | [`CIBW_BUILD_VERBOSITY`](https://cibuildwheel.pypa.io/en/stable/options/#build-verbosity) | Increase/decrease the output of pip wheel |
|---|---|---|
| **Build selection** | [`platform`](https://cibuildwheel.pypa.io/en/stable/options/#platform) | Override the auto-detected target platform |
| | [`build`<br>`skip`](https://cibuildwheel.pypa.io/en/stable/options/#build-skip) | Choose the Python versions to build |
| | [`archs`](https://cibuildwheel.pypa.io/en/stable/options/#archs) | Change the architectures built on your machine by default. |
| | [`project-requires-python`](https://cibuildwheel.pypa.io/en/stable/options/#requires-python) | Manually set the Python compatibility of your project |
| | [`enable`](https://cibuildwheel.pypa.io/en/stable/options/#enable) | Enable building with extra categories of selectors present. |
| | [`allow-empty`](https://cibuildwheel.pypa.io/en/stable/options/#allow-empty) | Suppress the error code if no wheels match the specified build identifiers |
| **Build customization** | [`build-frontend`](https://cibuildwheel.pypa.io/en/stable/options/#build-frontend) | Set the tool to use to build, either "build" (default), "build\[uv\]", or "pip" |
| | [`config-settings`](https://cibuildwheel.pypa.io/en/stable/options/#config-settings) | Specify config-settings for the build backend. |
| | [`environment`](https://cibuildwheel.pypa.io/en/stable/options/#environment) | Set environment variables |
| | [`environment-pass`](https://cibuildwheel.pypa.io/en/stable/options/#environment-pass) | Set environment variables on the host to pass-through to the container. |
| | [`before-all`](https://cibuildwheel.pypa.io/en/stable/options/#before-all) | Execute a shell command on the build system before any wheels are built. |
| | [`before-build`](https://cibuildwheel.pypa.io/en/stable/options/#before-build) | Execute a shell command preparing each wheel's build |
| | [`xbuild-tools`](https://cibuildwheel.pypa.io/en/stable/options/#xbuild-tools) | Binaries on the path that should be included in an isolated cross-build environment. |
| | [`repair-wheel-command`](https://cibuildwheel.pypa.io/en/stable/options/#repair-wheel-command) | Execute a shell command to repair each built wheel |
| | [`manylinux-*-image`<br>`musllinux-*-image`](https://cibuildwheel.pypa.io/en/stable/options/#linux-image) | Specify manylinux / musllinux container images |
| | [`container-engine`](https://cibuildwheel.pypa.io/en/stable/options/#container-engine) | Specify the container engine to use when building Linux wheels |
| | [`dependency-versions`](https://cibuildwheel.pypa.io/en/stable/options/#dependency-versions) | Control the versions of the tools cibuildwheel uses |
| | [`pyodide-version`](https://cibuildwheel.pypa.io/en/stable/options/#pyodide-version) | Specify the Pyodide version to use for `pyodide` platform builds |
| **Testing** | [`test-command`](https://cibuildwheel.pypa.io/en/stable/options/#test-command) | The command to test each built wheel |
| | [`before-test`](https://cibuildwheel.pypa.io/en/stable/options/#before-test) | Execute a shell command before testing each wheel |
| | [`test-sources`](https://cibuildwheel.pypa.io/en/stable/options/#test-sources) | Files and folders from the source tree that are copied into an isolated tree before running the tests |
| | [`test-requires`](https://cibuildwheel.pypa.io/en/stable/options/#test-requires) | Install Python dependencies before running the tests |
| | [`test-extras`](https://cibuildwheel.pypa.io/en/stable/options/#test-extras) | Install your wheel for testing using `extras_require` |
| | [`test-groups`](https://cibuildwheel.pypa.io/en/stable/options/#test-groups) | Specify test dependencies from your project's `dependency-groups` |
| | [`test-skip`](https://cibuildwheel.pypa.io/en/stable/options/#test-skip) | Skip running tests on some builds |
| | [`test-environment`](https://cibuildwheel.pypa.io/en/stable/options/#test-environment) | Set environment variables for the test environment |
| **Debugging** | [`debug-keep-container`](https://cibuildwheel.pypa.io/en/stable/options/#debug-keep-container) | Keep the container after running for debugging. |
| | [`debug-traceback`](https://cibuildwheel.pypa.io/en/stable/options/#debug-traceback) | Print full traceback when errors occur. |
| | [`build-verbosity`](https://cibuildwheel.pypa.io/en/stable/options/#build-verbosity) | Increase/decrease the output of the build |
These options can be specified in a pyproject.toml file, as well; see [configuration](https://cibuildwheel.pypa.io/en/stable/options/#configuration).
<!--[[[end]]] (checksum: 4d6a8418630e9ed43251973d93798a1b) -->
These options can be specified in a pyproject.toml file, or as environment variables, see [configuration docs](https://cibuildwheel.pypa.io/en/latest/configuration/).
Working examples
----------------
@@ -213,9 +225,7 @@ This is similar to static linking, so it might have some license implications. C
Changelog
=========
<!-- START bin/update_readme_changelog.py -->
<!-- this section was generated by bin/update_readme_changelog.py -- do not edit manually -->
<!-- [[[cog from readme_changelog import mini_changelog; print(mini_changelog()) ]]] -->
### v3.0.0
@@ -229,6 +239,14 @@ If you've used previous versions of the beta:
#### v3.0.0b3
_29 May 2025_
- 🛠 Dependency updates, including Python 3.14.0b2 (#2371)
- 🛠 Remove the addition of `PYTHONSAFEPATH` to `test-environment`. (#2429)
- 📚 README table now matches docs and auto-updates. (#2427, #2428)
#### v3.0.0b3
_28 May 2025_
- 🛠 Reverts the test working dir (when test-sources isn't set) to a temporary dir, rather than the project. (#2420)
@@ -263,13 +281,7 @@ _19 May 2025_
- ⚠️ Dropped official support for Appveyor. If it was working for you before, it will probably continue to do so, but we can't be sure, because our CI doesn't run there anymore. (#2386)
- 📚 A reorganisation of the docs, and numerous updates (#2280)
### v2.23.3
_26 April 2025_
- 🛠 Dependency updates, including Python 3.13.3 (#2371)
<!-- END bin/update_readme_changelog.py -->
<!-- [[[end]]] (checksum: 1e79ae989c2c03ebaf8fa9fc77de7612) -->
---
+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/env python3
import re
from pathlib import Path
PROJECT_ROOT = Path(__file__).parent / ".."
CHANGELOG_FILE = PROJECT_ROOT / "docs" / "changelog.md"
# https://regexr.com/622ds
FIRST_5_CHANGELOG_ENTRIES_REGEX = re.compile(r"""(^###.*?(?=###)){5}""", re.DOTALL | re.MULTILINE)
def mini_changelog() -> str:
changelog_text = CHANGELOG_FILE.read_text()
mini_changelog_match = FIRST_5_CHANGELOG_ENTRIES_REGEX.search(changelog_text)
assert mini_changelog_match, "Failed to find the first few changelog entries"
return f"\n{mini_changelog_match.group(0).strip()}\n"
if __name__ == "__main__":
print(mini_changelog())
+68
View File
@@ -0,0 +1,68 @@
#!/usr/bin/env python3
import dataclasses
import re
from pathlib import Path
from typing import Final
DIR: Final[Path] = Path(__file__).parent.parent.resolve()
OPTIONS_MD: Final[Path] = DIR / "docs" / "options.md"
SECTION_HEADER_REGEX = re.compile(r"^## (?P<name>.*?)$", re.MULTILINE)
# https://regexr.com/8f1ff
OPTION_HEADER_REGEX = re.compile(
r"^### (?P<name>.*?){.*#(?P<id>\S+).*}\n+> ?(?P<desc>.*)$", re.MULTILINE
)
@dataclasses.dataclass(kw_only=True)
class Option:
name: str
id: str
desc: str
section: str
def get_table() -> str:
options_md = OPTIONS_MD.read_text(encoding="utf-8")
sections = SECTION_HEADER_REGEX.split(options_md)[1:]
options = []
for section_name, section_content in zip(sections[0::2], sections[1::2], strict=True):
for match in OPTION_HEADER_REGEX.finditer(section_content):
option = Option(
name=match.group("name").strip(),
id=match.group("id").strip(),
desc=match.group("desc").strip(),
section=section_name.strip(),
)
options.append(option)
table_md = "\n<!-- This table is auto-generated from docs/options.md by bin/readme_options_table.py -->\n\n"
table_md += "| | Option | Description |\n"
table_md += "|---|---|---|\n"
last_section: str | None = None
for option in options:
cells: list[str] = []
cells.append(f"**{option.section}**" if option.section != last_section else "")
last_section = option.section
url = f"https://cibuildwheel.pypa.io/en/stable/options/#{option.id}"
name = option.name.replace(", ", "<br>") # Replace commas with line breaks
cells.append(f"[{name}]({url})")
cells.append(option.desc)
table_md += "| " + " | ".join(cells) + " |\n"
table_md += "\n"
return table_md
if __name__ == "__main__":
print(get_table())
-48
View File
@@ -1,48 +0,0 @@
#!/usr/bin/env python3
import re
import sys
from pathlib import Path
PROJECT_ROOT = Path(__file__).parent / ".."
CHANGELOG_FILE = PROJECT_ROOT / "docs" / "changelog.md"
README_FILE = PROJECT_ROOT / "README.md"
# https://regexr.com/622ds
FIRST_5_CHANGELOG_ENTRIES_REGEX = re.compile(r"""(^###.*?(?=###)){5}""", re.DOTALL | re.MULTILINE)
# https://regexr.com/622e5
README_CHANGELOG_SECTION = re.compile(
r"""(?<=<!-- START bin\/update_readme_changelog.py -->\n).*(?=<!-- END bin\/update_readme_changelog.py -->)""",
re.DOTALL,
)
def main() -> None:
changelog_text = CHANGELOG_FILE.read_text()
readme_text = README_FILE.read_text()
mini_changelog_match = FIRST_5_CHANGELOG_ENTRIES_REGEX.search(changelog_text)
assert mini_changelog_match, "Failed to find the first few changelog entries"
mini_changelog = "\n".join(
[
"",
"<!-- this section was generated by bin/update_readme_changelog.py -- do not edit manually -->",
"",
mini_changelog_match.group(0).strip(),
"",
"",
]
)
if not re.search(README_CHANGELOG_SECTION, readme_text):
sys.exit("Changelog section not found in README")
readme_text = re.sub(README_CHANGELOG_SECTION, mini_changelog, readme_text)
README_FILE.write_text(readme_text)
if __name__ == "__main__":
main()
+1 -1
View File
@@ -1 +1 @@
__version__ = "3.0.0b3"
__version__ = "3.0.0b4"
-1
View File
@@ -361,7 +361,6 @@ def build_in_container(
virtualenv_env = env.copy()
virtualenv_env["PATH"] = f"{venv_dir / 'bin'}:{virtualenv_env['PATH']}"
virtualenv_env["VIRTUAL_ENV"] = str(venv_dir)
virtualenv_env["PYTHONSAFEPATH"] = "1"
virtualenv_env = build_options.test_environment.as_dictionary(
prev_environment=virtualenv_env
)
-3
View File
@@ -648,9 +648,6 @@ def build(options: Options, tmp_path: Path) -> None:
virtualenv_env["MACOSX_DEPLOYMENT_TARGET"] = get_test_macosx_deployment_target()
# see https://github.com/pypa/cibuildwheel/issues/2358 for discussion
virtualenv_env["PYTHONSAFEPATH"] = "1"
virtualenv_env = build_options.test_environment.as_dictionary(
prev_environment=virtualenv_env
)
-2
View File
@@ -484,8 +484,6 @@ def build(options: Options, tmp_path: Path) -> None:
)
virtualenv_env["VIRTUAL_ENV"] = str(venv_dir)
virtualenv_env["PYTHONSAFEPATH"] = "1"
virtualenv_env = build_options.test_environment.as_dictionary(
prev_environment=virtualenv_env
)
-3
View File
@@ -553,9 +553,6 @@ def build(options: Options, tmp_path: Path) -> None:
pip_version=pip_version,
)
# see https://github.com/pypa/cibuildwheel/issues/2358 for discussion
virtualenv_env["PYTHONSAFEPATH"] = "1"
virtualenv_env = build_options.test_environment.as_dictionary(
prev_environment=virtualenv_env
)
+12 -12
View File
@@ -165,12 +165,12 @@ python_configurations = [
{ identifier = "cp313t-macosx_x86_64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.3/python-3.13.3-macos11.pkg" },
{ identifier = "cp313t-macosx_arm64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.3/python-3.13.3-macos11.pkg" },
{ identifier = "cp313t-macosx_universal2", version = "3.13", url = "https://www.python.org/ftp/python/3.13.3/python-3.13.3-macos11.pkg" },
{ identifier = "cp314-macosx_x86_64", version = "3.14", url = "https://www.python.org/ftp/python/3.14.0/python-3.14.0b1-macos11.pkg" },
{ identifier = "cp314-macosx_arm64", version = "3.14", url = "https://www.python.org/ftp/python/3.14.0/python-3.14.0b1-macos11.pkg" },
{ identifier = "cp314-macosx_universal2", version = "3.14", url = "https://www.python.org/ftp/python/3.14.0/python-3.14.0b1-macos11.pkg" },
{ identifier = "cp314t-macosx_x86_64", version = "3.14", url = "https://www.python.org/ftp/python/3.14.0/python-3.14.0b1-macos11.pkg" },
{ identifier = "cp314t-macosx_arm64", version = "3.14", url = "https://www.python.org/ftp/python/3.14.0/python-3.14.0b1-macos11.pkg" },
{ identifier = "cp314t-macosx_universal2", version = "3.14", url = "https://www.python.org/ftp/python/3.14.0/python-3.14.0b1-macos11.pkg" },
{ identifier = "cp314-macosx_x86_64", version = "3.14", url = "https://www.python.org/ftp/python/3.14.0/python-3.14.0b2-macos11.pkg" },
{ identifier = "cp314-macosx_arm64", version = "3.14", url = "https://www.python.org/ftp/python/3.14.0/python-3.14.0b2-macos11.pkg" },
{ identifier = "cp314-macosx_universal2", version = "3.14", url = "https://www.python.org/ftp/python/3.14.0/python-3.14.0b2-macos11.pkg" },
{ identifier = "cp314t-macosx_x86_64", version = "3.14", url = "https://www.python.org/ftp/python/3.14.0/python-3.14.0b2-macos11.pkg" },
{ identifier = "cp314t-macosx_arm64", version = "3.14", url = "https://www.python.org/ftp/python/3.14.0/python-3.14.0b2-macos11.pkg" },
{ identifier = "cp314t-macosx_universal2", version = "3.14", url = "https://www.python.org/ftp/python/3.14.0/python-3.14.0b2-macos11.pkg" },
{ identifier = "pp38-macosx_x86_64", version = "3.8", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-macos_x86_64.tar.bz2" },
{ identifier = "pp38-macosx_arm64", version = "3.8", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-macos_arm64.tar.bz2" },
{ identifier = "pp39-macosx_x86_64", version = "3.9", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.16-macos_x86_64.tar.bz2" },
@@ -199,18 +199,18 @@ python_configurations = [
{ identifier = "cp313t-win32", version = "3.13.3", arch = "32" },
{ identifier = "cp313-win_amd64", version = "3.13.3", arch = "64" },
{ identifier = "cp313t-win_amd64", version = "3.13.3", arch = "64" },
{ identifier = "cp314-win32", version = "3.14.0-b1", arch = "32" },
{ identifier = "cp314t-win32", version = "3.14.0-b1", arch = "32" },
{ identifier = "cp314-win_amd64", version = "3.14.0-b1", arch = "64" },
{ identifier = "cp314t-win_amd64", version = "3.14.0-b1", arch = "64" },
{ identifier = "cp314-win32", version = "3.14.0-b2", arch = "32" },
{ identifier = "cp314t-win32", version = "3.14.0-b2", arch = "32" },
{ identifier = "cp314-win_amd64", version = "3.14.0-b2", arch = "64" },
{ identifier = "cp314t-win_amd64", version = "3.14.0-b2", 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.9", arch = "ARM64" },
{ identifier = "cp312-win_arm64", version = "3.12.10", arch = "ARM64" },
{ identifier = "cp313-win_arm64", version = "3.13.3", arch = "ARM64" },
{ identifier = "cp313t-win_arm64", version = "3.13.3", arch = "ARM64" },
{ identifier = "cp314-win_arm64", version = "3.14.0-b1", arch = "ARM64" },
{ identifier = "cp314t-win_arm64", version = "3.14.0-b1", arch = "ARM64" },
{ identifier = "cp314-win_arm64", version = "3.14.0-b2", arch = "ARM64" },
{ identifier = "cp314t-win_arm64", version = "3.14.0-b2", arch = "ARM64" },
{ 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.16-win64.zip" },
{ identifier = "pp310-win_amd64", version = "3.10", arch = "64", url = "https://downloads.python.org/pypy/pypy3.10-v7.3.19-win64.zip" },
@@ -89,7 +89,7 @@ shellingham==1.5.4
# via typer
sniffio==1.3.1
# via anyio
typer==0.15.4
typer==0.16.0
# via
# auditwheel-emscripten
# pyodide-build
@@ -30,5 +30,5 @@ typing-extensions==4.13.2
# via delocate
virtualenv==20.31.2
# via -r cibuildwheel/resources/constraints.in
zipp==3.21.0
zipp==3.22.0
# via importlib-metadata
@@ -30,5 +30,5 @@ typing-extensions==4.13.2
# via delocate
virtualenv==20.31.2
# via -r cibuildwheel/resources/constraints.in
zipp==3.21.0
zipp==3.22.0
# via importlib-metadata
+27 -27
View File
@@ -1,47 +1,47 @@
[x86_64]
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2025.05.24-1
manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2025.05.24-1
manylinux_2_34 = quay.io/pypa/manylinux_2_34_x86_64:2025.05.24-1
musllinux_1_2 = quay.io/pypa/musllinux_1_2_x86_64:2025.05.24-1
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2025.05.28-1
manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2025.05.28-1
manylinux_2_34 = quay.io/pypa/manylinux_2_34_x86_64:2025.05.28-1
musllinux_1_2 = quay.io/pypa/musllinux_1_2_x86_64:2025.05.28-1
[i686]
manylinux2014 = quay.io/pypa/manylinux2014_i686:2025.05.24-1
musllinux_1_2 = quay.io/pypa/musllinux_1_2_i686:2025.05.24-1
manylinux2014 = quay.io/pypa/manylinux2014_i686:2025.05.28-1
musllinux_1_2 = quay.io/pypa/musllinux_1_2_i686:2025.05.28-1
[aarch64]
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2025.05.24-1
manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2025.05.24-1
manylinux_2_34 = quay.io/pypa/manylinux_2_34_aarch64:2025.05.24-1
musllinux_1_2 = quay.io/pypa/musllinux_1_2_aarch64:2025.05.24-1
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2025.05.28-1
manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2025.05.28-1
manylinux_2_34 = quay.io/pypa/manylinux_2_34_aarch64:2025.05.28-1
musllinux_1_2 = quay.io/pypa/musllinux_1_2_aarch64:2025.05.28-1
[ppc64le]
manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2025.05.24-1
manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2025.05.24-1
manylinux_2_34 = quay.io/pypa/manylinux_2_34_ppc64le:2025.05.24-1
musllinux_1_2 = quay.io/pypa/musllinux_1_2_ppc64le:2025.05.24-1
manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2025.05.28-1
manylinux_2_28 = quay.io/pypa/manylinux_2_28_ppc64le:2025.05.28-1
manylinux_2_34 = quay.io/pypa/manylinux_2_34_ppc64le:2025.05.28-1
musllinux_1_2 = quay.io/pypa/musllinux_1_2_ppc64le:2025.05.28-1
[s390x]
manylinux2014 = quay.io/pypa/manylinux2014_s390x:2025.05.24-1
manylinux_2_28 = quay.io/pypa/manylinux_2_28_s390x:2025.05.24-1
manylinux_2_34 = quay.io/pypa/manylinux_2_34_s390x:2025.05.24-1
musllinux_1_2 = quay.io/pypa/musllinux_1_2_s390x:2025.05.24-1
manylinux2014 = quay.io/pypa/manylinux2014_s390x:2025.05.28-1
manylinux_2_28 = quay.io/pypa/manylinux_2_28_s390x:2025.05.28-1
manylinux_2_34 = quay.io/pypa/manylinux_2_34_s390x:2025.05.28-1
musllinux_1_2 = quay.io/pypa/musllinux_1_2_s390x:2025.05.28-1
[pypy_x86_64]
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2025.05.24-1
manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2025.05.24-1
manylinux_2_34 = quay.io/pypa/manylinux_2_34_x86_64:2025.05.24-1
manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2025.05.28-1
manylinux_2_28 = quay.io/pypa/manylinux_2_28_x86_64:2025.05.28-1
manylinux_2_34 = quay.io/pypa/manylinux_2_34_x86_64:2025.05.28-1
[pypy_i686]
manylinux2014 = quay.io/pypa/manylinux2014_i686:2025.05.24-1
manylinux2014 = quay.io/pypa/manylinux2014_i686:2025.05.28-1
[pypy_aarch64]
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2025.05.24-1
manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2025.05.24-1
manylinux_2_34 = quay.io/pypa/manylinux_2_34_aarch64:2025.05.24-1
manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2025.05.28-1
manylinux_2_28 = quay.io/pypa/manylinux_2_28_aarch64:2025.05.28-1
manylinux_2_34 = quay.io/pypa/manylinux_2_34_aarch64:2025.05.28-1
[armv7l]
manylinux_2_31 = quay.io/pypa/manylinux_2_31_armv7l:2025.05.24-1
musllinux_1_2 = quay.io/pypa/musllinux_1_2_armv7l:2025.05.24-1
manylinux_2_31 = quay.io/pypa/manylinux_2_31_armv7l:2025.05.28-1
musllinux_1_2 = quay.io/pypa/musllinux_1_2_armv7l:2025.05.28-1
[riscv64]
+8
View File
@@ -16,6 +16,14 @@ If you've used previous versions of the beta:
#### v3.0.0b3
_29 May 2025_
- 🛠 Dependency updates, including Python 3.14.0b2 (#2371)
- 🛠 Remove the addition of `PYTHONSAFEPATH` to `test-environment`. (#2429)
- 📚 README table now matches docs and auto-updates. (#2427, #2428)
#### v3.0.0b3
_28 May 2025_
- 🛠 Reverts the test working dir (when test-sources isn't set) to a temporary dir, rather than the project. (#2420)
+3 -3
View File
@@ -60,7 +60,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@v3.0.0b3
uses: pypa/cibuildwheel@v3.0.0b4
```
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.
@@ -82,7 +82,7 @@ The second option, and the only one that supports other CI systems, is using a `
```bash
# requirements-cibw.txt
cibuildwheel==3.0.0b3
cibuildwheel==3.0.0b4
```
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:
@@ -247,7 +247,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==3.0.0b3 --output-dir wheelhouse
pipx run cibuildwheel==3.0.0b4 --output-dir wheelhouse
pipx run twine upload wheelhouse/*.whl
```
+4 -44
View File
@@ -1604,12 +1604,6 @@ A space-separated list of environment variables to set in the test environment.
The syntax is the same as for [`environment`](#environment).
cibuildwheel sets the variable
[`PYTHONSAFEPATH`](https://docs.python.org/3/using/cmdline.html#envvar-PYTHONSAFEPATH)
to avoid picking up in-tree dependencies when running the tests - we want to
test the installed wheel, not the in-tree version. However, this can be
overridden by setting `PYTHONSAFEPATH` to an empty string.
Platform-specific environment variables are also available:<br/>
`CIBW_TEST_ENVIRONMENT_MACOS` | `CIBW_TEST_ENVIRONMENT_WINDOWS` | `CIBW_TEST_ENVIRONMENT_LINUX` | `CIBW_TEST_ENVIRONMENT_IOS` | `CIBW_TEST_ENVIRONMENT_PYODIDE`
@@ -1622,8 +1616,8 @@ Platform-specific environment variables are also available:<br/>
# Set the environment variable MY_ENV_VAR to "my_value" in the test environment
test-environment = { MY_ENV_VAR="my_value" }
# Unset PYTHONSAFEPATH in the test environment
test-environment = { PYTHONSAFEPATH="" }
# Set PYTHONSAFEPATH in the test environment
test-environment = { PYTHONSAFEPATH="1" }
```
!!! tab examples "Environment variables"
@@ -1632,8 +1626,8 @@ Platform-specific environment variables are also available:<br/>
# Set the environment variable MY_ENV_VAR to "my_value" in the test environment
CIBW_TEST_ENVIRONMENT: MY_ENV_VAR=my_value
# Unset PYTHONSAFEPATH in the test environment
CIBW_TEST_ENVIRONMENT: PYTHONSAFEPATH=
# Set PYTHONSAFEPATH in the test environment
CIBW_TEST_ENVIRONMENT: PYTHONSAFEPATH=1
```
@@ -1889,40 +1883,6 @@ Some options support placeholders, like `{project}`, `{package}` or `{wheel}`, t
}
}
// write the markdown table for the README
var markdown = ''
markdown += '| | Option | Description |\n'
markdown += '|---|--------|-------------|\n'
var prevHeader = null
for (var i = 0; i < headers.length; i += 1) {
var header = headers[i];
var headerOptions = options[header];
for (var j = 0; j < headerOptions.length; j += 1) {
var option = headerOptions[j];
if (j == 0) {
markdown += '| **'+header+'** '
} else {
markdown += '| '
}
var optionNames = option.name.trim().split(', ')
var url = 'https://cibuildwheel.pypa.io/en/stable/options/#'+option.id;
var namesMarkdown = $.map(optionNames, function(n) {
return '[`'+n+'`]('+url+') '
}).join(' <br> ')
markdown += '| '+namesMarkdown+' '
markdown += '| '+option.description.trim()+' '
markdown += '|\n'
}
}
console.log('readme options markdown\n', markdown)
// add the option tags to each heading
$('.rst-content h3')
.each(function (i, el) {
+3 -3
View File
@@ -6,7 +6,7 @@ jobs:
- bash: |
set -o errexit
python3 -m pip install --upgrade pip
pip3 install cibuildwheel==3.0.0b3
pip3 install cibuildwheel==3.0.0b4
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==3.0.0b3
python3 -m pip install cibuildwheel==3.0.0b4
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==3.0.0b3
pip install cibuildwheel==3.0.0b4
displayName: Install dependencies
- bash: cibuildwheel --output-dir wheelhouse .
displayName: Build wheels
+3 -3
View File
@@ -11,7 +11,7 @@ jobs:
- run:
name: Build the Linux wheels.
command: |
python3 -m pip install --user cibuildwheel==3.0.0b3
python3 -m pip install --user cibuildwheel==3.0.0b4
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==3.0.0b3
python3 -m pip install --user cibuildwheel==3.0.0b4
python3 -m cibuildwheel --output-dir wheelhouse
- store_artifacts:
path: wheelhouse/
@@ -44,7 +44,7 @@ jobs:
name: Build the OS X wheels.
command: |
sudo softwareupdate --install-rosetta --agree-to-license # for python<=3.8 or x86_64/universal2 tests
pip3 install cibuildwheel==3.0.0b3
pip3 install cibuildwheel==3.0.0b4
cibuildwheel --output-dir wheelhouse
- store_artifacts:
path: wheelhouse/
+1 -1
View File
@@ -1,6 +1,6 @@
build_and_store_wheels: &BUILD_AND_STORE_WHEELS
install_cibuildwheel_script:
- python -m pip install cibuildwheel==3.0.0b3
- python -m pip install cibuildwheel==3.0.0b4
run_cibuildwheel_script:
- cibuildwheel
wheels_artifacts:
+1 -1
View File
@@ -1,6 +1,6 @@
build_and_store_wheels: &BUILD_AND_STORE_WHEELS
install_cibuildwheel_script:
- python -m pip install cibuildwheel==3.0.0b3
- python -m pip install cibuildwheel==3.0.0b4
run_cibuildwheel_script:
- cibuildwheel
wheels_artifacts:
+1 -1
View File
@@ -44,7 +44,7 @@ jobs:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/cibuildwheel@v3.0.0b3
uses: pypa/cibuildwheel@v3.0.0b4
env:
CIBW_PLATFORM: ${{ matrix.platform }}
CIBW_ARCHS: ${{ matrix.archs }}
+1 -1
View File
@@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/cibuildwheel@v3.0.0b3
uses: pypa/cibuildwheel@v3.0.0b4
# env:
# CIBW_SOME_OPTION: value
# ...
+1 -1
View File
@@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v4
- name: Build wheels
run: pipx run cibuildwheel==3.0.0b3
run: pipx run cibuildwheel==3.0.0b4
- uses: actions/upload-artifact@v4
with:
+1 -1
View File
@@ -21,7 +21,7 @@ jobs:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@v3.0.0b3
uses: pypa/cibuildwheel@v3.0.0b4
env:
# configure cibuildwheel on Linux to build native archs ('auto'),
# and to split the remaining architectures between the x86_64 and
+3 -3
View File
@@ -12,7 +12,7 @@ linux:
DOCKER_TLS_CERTDIR: ""
script:
- curl -sSL https://get.docker.com/ | sh
- python -m pip install cibuildwheel==3.0.0b3
- python -m pip install cibuildwheel==3.0.0b4
- cibuildwheel --output-dir wheelhouse
artifacts:
paths:
@@ -23,7 +23,7 @@ windows:
before_script:
- choco install python -y --version 3.12.4
- choco install git.install -y
- py -m pip install cibuildwheel==3.0.0b3
- py -m pip install cibuildwheel==3.0.0b4
script:
- py -m cibuildwheel --output-dir wheelhouse --platform windows
artifacts:
@@ -35,7 +35,7 @@ windows:
macos:
image: macos-14-xcode-15
before_script:
- python3 -m pip install cibuildwheel==3.0.0b3
- python3 -m pip install cibuildwheel==3.0.0b4
script:
- python3 -m cibuildwheel --output-dir wheelhouse
artifacts:
+1 -1
View File
@@ -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==3.0.0b3
- python -m pip install cibuildwheel==3.0.0b4
# Assuming your CI runner's default architecture is x86_64...
- cibuildwheel --output-dir wheelhouse --platform linux --archs aarch64
artifacts:
+1 -1
View File
@@ -20,7 +20,7 @@ jobs:
- ln -s /c/Python312/python.exe /c/Python312/python3.exe
install:
- python3 -m pip install cibuildwheel==3.0.0b3
- python3 -m pip install cibuildwheel==3.0.0b4
script:
# build the wheels, put them into './dist'
+1 -1
View File
@@ -26,7 +26,7 @@ jobs:
- ln -s /c/Python312/python.exe /c/Python312/python3.exe
install:
- python3 -m pip install cibuildwheel==3.0.0b3
- python3 -m pip install cibuildwheel==3.0.0b4
script:
# build the wheels, put them into './wheelhouse'
+2 -2
View File
@@ -52,7 +52,7 @@ jobs:
- stage: deploy
name: Build and deploy Linux wheels
services: docker
install: python3 -m pip install cibuildwheel==3.0.0b3 twine
install: python3 -m pip install cibuildwheel==3.0.0b4 twine
script: python3 -m cibuildwheel --output-dir wheelhouse
after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl
# Deploy on windows
@@ -60,7 +60,7 @@ jobs:
name: Build and deploy Windows wheels
os: windows
language: shell
install: python3 -m pip install cibuildwheel==3.0.0b3 twine
install: python3 -m pip install cibuildwheel==3.0.0b4 twine
script: python3 -m cibuildwheel --output-dir wheelhouse
after_success: python3 -m twine upload --skip-existing wheelhouse/*.whl
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "cibuildwheel"
version = "3.0.0b3"
version = "3.0.0b4"
description = "Build Python wheels on CI with minimal configuration."
readme = "README.md"
license = "BSD-2-Clause"
+4 -1
View File
@@ -1,5 +1,6 @@
import textwrap
import packaging.utils
import pytest
from cibuildwheel.logger import Logger
@@ -37,7 +38,9 @@ def test(tmp_path, build_frontend_env, capfd):
# check that the expected wheels are produced
expected_wheels = utils.expected_wheels("spam", "0.1.0")
assert set(actual_wheels) == set(expected_wheels)
actual_wheels_normalized = {packaging.utils.parse_wheel_filename(w) for w in actual_wheels}
expected_wheels_normalized = {packaging.utils.parse_wheel_filename(w) for w in expected_wheels}
assert actual_wheels_normalized == expected_wheels_normalized
enable_groups = utils.get_enable_groups()
if EnableGroup.GraalPy not in enable_groups:
+1 -1
View File
@@ -95,7 +95,7 @@ def test(manylinux_image, tmp_path):
actual_wheels = utils.cibuildwheel_run(project_dir, add_env=add_env)
platform_tag_map = {
"manylinux2014": ["manylinux_2_17", "manylinux2014"],
"manylinux2014": ["manylinux2014", "manylinux_2_17"],
}
expected_wheels = utils.expected_wheels(
"spam",
+2 -8
View File
@@ -66,12 +66,6 @@ class TestSpam(TestCase):
bits = struct.calcsize("P") * 8
if bits == 32:
self.assertIn(platform.machine(), ["i686", "armv7l","armv8l", "wasm32"])
def test_pythonsafepath(self):
# check that the PYTHONSAFEPATH environment variable is set
value = os.environ.get("PYTHONSAFEPATH")
self.assertIsNotNone(value)
self.assertNotEqual(value, "")
'''
@@ -256,8 +250,8 @@ def test_test_environment(tmp_path):
actual_wheels = utils.cibuildwheel_run(
project_dir,
add_env={
"CIBW_TEST_ENVIRONMENT": "MYVAR=somevalue PYTHONSAFEPATH=",
"CIBW_TEST_COMMAND": "python -c \"import os; assert os.environ.get('MYVAR') == 'somevalue'; assert os.environ.get('PYTHONSAFEPATH') == ''\"",
"CIBW_TEST_ENVIRONMENT": "MYVAR=somevalue PYTHONSAFEPATH=1",
"CIBW_TEST_COMMAND": "python -c \"import os; assert os.environ.get('MYVAR') == 'somevalue'; assert os.environ.get('PYTHONSAFEPATH') == '1'\"",
},
)
# also check that we got the right wheels
+4 -4
View File
@@ -250,11 +250,11 @@ def _expected_wheels(
if manylinux_versions is None:
manylinux_versions = {
"armv7l": ["manylinux_2_17", "manylinux2014", "manylinux_2_31"],
"i686": ["manylinux_2_5", "manylinux1", "manylinux_2_17", "manylinux2014"],
"x86_64": ["manylinux_2_5", "manylinux1", "manylinux_2_28"],
"armv7l": ["manylinux2014", "manylinux_2_17", "manylinux_2_31"],
"i686": ["manylinux1", "manylinux2014", "manylinux_2_17", "manylinux_2_5"],
"x86_64": ["manylinux1", "manylinux_2_28", "manylinux_2_5"],
"riscv64": ["manylinux_2_31", "manylinux_2_35"],
}.get(machine_arch, ["manylinux_2_17", "manylinux2014", "manylinux_2_28"])
}.get(machine_arch, ["manylinux2014", "manylinux_2_17", "manylinux_2_28"])
if musllinux_versions is None:
musllinux_versions = ["musllinux_1_2"]