I'd like to trigger the discussion for how we'd get to pip using build internally, to orchestrate the pyproject.toml-based builds. The first obvious question is: Are the build maintainers interested in pip moving to doing something like this?
Assuming the answer is yes (if it's no, then please go ahead and close this issue), the things that need to be figured out for this are:
-
Environment management: pip will likely need to create it's own subclass, that determines how pip will get installed into the environment. We might actually move to using an import hook for making pip available in the build environment?
-
Fork-bomb protection: build currently uses pip to install packages in the build environments, which means it is protected from a recursive build graph by pip's implementation of that protection (search for "build tracker" in pip's codebase). We'd need some way to recreate these protections when we switch to using build internally to pip.
-
The importlib-metadata dependency: pip currently does not vendor importlib_metadata and I'm wary of adding more dependencies to pip's dependency graph. This dependency is only there for a utility function, that pip won't actually use -- can we move that to be an optional dependency as an extra?
I'd like to trigger the discussion for how we'd get to pip using
buildinternally, to orchestrate the pyproject.toml-based builds. The first obvious question is: Are thebuildmaintainers interested in pip moving to doing something like this?Assuming the answer is yes (if it's no, then please go ahead and close this issue), the things that need to be figured out for this are:
Environment management:
pipwill likely need to create it's own subclass, that determines how pip will get installed into the environment. We might actually move to using an import hook for making pip available in the build environment?Fork-bomb protection:
buildcurrently uses pip to install packages in the build environments, which means it is protected from a recursive build graph by pip's implementation of that protection (search for "build tracker" in pip's codebase). We'd need some way to recreate these protections when we switch to usingbuildinternally to pip.The importlib-metadata dependency:
pipcurrently does not vendorimportlib_metadataand I'm wary of adding more dependencies to pip's dependency graph. This dependency is only there for a utility function, that pip won't actually use -- can we move that to be an optional dependency as an extra?