-
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
Add "block index" package index option #7723
Comments
For the use case of testing install behavior I think it would make more sense to specify an explicit configuration file with |
I wonder if it’d be possible to do something like
where |
@ei8fdb Another thing you might want to explore - how pip's index specification options work, and how we could possibly improve that. |
If I understand correctly (big if), the user (person, CI, ...) could try install patterns by programmatically setting up an env and parsing the On a computer with an index in pip.conf, any program like so (unless they altered the pip.conf file, yuck) would not fix the problem in this issue |
I like this. Solves the #6221 concern. Not sure how OS works. Do you typically wait for consensus from maintainers before going ahead with the implementation? |
In this proposal, is it not resetting
What I am saying is that if you want to test installation of your package and you do not want pip to use an index URL that may be configured in a system pip.conf, then create a config file with |
I was thinking about the former; to generalise, the proposal is to make it possible to “reset” config file and environment variables in list form from the argument list. Indeed this deviates a lot from the current argument parsing mechanism (and thus not really viable without significant work). This would need to be a topic to evaluate in the UX research first, as mentioned above. |
I think that my comment above helps provide a workable approach for testing. Taking into account that this is something users are not likely to run into, the general desire to limit the number of CLI options in pip, and that we now have an explicit issue (this one) that people can find if they are in a similar situation, I will close this. The more general proposal at #4263 may be good to look at for anyone interested in improving this area of pip. Thank you @mbardwell for this proposal and for your prototype. |
What's the problem this feature will solve?
Often companies have privately hosted indexes that contain shared python libraries. If the index is set in the computers pip.conf,
pip install
checks that index. As it currently stands, the best way to test install behaviour with that index blocked is to remove the index from pip.confDescribe the solution you'd like
It would be nice to have a command line method to block specific indexes
pip install mypackage --block-index-url http://pypi.company.com/simple
Alternative Solutions
--no-index
would block the index but other indexes should still be available for testingThe text was updated successfully, but these errors were encountered: