Add "block index" package index option
See original GitHub issueWhat’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.conf
Describe 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 testing
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Index blocks | Elasticsearch Guide [8.5] | Elastic
By default, you must explicitly name the indices you are adding blocks to. To allow the adding of blocks to indices with _all...
Read more >pip requirements.txt with alternative index - Stack Overflow
Your answer "Add an extra index location...just before the package/project name" implies a per package option. @Rafael-WO IIRC you can't do it in...
Read more >Using the DBMS_REPAIR Package - Oracle Help Center
DBMS_REPAIR PL/SQL package. Performs block checking for a specified table, partition, or index. It populates a repair table with results. DB_VERIFY utility.
Read more >Block Search Indexing with 'noindex' - Google Developers
A noindex tag can block Google from indexing a page so that it won't appear in ... header instructing search engines not to...
Read more >Advanced Usage of Pipenv - Python Packaging Authority
You may install a package such as the example torch from the named index pytorch ... add install_search_all_sources = true option to your...
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
In this proposal, is it not resetting
--index-url
and--extra-index-url
because they are after--no-index
on the command line or because they are provided as command-line arguments and the other indexes that get overridden are in a config file which has lower precedence? Either way deviates from the way we currently handle other arguments.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
index-url
set to whatever you want to test (or nothing) and then setPIP_CONFIG_FILE
to the path to that file. Then pip will not read the system-level pip.conf.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.