-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[INTERNAL] BuildEnvironment.install_requirements cannot be called twice #5904
Comments
Given #5841, I'm not sure if that option is still needed. |
Why not? |
Surely there could be other packages in the |
Indeed. |
Anyway, I've a WIP for this, I'll push something by the end of the week. |
Oh, cool! Thanks - I've been thinking about this but struggling to find a good way of implementing it. Looking forward to seeing your PR :-) |
Fix now in #5743 |
Closing since it's in the PR now. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Environment
Description
The internal API
BuildEnvironment.install_requirements
does not work correctly when called twice. Because it uses--ignore-installed
to allow installing requirements into the build environment that are already present in the system environment, it's possible for a second call to the function to install a requirement that is already present (possibly a different version) resulting in a corrupted build environment.Expected behavior
Multiple calls to
install_requirements
should work the same way as multiplepip install
invocations.How to Reproduce
See the discussion in #5743 (in particular the comments starting here).
As this is an internal API, it is not possible to see an issue using pip as a command line app. However, the changes required for PEP 517 need this capability, so the problem has the potential to cause issues when PEP 517 support lands (specifically, if
pyproject.toml
and the build backend'sget_requires_for_build_wheel
hook return different versions of the same project).The text was updated successfully, but these errors were encountered: