Install python package from private pypiserver

穿精又带淫゛_ 提交于 2019-12-05 12:26:44

for using your index with pip create ~/.pip/pip.conf with this content:

[global]
index-url = https://remco:mypass@build.d-centralize.nl/pypi/simple
cert = /etc/ssl/certs/your_cert_CA.pem

A little bit documentation on pip.conf is here and on pypiserver here

Perhaps you can also try using package_index='https://user:pass@example.com/pypi/simple in setup.py.

The server certificate had to be setup properly. For uploading using pip one must create a valid ~/.pypirc file:

[distutils]
index-servers = example

[example]
repository = https://example.com/pypi
username = myname
password = mypass

For installing packages one needs to add the following section to .pip/pip.conf

[global]
extra-index-url = https://myname:mypass@example.com/pypi/simple

As knitti noted in a previous answer it is also possible to user index-url instead of extra-index-url. This does mean that the cheese shop is not used as a second server.

For using a private server with setuptools unittesting you need to add the following to your setup.py:

from setuptools import setup

setup(
    ...
    dependency_links=[
        'https://myname:mypass@example.com/pypi/packages/'
    ])
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!