`--install-option` should work for wheels?
qwcode opened this issue · 3 comments
currently, for installing wheels:
--user&--rootworks- pip's own
--targetworks, (but this is often not very useful, since it only installs modules) --install-*options work if set in distutils config files (since wheel installs, in pip, ultimately get their scheme from distutils internally)pip install --install-option=does not work
I understand there's a desire for wheel to work in the future with no connection to distutils at all, but at the moment, the situation is fractured, and not ideal at all to have less control than sdists when installing.
for now, it seems to me, we should do the work to map the --install-option params into pip.locations.distutils_scheme a la this comment #1439 (comment)
failing that, I think we do one of the following:
- fail when wheels are found and using
--install-option - although I would hate doing it "quietly", automatically map to
--no-use-wheelwhen using--install-option
Just ran into this, trying to get get-pip.py to install the pip binaries in /usr/bin rather than /usr/local/bin. Unfortunately because setuptools is needed to install from source, the --no-use-wheel isn't an option until it's too late.
The use case in this instance is installing pip for python3 on a ubuntu system that already has a pip binary placed there by a deb package.
This existing pip binary is in /usr/bin, however get-pip.py installs a binary in /usr/local/bin since there's no conflict there, which is then prefered over the existing python2 pip. The new pip binary is only created when there's no conflict, so forcing it to install into /usr/bin would solve this issue as only a new pip3 binary would be created.
EDIT: To clarify, the desired option here was --install-scripts
+1 on having a --install-scripts option for wheel installations.
After all wheels are supposed to make life easier for end-users, but on MacOS, for which wheels are really great otherwise, users very rarely have the default location for Python scripts in their path.
So you have to either tell people to add it to PATH or to create a symlink and, simple as this may seem, it's not a one-line installation anymore and already scares some people.
If you could tell them instead to use:
pip3 install package --install-scripts /usr/local/bin
it's quite a bit better already