* Add pyodide_315 support
Guarded by cpython_prerelease for the moment.
* Update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update constraints to pyodide-build 0.39.0
* Update to 315.0.0a2
* Remove example versions
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* docs: add missing cp314-pyodide_wasm32 to build-id table
The build-id table in docs/options.md is hand-maintained, so a new
identifier can be missed when build-platforms.toml changes. Add a unit
test that checks every identifier appears in the table to guard against
this.
Assisted-by: ClaudeCode:claude-opus-4.8
* test: skip docs table check when docs/options.md is absent
Assisted-by: ClaudeCode:claude-opus-4.8
Since #2609, the pyodide platform required the 'pyodide-build' frontend,
but a global build-frontend setting (TOML or CIBW_BUILD_FRONTEND)
overrides the platform default, so previously-working configs like
build-frontend = "build" failed with a ConfigurationError. Even
"default" failed, since it was mapped to "build" before the check.
Resolve "default" to the platform default, and warn and use
pyodide-build when another frontend is set on pyodide, matching
pre-#2609 behavior where the frontend name only affected verbosity
flags.
Assisted-by: ClaudeCode:claude-opus-4.8
Drops the GraalPy 3.11 / GraalPy 24.2 builds (gp311_242) as agreed in
pypa/cibuildwheel#2741: a ~6-month overlap after the GraalPy 25 (gp312)
release. GraalPy 3.12 (gp312_250) stays.
This also removes the GraalPy 24-only workarounds that were explicitly
marked "Remove when GraalPy 24.x is dropped":
- the Visual Studio compiler-discovery (vswhere) and build-isolation
(graalpython#491) workarounds in the Windows backend
- the issue-491 Windows skip/filter hacks in test_pep518 and
test_dependency_versions (added in the original GraalPy PR #1538 and
unneeded since GraalPy 25 per #2597)
The uv-doesn't-support-graalpy skip (#2754), the `graalpy` enable group,
and the generated constraints pins apply to all GraalPy and are kept.
Assisted-by: ClaudeCode:claude-opus-4.8
* fix: minor 4.0 issues in android validation, docs, and docstring
- android: raise a clear FatalError when ANDROID_API_LEVEL is not an
integer, instead of an uncaught ValueError deep in localized_vars
- docs: note that delvewheel is the default Windows repair-wheel-command
since 4.0 and how to skip it for platform-tagged wheels with no
extension module; update the now-outdated FAQ wording
- venv: fix _parse_pip_constraint_for_virtualenv docstring to say
marker-bearing constraints are evaluated against the host's default
environment (not skipped) when marker_env is None
Assisted-by: ClaudeCode:claude-opus-4.8
* fix: use int() with original error for ANDROID_API_LEVEL validation
Handle ANDROID_API_LEVEL validation via try/except around int() so the
original exception message is surfaced, and so non-ASCII Unicode digits
(which isdigit() accepts but int() may reject) are handled correctly.
Assisted-by: ClaudeCode:claude-opus-4.8
* refactor: address reivew by moving error catch
Assisted-by: ClaudeCode:claude-opus-4.8
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
---------
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Since delvewheel is now the default repair-wheel-command on Windows,
update all places where auditwheel/delocate were referenced but
delvewheel was missing:
- diagram.html: add delvewheel repair block for Windows (was grouped
with ios/pyodide as optional dot)
- generate_schema.py: add Windows delvewheel default to the platform
loop so schema.json includes the default
- schema.json: regenerated with Windows delvewheel default
- options.md: add Windows to defaults list, remove outdated tip about
delvewheel being early-stage/optional, update examples
- contributing.md: add delvewheel to the tool list
Assisted-by: OpenCode:glm-5.1
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
* feat: add CIBUILDWHEEL_BUILD_IDENTIFIER environment variable
Set `CIBUILDWHEEL_BUILD_IDENTIFIER` to the current build identifier
(e.g. `cp311-manylinux_x86_64`) in the environment for all per-build
steps: `before_build`, the build itself, `repair_command`,
`before_test`, and `test_command`.
This allows scripts and commands to inspect which build is currently
running, which is useful for e.g. writing per-build output files:
CIBW_TEST_COMMAND='pytest --junit-xml=results-$CIBUILDWHEEL_BUILD_IDENTIFIER.xml'
The variable is set after the user's environment overrides are applied
and is only available for per-build steps (not `before_all`, where no
single identifier applies). All six platforms are covered: linux, macOS,
Windows, pyodide, Android, and iOS.
Closes#944, closes#2750
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Assisted-by: OpenCode:claude-sonnet-4.6
* fix: address review comment moving this for Android
Assisted-by: OpenCode:glm-5.1
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
---------
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Use auditwheel on Android
* Add auditwheel command to defaults
* pkgconfig fixes
* Pre-import ctypes before monkey-patching in _cross_venv
* Set PKG_CONFIG and PKG_CONFIG_RELOCATE_PATHS variables
* Initial attempt at using mzakharo/android-gfortran
* Switch to using termux/ndk-toolchain-clang-with-flang
* Move PKG_CONFIG variables from build_env to android_env
* Simplify flang installation
* Add cross build files for NumPy
* Add ldpaths entry for libomp
* Add `--rm` to docker command line
* Make Rust and Fortran shims consistent
* Update documentation
* Default to API level 24 on all Python versions
* Clarify comments
* Cleanups
* Fix tests:
* Set up Android env after installing pkgconf
* Add tests for successfully using an older API level
* Previous commit's auditwheel failure is fixed in the auditwheel PR
* Update how-it-works diagram
* Add tests for repair errors
* Add more repair tests
* Add test for Meson and Fortran
* Add test for cross build files
* Improve test_api_level error message
* Add xbuild-files option
* use pypa/auditwheel@main
* Remove dependencies which are no longer needed
* Fix README
* Update to auditwheel 6.7.0
* Fix compatibility with pkgconf 2.5.1.post2
* Documentation clarifications
Co-authored-by: Joe Rickerby <joerick@mac.com>
* Fortran shim improvements
* Add Jinja variables to new_meson_project
* Update run_example_ci_configs for changed new_meson_project signature
* Add missing dependency to run_example_ci_configs
---------
Co-authored-by: mayeut <mayeut@users.noreply.github.com>
Co-authored-by: Joe Rickerby <joerick@mac.com>
* WIP - initial punt at audit command
* Add `abi3audit` as a dependency
* Add helper functions to check stable ABI wheels
* Run `abi3audit` for macOS and Windows wheels
* Copy out of container for repairing?
* Add some notes that `cibuildwheel` runs `abi3audit`
* Add basic unit tests
* Add a basic C extension with `Py_LIMITED_API`
* Add a test project that violates Stable ABI
* Fix linux test
* Skip abi3 wheel tests for Pyodide
* Patch the correct subprocess module
* wrap cleanup of abi3audit dir
* Write the docs for the new options
* Move to above testing in docs
* Implement audit-requires and audit-command
* Some cleanups after self-review
* Add default value
* fix type errors
* the key is `audit-command`, not `audit`
* Add a variety of tests for audit requires options
* Add `test_audit_requires` similar to `test_test_requires`
* Add some configurability-related audit tests
* Fix parsing error with options docs leaving out commands
* Better way to extract version (maybe helps Pyodide?)
* Fix a case of unbound `use_uv`
* Standardise: rename to `abi3_wheel`
* Fix audit command run message
* Simplify custom audit command a bit
* Remove unnecessary skip for Pyodide
* Pyodide should have no default audit command
* More accurate skip messages for Pyodide skips
* Wheels are audited after they are repaired
* Regenerate constraints to include `abi3audit`
* Fix typos
* Some attempts for Windows fixes
* Check `pyvenv.cfg` instead of directory existence
* Add validation for lack of wheel placeholders
* Try yet another Windows `uv` fix
* Regenerate diagram and re-trigger Azure CI
* Add missing `import sys` for abi3 C extension tests
* Remove audit-command at the global level
* Clarify `abi3audit` pinning a little bit
* Regen constraints
* Discard changes to cibuildwheel/resources/constraints-pyodide312.txt
* Discard changes to cibuildwheel/resources/constraints-pyodide313.txt
* try opt-in uv again
* fix issue on windows on Python 3.13 related to nested venvs
On win / python 3.13, virtualenv creates a venv where the 'home'
points back to the venv that sys.executable was running in, rather
than the root install. that seemingly leads to problems with package
resolution, where pip.exe couldn't find the pip python package.
this appears to fix it!
* Update constraints
* chore: revert python-discovery bump
Assisted-by: OpenCode:glm-5.1
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
* fix: restore workaround for graalpy
Assisted-by: OpenCode:glm-5.1
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
---------
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Co-authored-by: Henry Schreiner <henryfs@princeton.edu>
* Add a default repair wheel command for Windows
* Install `delvewheel` into Windows build tools
* Add delvewheel to constraints file
* Regenerate constraints
* Docs
* Suggest how to disable Windows wheel repair
* Add tests
* Run `delvewheel` with verbose mode as default
* Add note about telling delvewheel where to look
Suggested-by: Nils <nilsnolde@proton.me>
* Partially revert 81374bb8fc43acefed76cb13d761a9e6cf6afa58
* Add `pip` and `uv` cases for build installations
* Ignore `python-native.dll` for GraalPy
* Ignore MSVC DLLs, try Windows amd64 graalpy happy
* Fix last remaining Windows test failure (famous last words?)
* Update constraints
* Drop workaround unneeded with delvewheel v1.12.1
* Update docs/options.md
Co-authored-by: Aohan Dang <adang1345@gmail.com>
* Drop `test_delvewheel_default_on_windows`
* Partially revert "Update constraints"
This partially reverts commit 2dc4c0f4951858959e213463d90431a5ca03b96f.
* Add a test case when repair command is `""`
* Add back test that checks delvewheel run/disable
* Add a C project with a missing DLL
* Add tests for `missing_dll_project`
* Partially undo virtualenv/python-discovery update
* Fix test
* Discard changes to cibuildwheel/resources/constraints-pyodide312.txt
* Discard changes to cibuildwheel/resources/constraints-pyodide314.txt
* Fix bad merge of constraints
* Discard changes to cibuildwheel/resources/constraints-pyodide313.txt
* Manually add more GraalPy pip markers
* Dependency parsing was too naïve
* Maybe a better way to invoke the compiler on Windows
* Can we get away without a DLL?
---------
Co-authored-by: Aohan Dang <adang1345@gmail.com>
* Make the {project} placeholder available to repair-wheel-command
* Add separate test for {project} placeholder in repair-wheel-command
* Make the {project} placeholder available to repair-wheel-command
* reduce duplicated work in tests
* Use a valid wheel filename for the post-repair name
---------
Co-authored-by: Joe Rickerby <joerick@mac.com>
pypa/manylinux now has a manylinux_2_35_armv7l image allowing for better C++20 support.
piwheels is still building for Debian Bullseye so keeping manylinux_2_31 as the default image.
* Add test-execution-args option.
* Add usage of test-execution-args.
* Add CI configuration to use test-execution-args.
* Document the test-execution-args setting.
* Simplify code using or syntax instead of inline if.
Co-authored-by: Malcolm Smith <smith@chaquo.com>
* Clarified some Android-specific terminology, and added details about the default args to the test runner.
* Switch to a dict-based test-execution configuration
* Add tests for test-execution parsing.
* Add all the files before pushing...
* Add note about default Android version for testbed.
* Improve description of test-execution setting.
Co-authored-by: Joe Rickerby <joerick@mac.com>
* Switch to using test-runtime.
---------
Co-authored-by: Malcolm Smith <smith@chaquo.com>
Co-authored-by: Joe Rickerby <joerick@mac.com>
* Update Android test-command handling
* Update to Python 3.13.8
* Update documentation and tests
* Deal with `sysconfig.get_config_var("exec_prefix")` changing in Python 3.14, and add cross venv tests
* Allow test commands starting with `python3`
* test-command cleanups
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* docs: Note the evalution order of environment variables
* Remove example that doesn't reinforce good practice
Co-authored-by: Joe Rickerby <joerick@mac.com>
---------
Co-authored-by: Joe Rickerby <joerick@mac.com>
* Add Python 3.14 for Android
* Simplify GitHub Actions workflows
* Update tests
* Allow running `patchelf` even when the environment's `bin` directory is not on the PATH
* Search in both the environment's bin directory and the PATH
* Use `sysconfig.get_path`
* Fix lint warning
* Add Android to resource files
* Add Android to miscellaneous places
* Add Android documentation
* Docs cleanups
* Add Android platform module; implement top-level structure and target Python installation
* Implement setup_env and build_wheel
* lru-dict build working
* Alter prefix in sysconfigdata file; fix various issues with FLAGS variables
* Implement Android testing
* Add type annotations to _cross_venv
* Revert Python 3.8 to pip 25.0.1
* Make test-sources required on Android
* Add Android integration tests
* Test cleanups
* Add test of all available Python versions
* Update test-sources and test-command behavior to match iOS
* Documentation cleanups
* Replace Builder class with a set of global functions
* Rename "env" to "build_env"
* Remove Chaquopy repository from default pip command line
* Move native_platform to platforms module
* Fix parse_config_settings
Co-authored-by: Joe Rickerby <joerick@mac.com>
* Add unit tests for parse_config_settings and arch_synonym
* Make `shell_prepared` arguments keyword-only, and add tests for the commands that use it
* Replace `importlib.util.spec_from_file_location` with `runpy.run_path`
* Use python-build-standalone
* Update Android Python
* Enable KVM in Linux CI
* Move KVM code to test_android.py
* Use Java 17 on Azure
* Install emulator if necessary before running -accel-check
* Free up additional disk space on Linux runners
* Add sudo
* Skip emulator tests on CI platforms that don't support it
* Download Android Python from Maven Central
* Free up more disk space on Linux runners
* fix: minor fixups
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* Set sysconfig._BASE_PREFIX to support sysconfig.get_path("include")
* Get ANDROID_API_LEVEL from the build environment, not cibuildwheel's own environment
* Correct relative path of test-sources
* Pass a CMake toolchain file to the build
* Add "repair" step which adds libc++ to the wheel when necessary
* Add missing needs_emulator decorator
* Provide useful error message if ANDROID_HOME is not set
* Remove use of HOST environment variable
* Update to Python 3.15.5
* Fix PyLint warnings, clarify comment
* Group common arguments into a dataclass
* Handle environment variables containing newlines
* Discourage the use of `pytest` test commands without `python -m`
* Use single quotes in user-visible messages
* Improve testing documentation
* Pass wheel filename to `log.build_end`
* In GitHub Actions example, skip Android tests on macOS
* Correct relative paths in `patchelf --set-rpath`
* Clarify `test-sources` docs
* Update to Python 3.13.5+20250722.214220
---------
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Joe Rickerby <joerick@mac.com>
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
This is no longer experimental in 3.13 beta 3, so we don't need an enable for it anymore. Someone can skip expliclity with `'cp31?t-*'` if they really don't want free-threaded wheels.
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* Bump testing version to 0.28.0
* Bump Pyodide constraints
* Add Pyodide 0.28.0 identifier
* Override to a different, alpha version for testing
* Update docs for Pyodide versions everywhere
* Add comment on using older Pyodide alpha version
* Bump to `"cp313*"` for compatibility
* Drop identifier for Pyodide 0.28.0a3
* Add back Pyodide 0.28.0a3 identifier
* Add helpful comment about pyodide-prerelease option
* Fix test and add a comment about it
* Keep one Pyodide version per Python version
* Fix docs for `pyodide-prerelease`; Python ➡️ Pyodide
* Update utils.py
* Drop CI test step for overridden Pyodide version
Suggested-by: Joe Rickerby <joerick@mac.com>
---------
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
* Added Python 3.14 preview for iOS
* Test all Python versions with iOS
* add cp314-ios to the build selector table
---------
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
Co-authored-by: Joe Rickerby <joerick@mac.com>