-
Notifications
You must be signed in to change notification settings - Fork 283
fix: apply base constraints to build env #2544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Henry Schreiner <[email protected]>
6fdea59
to
13cdb30
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes constraint handling in the build environment to prevent losing base constraints when custom constraints are specified. It addresses failures like #2542 by ensuring base constraints are always applied alongside custom ones.
- Changes constraint file generation to use persistent
.in
files instead of temporary files - Adds logic to merge custom constraints with base constraints from
.in
files - Creates new constraint input files for Pyodide Python versions 3.12 and 3.13
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
noxfile.py | Updates constraint generation to write to persistent .in files instead of temporary files |
cibuildwheel/util/resources.py | Adds CONSTRAINTS_IN constant for the base constraints input file |
cibuildwheel/util/packaging.py | Implements logic to merge custom constraints with base constraints from .in files |
cibuildwheel/resources/constraints-pyodide313.in | New constraint input file for Python 3.13 Pyodide builds |
cibuildwheel/resources/constraints-pyodide312.in | New constraint input file for Python 3.12 Pyodide builds |
Comments suppressed due to low confidence (2)
Co-authored-by: Copilot <[email protected]>
for more information, see https://pre-commit.ci
Hmmm. I don't follow this yet... why would adding more constraints fix the dependency resolve - it looks to me that pip tries to install a later version of pyodide-build but that doesn't satisfy the resolver for some reason... |
I think I found a neater solution here - ddc285c |
#2548 fixes the current problem. I think unless there's a strong reason to do something like this, I'd be opposed to a solution like this,
|
This hopefully will help with failures like #2542 and main. Currently, we lose all constraints, even our base ones, when there's custom constraints. This adds any required constraints used to generate the constraint file to the constraints always.