-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Experiemental build env backend by pypa/build #11602
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
base: main
Are you sure you want to change the base?
Conversation
583d63e
to
6a2d7c7
Compare
Oh fun, I was working on getting #10720 working locally, with the logic moved behind a flag. I guess I should push that so that we can share each other's logic and pick the best parts. :) |
The current build backend is moved to a subpackage, and the new one can be enabled with --use-feature=build.
6a2d7c7
to
23d6d21
Compare
This one’s partly done as an exercise so I can have a better idea how build’s environment population logic fits into pip. And my conclusion after finishing it is… not very well. It’s doable, but the amount of glue code doesn’t seem worthwhile. I’m currently leaning toward pip should still create the build environment with its own logic (your PR), and run |
Hmm... I see I do think we can/should get rid of that separation, since it's not particularly meaningful IMO -- and that's something I think we should do as a part of this change.
I'm not sure that there's not much value in that -- as far as I understand, |
In that case it’s probably best if we don’t go through |
I do think there'd be value in moving to an implementation that aligns our virtual environment creation with build's default w/ venv, and having those two use the exact-same underlying code (i.e. moving that code into build, and using it from there). |
Any luck on resurrecting this PR? This one seems like the most self-contained change. There are so many issues that pop up due to the fake-venv, that I hope the default would be moved to the proper venv-ed environment, and only give a flag for the old method when it fails. |
Sadly no. Replacing the build isolation mechanism is a major task with considerable compatibility concerns. That means only a pip maintainer would likely be able to implement the necessary rewrite. None of the active maintainers have this issue on their radar, and even fewer have the necessary experience/expertise to make changes in this area. For the time being, you should use uv which AFAIK creates a proper virtual environment to isolate the build. |
The current build backend is moved to a subpackage, and the new one can be enabled with
--use-feature=build
.