Don't constrain build-system.requires with our dependency-versions - #2583
Conversation
|
The tests are asserting on the version of |
freakboy3742
left a comment
There was a problem hiding this comment.
馃憤 Seems reasonable to me from an iOS perspective, and I can't fault the general logic.
|
I decided not to pin the version of pip inside the build venv. It was not as easy as setting VIRTUALENV_PIP (this doesn't appear to do anything, fwiw, I think that pip/build uses |
This test is not needed since pypa#2583 and will fail with pip>=26.2
This test is not needed since pypa#2583 and will fail with pip>=26.2
* fix: test_overridden_pip_constraint with pip>=26.2 * fix(tests): delete test_overridden_pip_constraint This test is not needed since #2583 and will fail with pip>=26.2
Fix #2570.
Don't constrain the versions installed during the package build using
dependency-versions. See #2570 for full discussion. AI summary of the change belowThis change stops cibuildwheel's dependency-versions from being applied as constraints within the isolated build environment used for the package build. This resolves an issue where conflicts between cibuildwheel's internal requirements and a project's build-system.requires would cause cryptic build failures.
The Problem
Currently, on macOS, Windows, and Pyodide platforms, cibuildwheel injects its own dependency constraints (from CIBW_DEPENDENCY_VERSIONS or the defaults) into the isolated environment where a project's build-time dependencies are installed.
This leads to an issue: if a project specifies a build requirement in pyproject.toml (e.g., conan) that has a dependency conflict with cibuildwheel's constraints (e.g., on urllib3), the build fails with an unhelpful subprocess.CalledProcessError traceback.
This behaviour is also inconsistent, as it does not occur on Linux, which invokes the build without injecting these internal constraints.
The Solution
Remove the logic that sets the PIP_CONSTRAINT and UV_CONSTRAINT environment variables on the build_env before invoking the build frontend (
pip wheelorbuild).The effect is:
The user's project's build-time dependencies are now resolved independently, without interference from cibuildwheel's toolchain constraints.
The build process behaviour is now the same across all platforms (Linux, macOS, Windows, and Pyodide)