* Revert to running tests from from a temp dir when test-sources is unset
* Fix placeholders error message, add test for it
* Add back {project} placeholders to CIBW_TEST_COMMAND in tests & docs
* Update test/test_before_test.py
---------
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
* Fix a typo: pyoodide ➡️ pyodide
* Add `pyodide_build_version` attribute
* Add version to xbuildenv log step
* Add version to Emscripten log step
* Use `pyodide-build`'s version for updating constraints
* Bump Pyodide constraints by updating `pyodide-build`
* Add a schema for `pyodide-version`
* Update Pyodide constraints
* Bump `pyodide-build` to new 0.29.0
* Test out another Pyodide identifier
* Update outdated Pyodide constraints
* Add Pyodide version to temp directory name
* Remove Pyodide 0.26.1 from build configurations
* Retrieve + validate + install specific xbuildenvs
* Test wheel builds with Pyodide 0.26.2
* Add correct Pyodide version to identifier temp dir
* Don't pre-call Pyodide xbuildenv search
* Fetch just the stable Pyodide versions
* Refactor search + validation + install into one step
* Move all of it under a lock
* Reorder xbuildenv installation
* Add env and cwd to xbuildenv search call
* Temporarily lower to 0.26.2 target
* Separate out search, validate, install; again
* Run xbuildenv search in `CIBW_CACHE_PATH`
* Remove prior `PYODIDE_ROOT` env vars, copy envs
* Validate doesn't need to depend on searching
* Add file lock when searching xbuildenvs
* Test the original version: 0.26.1
* Update Pyodide constraints
* Update constraints for `pyodide-build` 0.29.0 again
* Bump Pyodide from version 0.26.1 ➡️ version 0.26.4
* Add note on compatibility for macOS + other archs
* Note Pyodide version for Pyodide identifier
* Docs about `CIBW_PYODIDE_VERSION`
* Don't fetch just the stable versions
* Discard a variable that's not used later
* Rename `search_xbuildenv` ➡️ `get_xbuildenv_versions`
* `validate_xbuildenv` ➡️ `validate_xbuildenv_version`
* Replace ordered comment, add newline
* Replace sentence on macOS support
Co-Authored-By: Hood Chatham <roberthoodchatham@gmail.com>
* Capitalise: "pyodide" ➡️ "Pyodide"
Co-Authored-By: Hood Chatham <roberthoodchatham@gmail.com>
* "work" ➡️ "may succeed"
Co-Authored-By: Hood Chatham <roberthoodchatham@gmail.com>
* Add another job to test a custom Pyodide version
* Handle "v"-prefixed + non-prefixed versions
* Convert to a proper toml-able option, and remove some hardcoded versions
This removes the enscripten and pyodide-build version specs from
pyproject.toml - pyodide-build is spec'd in the constraints file, and
the emscripten version can be read from the pyodide-build output.
* Add a schema entry
* Add docs for CIBW_PYODIDE_VERSION
* Rephrase
* Add tests for pyodide-version
* Apply suggestions from code review
* Add python_build_standalone util
* Hook up to python-build-standalone, removing dependency on host python
* Remove python hard-code in action.yml
* Add log step
* Add workaround for https://github.com/pyodide/pyodide-build/issues/143
* Add emscripten pytest test
* Remove unneeded checks
* Fix a pytest invoke for emscripten
* Generate pyodide-build constraints from the pinned pyodide version
* Remove pyodide python-build-standalone workaround
* Fixup paths from newer version of pyodide-build
* Fix/skip some failing tests
* Use `python -m pytest` on pyodide, even on Linux
* Docs fixes
* Don't call the github API at runtime, cache the release assets instead
* Ignore pylint false positive
* Add version auto-updating for pyodide
* Add support for pyodide 3.13.
* Fix tests for multiple pyodide wheels
* Remove workaround for unreleased pyodide-build
* Rename to "test_pyodide"
* Fix pathname confusion
* Remove extra github actions job
* Fix expectation for test_abi_none
* Fix the custom_repair_wheel test to actually have clashing names
* Fix pinned version test
* Document test-command limitation
* Remove pyodide 0.28.0a1 for now
* Update constraints files
* Docs/test fixes post removing pyodide cp313
* Fix ABI test expectation
* Docs improvements
* Improve some comments
* Remove logic duplication
* remove pyodide special casing
* Refactor constraints code to use a utility script, circumventing import issues
* chore: nicer nox env
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* fix: typo in variable name found by copilot
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* Apply suggestions from code review
* Some more Pyodide version updates in the docs section
* We haven't released Pyodide v0.27.6 yet
* Back to the Github URL for cross-build-environments
* `pyodide-build`, not `emsdk` for Windows skips
Co-Authored-By: Hood Chatham <roberthoodchatham@gmail.com>
* Move to a separate `_json_request` function
Co-Authored-By: Hood Chatham <roberthoodchatham@gmail.com>
* Rename "retries" ➡️ "retry_count"
* Add some type hints
* Copy env vars before `UV_CUSTOM_COMPILE_COMMAND`
* Use `HTTPError.headers.get` instead
* Remove extra end quote
* Change download tests URL to `https://badssl.com/`
Co-Authored-By: Joe Rickerby <1244307+joerick@users.noreply.github.com>
* Download size changes, too
* Use jsdelivr for Github asset mirroring
* Bump to Pyodide v0.27.6
* Fix unit tests
* Move to pyodide v0.27.6 again
* Bump to pyodide-build 0.30.4
* Use new URL for cross-build environments metadata
Co-authored-by: Joe Rickerby <joerick@mac.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
Co-authored-by: Joe Rickerby <joerick@mac.com>
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Joe Rickerby <1244307+joerick@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add TEST_ENVIRONMENT option and set PYTHONSAFEPATH=1 in the test env
Closes https://github.com/pypa/cibuildwheel/issues/2358
* Add toml docs examples
* Add TOML examples
* Use double-quotes for windows
* Change to the iOS testing option semantics
Don't assume the presence of `python -m` in the test command. Less magic
and allows more option reuse between platforms.
* Update schema
* Add a test for this warning
* Don't try to execute a test-command when it doesn't look like a module
* Update docs/options.md
Co-authored-by: Malcolm Smith <smith@chaquo.com>
* Only allow invalid test command if the first part is 'pytest'
* Responses to code review from @freakboy3742
* Fixes post-merge
---------
Co-authored-by: Malcolm Smith <smith@chaquo.com>
* Allow CIBW_ENABLE to control the wheels built in testing
* Set CIBW_ENABLE using PR labels
* Add docs
* Build everything on the main branch
* Add CIBW_ENABLE=all option
This was mostly for use in the `main` building case, because otherwise it's maybe a bit too easy to forget to update this file when adding an enable group
* Remove dead code
* Make unit tests robust to the value of CIBW_ENABLE
* Fix tests that explicitly choose pypy
* Fix test expectation
* Don't expect impossible wheels in expected_wheels
* Simplify logic in expected_wheels
* CircleCI- run with CIBW_ENABLE=all only on the main branch
* Azure pipelines - run with CIBW_ENABLE=all on main branch
* Update gitlab to run CIBW_ENABLE=all on main
* Set CIBW_ENABLE=all on travis - it only runs on main anyway
* Fix job name error on CircleCI
* Fix tests for graalpy
* Update the test configuration to use the label
* Remove duplication of default value. Make it affect sample build too
* Move the action to after deps are installed
* GraalPy workaround for this assumption
* Make unit test resilient to changing CIBW_ENABLE
* Properly close files used for testing
* Add support for GraalPy
* Help GraalPy discover build tools on Windows
* Expect manylinux-interpreters ensure graalpy* warning in pip
* Workaround GraalPy bugs on Windows
* Workaround oracle/graalpython#491 also when uv is not available
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update azure-pipelines.yml
* Update azure-pipelines.yml
* refacotor: use pathlib.write_text
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* Include GraalPy in docker_warmup and remove workaround for installing it late
---------
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
* feat: initial support for riscv64
* use enable for riscv64
* Apply review suggestion
Co-authored-by: Joe Rickerby <joerick@mac.com>
* update documentation
---------
Co-authored-by: Joe Rickerby <joerick@mac.com>
* Split the docs into sections
* Split the options page into two pages - so the reference is more clean
* Reorder/Tidy up this 'deliver' page to make auto-deploy more obvious
* Fix up some links
* Merge the platform docs into a single page to clean up the navbar.
* Split the setup page to make a page dedicated to CI setup
* Move general platform-specific information into the platforms page
* Tidy up the platforms page
* Remove some redundancy in the cpp/platforms docs
* Clarify this section
* Move another FAQ entry to the platforms page
* Remove some out-of-date entries from the FAQ
* A few corrections to the options page
* Fix some broken links
* Improve the Docker references
* Update bump version filename
* Improve options TOC information density
* whitespace
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
* Convert the normal test invocation to `pytest ./tests`, not placeholder
---------
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
* Add the ability to declare safe tools in a cross-build environment.
* Add an xfail if cmake isn't available on the test machine.
* Placate linter regarding positional args.
* Rework test to provide more robust confirmation of safe tools.
* Remove a test skip condition that is no longer needed.
Co-authored-by: Joe Rickerby <joerick@mac.com>
* Rename the setting to xbuild-tools.
* Add docs to clarify that xbuild-tools is transitive.
* Raise a warning if xbuild-tools isn't defined.
* Correct a bad copy-paste in the schema generator.
* .. and now fix the indentation.
* Move sentinel handling earlier into the parsing process.
* Remove serialization from tests that won't start a test suite.
---------
Co-authored-by: Joe Rickerby <joerick@mac.com>
* drop EOL manylinux images
* chore: use multi-arch manylinux images as a source for image tag
Using multi-arch images directly messes with parallel tests for now.
Using them as a source for image tag ensures that all architecture specific tags are pointing to the same tag for a given manylinux / musllinux policy.
* Apply review suggestion
Co-authored-by: Joe Rickerby <joerick@mac.com>
---------
Co-authored-by: Joe Rickerby <joerick@mac.com>
* Add support for building iOS wheels.
* Replace use of system() in test binary module.
* Restored the 'minimal' approach of the minimal examples.
* Split out platform details into standalone pages, and expand iOS platform details.
* More doc corrections.
* Bump support package to include fix for python/cpython#130292
* Ensure iOS tests are all run on the same xdist worker.
* More iOS documentation tweaks.
* Factor out common xcode version test utility.
* Simplify iOS to a single platform with an expanded interpretation of arch.
* I guess I should update the iOS tests as well...
* Additional safety for missing iOS test output.
* Remove DYLD_LIBRARY_PATH from the iOS environment.
* Make test-sources mandatory for iOS builds.
* Updates and clarifications to documentation.
* Clarify what a slice is.
* Normalize use of underscores in platform name.
* Modify auto target to be matching CPU only.
* Use consistent ordering of platforms in examples.
* Use consistent naming in iOS archiectures.
* Placate the linter.
* Miscellaneous cleanups picked up by @joerick's review.
* Correct the list of expected wheels.
* Correct which 'native' we're actually checking.
* Correct the docs links so they're all relative.
* Correct the identification of free threaded builds.
* Use target instead of host to describe the platform we're building for.
* Rework iOS test to remove issue with log completeness.
* Convert errors to FatalError
Co-authored-by: Matthieu Darbois <mayeut@users.noreply.github.com>
Co-authored-by: Joe Rickerby <joerick@mac.com>
* Removed a repeated check for a valid python.
* Update bin/update_pythons.py to update iOS support packages.
* Document that iOS CI is available on other platforms.
* Restore a comment needed for some platforms.
* Small cleanups identified in code review
Co-authored-by: Joe Rickerby <joerick@mac.com>
* Simplify logic to appease linter.
* Modify dependency constraint handling to use new API.
* Cosmetic change to trigger a CI rebuild.
---------
Co-authored-by: Matthieu Darbois <mayeut@users.noreply.github.com>
Co-authored-by: Joe Rickerby <joerick@mac.com>
2025-03-11 16:48:35 -04:00
Joe Rickerbyandpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Write docs for inline dependency-versions
* Change the `inline` keyword to `packages` for better readability
* Implement inline package constraints
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add schema for TOML properties
* Change the parsing of the option to parse filenames as-is
* Add a unit test for table-parsing of the option
* Remove unneeded shlex.quote on the dependency-version test
* Tidy-ups, comments, docs fixes
* Add test for empty packages option value
* Fix empty packages scenario
And, remove some optionals to reduce the problem space
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add test_sources configuration option.
* Add pyodide implementation.
* Modify default test behavior to run in the project directory.
* Update the test for running in the project directory.
* Apply suggestions from code review
Co-authored-by: Joe Rickerby <joerick@mac.com>
* Add shlex quoting to test-sources.
* Restructure ctypes example to avoid issues running from the project folder.
---------
Co-authored-by: Joe Rickerby <joerick@mac.com>
* Add note about the planned change of the manylinux default
* Update docs/options.md
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
* Change date to 6th May
Co-authored-by: Matthieu Darbois <mayeut@users.noreply.github.com>
* no manylinux_2_28 pypy_i686 image
* no manylinux_2_28 i686 image
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
Co-authored-by: Matthieu Darbois <mayeut@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Refactor error handling to use exceptions
cibuildwheel has up until now handled most errors by printing an error message to sys.stderr and calling sys.exit. Others were handled using Logger.error, depending on the context. We also had return codes, but these weren't explicitly defined anywhere.
This makes that convention more explicit and codified. Now to halt the program, the correct thing to do is to throw a cibuildwheel.errors.FatalError exception - that is caught in main() and printed before exiting. The existing behaviour was kept - if an error occurs within a build step (probably something to do with the build itself), the Logger.error() method is used. Outside of a build step (e.g. a misconfiguration), the behaviour is still to print 'cibuildwheel: <message>'
I also took the opportunity to add a debugging option `--debug-traceback` (and `CIBW_DEBUG_TRACEBACK`), which you can enable to see a full traceback on errors.
(I've deactivated the flake8-errmsg lint rule, as it was throwing loads of errors and these error messages aren't generally seen in a traceback context)
* add noqa rule
* Apply suggestions from code review
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
* Return to flake8-errmsg conformance
* Code review suggestions
* Subclass Exception rather than SystemExit
* apply error handling to new code and fix merge issues
* Apply review suggestion
* fix: merge issue
* Update cibuildwheel/errors.py
---------
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
Co-authored-by: mayeut <mayeut@users.noreply.github.com>
* feat: add Pyodide support
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
Co-authored-by: Matthieu Darbois <mayeut@users.noreply.github.com>
tests: fix two merge issues
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
fix: include schema
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* Try to fix xbuildenv path
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Try to install pyodide-build from main branch
Try again
Try again
Update constraints file
Try again
Remove unused variable
Drop constraints
Remove --download option
Fix xbuildenv install
Try again
Try again
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix: remove pinning on pyodide
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* Update for Pyodide 0.26.0a5
* Install pyodide-build from pypi
* Update docs/options.md
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
* Unxfail things that look like they were just a version mismatch
* refactor: add constraints for pyodide
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* chore: minor cleanup
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* Apply suggestions from code review
* Apply suggestion from code review
* refactor: minor touchup
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* ci: xfail the pyodide test
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* review: use a pinned version of node
* fix tests
* review: error out on Windows
* test: check node & test on macos arm64
* chore: minor cleanup
* Add reference to emscripten libc issue
* Apply suggestion from code review
* review: use a pinned pip in test virtual environment
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* chore: rework test virtual environment seed packages
* chore: workaround direct invocation of pytest
This allows to still test direct invocation of `pytest` on most platforms (including pyodide on Linux) but falls back to `python -m pytest` when running pyodide on macOS.
* Use release version of pyodide
* fix: tests for 0.26.0 & parallel initialization of xbuildenv
* Debug CI
* fix: test/test_build_frontend_args.py
* Revert "Debug CI"
This reverts commit 917646cffc96dbfc619c47d1c03a828f447bcdb7.
---------
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Matthieu Darbois <mayeut@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>