You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Couple of important notes for this (as someone who will use it, and may end up implementing it (or mentoring someone throguh it)):
the command may not be a Python script/module
if it is, it may not be running in the same Python as simpleindex does
if the user passes python, that isn't automatically a PATH search like they may expect1
at least initially, PIP_INDEX_URL and PIP_TRUSTED_HOST env variables need to be set for the subcommand
Footnotes
Windows tries "adjacent to the current executable" first in this case. But documenting this ought to be sufficient, the workarounds are less reliable and most tools don't do them anyway. ↩
Regarding the PATH point doing a shutil.which is probably good idea with behaviour better expected by users.
I know that's the temptation, but shutil.which also prefers the CWD, which might be the expected behaviour, but it's not the best behaviour. Documenting (and possibly warning on a command that contains no SEP characters?) is almost certainly best.
See discussion in pypa/pip#11771
The text was updated successfully, but these errors were encountered: