Do not allow --target, --user, --root and --prefix together
See original GitHub issue--target
, --user
, --root
and --prefix
are mutually exclusive and simply donβt make sense when used together. Instead of failing for irrelevant errors, the error should explicitly describe why it is not excepted. This is currently implemented in GH-7828. I move the discussion here since the PR to avoid distracting the code review process.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Combine --user with --prefix error with setup.py install
One time workaround: pip install --user --install-option="--prefix=" <package_name>. or python setup.py install --user --prefix=.
Read more >IAM JSON policy elements: Condition operators
Describes the operators that you can use in the Condition element of the IAM JSON policy language.
Read more >Configure the source tree - Apache HTTP Server Version 2.4
Configure for building compilers for the system type TARGET . It defaults to HOST . This option is offered by autoconf and not...
Read more >The Buildroot user manual
Why not use the target directory as a chroot directory? ... By default, Buildroot does not support top-level parallel build, so running make...
Read more >cmake-toolchains(7) β CMake 3.25.1 Documentation
For toolchains that do not support linking binaries without custom flags or ... by default in all cases, as well as looking in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It smells like
tempfile.mkdtemp(dir=root/'tmp', prefix='pip-target-')
is used as a temporary installation location and the files are never moved intotarget
.There are subtleties here, as @pradyunsg said. I appreciate that current behaviour is weird and likely broken in many cases, but see this xkcd comic π
Specific things that should be considered:
--user
in their global config, and then they donβt have a way of switching it off. Having it ignored rather than erroring out when combined with other flags may be important to such users. This may be sufficient to want to behave differently depending on whether the flag came from config or command line, Which isnβt something weβve ever done before, I believe.--user
the default. This is an even more extreme case of the previous point.--root
or--prefix
- they are likely the main users of those flags (I donβt think end users specify them manually very often) so weβd need to understand how they expect things to work, or be prepared to react quickly if we break something for them.Thatβs quite a lot of research to do.
With the new resolver work in full swing, and a release coming soon, I doubt many of the @pypa/pip-committers will have a lot of time to look at this issue in the near future. But if you were able to investigate some of the points above, and summarise your findings as you did with the current behaviour, that would help a lot when the discussion does get restarted.
Sorry if this sounds like stalling on the issue - the work youβve put in here is genuinely appreciated, and Iβd love to get this tidied up. Just not right now π