setup.py not honoring PIP_INDEX_URL

家住魔仙堡 提交于 2019-12-06 05:19:06

Create setup.cfg in the same folder as your setup.py with following content:

[easy_install]
allow_hosts = *.myintranet.example.com

From: http://pythonhosted.org/setuptools/easy_install.html#restricting-downloads-with-allow-hosts

You can use the --allow-hosts (-H) option to restrict what domains EasyInstall will look for links and downloads on.

--allow-hosts=None prevents downloading altogether.


sconsin

I ran into the same issue. Fundamentally, setup.py is using setuptools which leverages easy_install, not pip. Thus, it ignores any pip-related environment variables you set.

Rather than use python setup.py develop you can run pip (from the top of the package) pip install -e . to produce the same effect.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!