`search` command uses --index, while `install` uses --index-url #589

Closed
hltbra opened this Issue Jun 29, 2012 · 4 comments

Comments

Projects
None yet
5 participants
Member

hltbra commented Jun 29, 2012

It is confusing and got it wrong right now, I think it would be nice for options that behaves equally to be the same name.

PS.: A rename would break backwards compatibility, and I don't know how many people use this feature.

xavfernandez added a commit to xavfernandez/pip that referenced this issue Sep 6, 2015

xavfernandez added a commit to xavfernandez/pip that referenced this issue Sep 7, 2015

@xavfernandez xavfernandez added this to the 8.0 milestone Sep 9, 2015

xavfernandez added a commit to xavfernandez/pip that referenced this issue Oct 5, 2015

Contributor

xavfernandez commented Oct 5, 2015

An issue is that --index-url points to https://pypi.python.org/simple/ while --index points to https://pypi.python.org/pypi/.

Not sure how to define in the config files different values for --index-url depending on the command (install vs search).

This is causing us a lot of headaches because our configuration management tool requires an index url, but it doesn't expose whether it is using it for search or for install (spoiler: it does BOTH) and so having to figure out why the calls are failing simply because of the presence or absence of /simple is NOT an exercise that should be required by the user of pip.

Pip should accept one format of index-url globally and automatically append /simple if that is required for installation, or better yet if it was passed --index-url and not --index if it sees /simple at the end of the URL it REMOVES the extra /simple automatically when performing a search. Having the intelligence in pip would allow you to make it backwards compatible with the old options, but accepting a single style for BOTH calls as well as supporting the config file's index URL for searching, this would be HUGE.

@xavfernandez xavfernandez removed this from the 8.0 milestone Dec 17, 2015

lvlie commented Dec 21, 2015

hi @dragon788, of course you are right. However, is it possible to omit both options from the pip command and put them in /etc/pip.conf instead? Then both search and install should work without index-url and/or index.

Owner

dstufft commented Mar 24, 2017

This is essentially a duplicate of #395 since that is the reason why we have different names for these configurations.

@dstufft dstufft closed this Mar 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment