* tests: fully type the test suite
* chore: require more typing
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* 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
* 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>
* 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>
* 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>
* feat: add armv7l in auto_archs when running on aarch64
This depends on aarch32 EL0 support and thus is done conditionally.
* ci(travis): move to Ubuntu 22.04 / cp312
* 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>
* 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>
* chore: rework single python tests
* chore(tests): limit number of builds in test_abi3
* chore(tests): limit number of builds in test_before_all
* apply review suggestion
use `os.path.samefile` rather than comparing `os.stat` directly.
* Add CPython 3.10 support
* Fix logger displaying CPython 3.1 instead of 3.10
* Fix tests failing with CPython 3.10
* Use pytest instead of nose
* feat: --pre flag
Apply suggestions from code review
Co-authored-by: Matthieu Darbois <mayeut@users.noreply.github.com>
* fix: update Python update script to process beta versions
* refactor: prerelease-pythons
* Use `strtobool` to parse `CIBW_PRERELEASE_PYTHONS` env var
* Update python version filtering for universal2 & arm64
* Filter out CPython 3.10 and above for `test_manylinuxXXXX_only[manylinux1]` test
* Use CIBW_BUILD filtering rather than CIBW_SKIP for test_docker_images
* Use skip_patterns to filter out pre-releases
* Use `prerelease_pythons` instead of `pre`
* Reword `CIBW_PRERELEASE_PYTHONS` doc per review.
* Use `CIBW_PRERELEASE_PYTHONS: True` for usage example.
* Update `cibuildwheel --help` doc
* docs: add note on spec.filter
* Clean up the BuildSelector __repr__ by refactoring
* fix: remove platform variants for CIBW_PRERELEASE_PYTHONS
* docs: mention the flag
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Joe Rickerby <joerick@mac.com>
Potentially revert / remove on release of PyPy 7.3.4.
* patching linux and macos
* try test
* add patch files for pypy2.7
* fix installing
* Combine patch files into one
* Simplify further, and add test to remind ourselves to remove the PyPy patch
* ignore fail of patch on linux
make new test failing only on linux
* fix test
* add timeout
* fix patch on linux
* change `-N` to `--force`
Co-authored-by: Yannick Jadoul <yannick.jadoul@belgacom.net>