-
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
Fix pip install --target #4103
Fix pip install --target #4103
Conversation
do you think you can derive an acceptance test for this? |
Do |
Regarding exclusivity: Setting Regarding tests: |
So, if |
my opinion is that the priority in order should be |
My guess would be the one given most explicitly should have the highest priority, i.e. anything directly set on the command line overrides defaults set somewhere else. (There we can easily check if more than one is given and throw an error). The other question is what happens when multiple defaults are set somewhere. (Ubuntu has |
I suppose that priorities are (low)-->(high) Is there a mechanism to know that some |
Also override defaults set somewhere (e.g. .pydistutils.cfg) when command line switches are given.
Also check if prefix from .pydistutils.cfg is overriden.
Sorry, I messed up my git and ended up deleting and recreating the branch. Did not know that this will force-close the pull-request. |
What happened to this pull request in the end? |
#4557 handles all of this. |
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. |
Currently
pip install --target
does fail when a prefix is set (e.g. in a .pydistutils.cfg).This is especially the case on macOS when Python is installed via Homebrew.
It used to fail in the same way when using the
--user
flag. This was initially fixed in b227c45Now I just replicated this fix for the usage of
--target
.Interestingly,
--target
used to work when supplying--install-option="--prefix="
at the command line as advised in Homebrew-and-Python.md, but now doesn't anymore.The error message changes though whether
--install-option="--prefix="
is set or not. - When the option is set, pip fails whenget_lib_location_guesses
callsdistutils_scheme
, so it seems the--install-prefix
switch is ignored there.Anyway, this pull request should fix it all by enforcing
prefix
to be empty when--target
is used.Although this works fine for me, I am not yet sure if these changes would break anything else,