我在 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 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'])
用于将您的索引与pip
create ~/.pip/pip.conf
包含以下内容:
[global]
index-url = https://remco:[email protected] /cdn-cgi/l/email-protection/pypi/simple
cert = /etc/ssl/certs/your_cert_CA.pem
有关的一点文档pip.conf
is here http://pip.readthedocs.org/en/latest/user_guide.html#configuration在 pypiserver 上here https://pypi.python.org/pypi/pypiserver#configuring-pip-easy-install
也许你也可以尝试使用package_index='https://user:[email protected] /cdn-cgi/l/email-protection/pypi/simple
in setup.py
.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)