-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Feature: Specify constraints file for the isolated build environment #13300
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
Comments
I've been thinking the same for a little while and mentioned it just a moment ago: #9081 (comment) There's some design questions, and I don't know how If a build dependency needs building is the And for that matter, how is the env variable Other maintainers may feel differently, but I would be supportive of someone submitting a well tested PR for this flag, assuming these design questions are answered and tested for. |
Also related: #8439 |
Also related is #13208 , in that it has the same underlying cause (environment variables that are supposed to correspond to command-line options, differ in terms of whether they are forwarded to the build environment). |
I have thought about the design of how constraints and build constraints would interact in pip, I have a branch that implements this but I still have a fair bit of work to add tests for this design. I think the design is easiest presented in table form. Here is the current state:
And here would be the new state:
They key here is that Secondly I have modeled the current havior of Finally there is the situation of I am not likely to publish this PR for at least a month, so there is no rush. |
There are a couple of other designs that would be simpler, but both would introduce at least minor backwards incompatibilities. Passing
Or not pass
|
Related discussions regarding pinning build deps and the use of
|
What's the problem this feature will solve?
The recent hickup with setuptools 78.0.1 has shown:
-c
option of pip does not affect its isolated build environmentPIP_CONSTRAINT
env var does influence its isolated build environmentSee pypa/setuptools#4910 (comment) for details.
That difference is inconsistent and the documentation also does not reveal the difference nor does it even talk about the isolated build environment: https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-c
Describe the solution you'd like
Add a command line option and corresponding env var that allows specifying a constraints file for only the isolated build environment whenever pip builds a package, e.g. when installing from a tarball.
The "uv" installer does have a
UV_BUILD_CONSTRAINT
env var and--build-constraint
option specifically for constraints on the isolated build environment.Alternative Solutions
Additional context
May be related to #8439
Code of Conduct
The text was updated successfully, but these errors were encountered: