我在nginx代理后面设置了一个pypiserver,它使用htpasswd进行身份验证。我目前能够上传sdists,但我不知道如何下载他们。我希望能够在运行setup.py test时并以某种方式使用pip下载它们。这个是可能的吗?
[distutils]
index-servers =
private
[private]
repository = https://example.com/pypi
username = remco
password = mypass为了增加难度,服务器目前正在使用未经验证的ssl连接。
我尝试了以下基于http://pythonhosted.org/setuptools/setuptools.html#setuptools-package-index的设置,但是关于它的唯一文档是'XXX‘
#!/usr/bin/env python2.7
from setuptools import setup
setup(
name='asd',
version='0.0.1',
package_index='https://example.com/pypi/simple',
test_suite='test',
tests_require=['foo==0.0.1'])发布于 2014-03-17 15:26:13
必须正确设置服务器证书。要使用pip上传,必须创建一个有效的~/.pypirc文件:
[distutils]
index-servers = example
[example]
repository = https://example.com/pypi
username = myname
password = mypass在安装软件包时,需要在.pip/pip.conf中添加以下部分
[global]
extra-index-url = https://myname:mypass@example.com/pypi/simple正如针织品在先前的回答中所指出的,用户index-url也可以代替extra-index-url。这确实意味着奶酪店不被用作第二台服务器。
要使用带有setuptools单元测试的私有服务器,需要将以下内容添加到setup.py中
from setuptools import setup
setup(
...
dependency_links=[
'https://myname:mypass@example.com/pypi/packages/'
])https://stackoverflow.com/questions/22052288
复制相似问题