Install python package from private pypiserver

I installed pypiserver behind a nginx proxy that uses htpasswd for authentication. I can currently download sdists, but I cannot figure out how to download them. I want to be able to load them at startup setup.py testand use them in some way pip. Is it possible?

[distutils]
index-servers =
    private

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

To make it redundant, the server currently uses an unverified ssl connection.

I tried the following setup based on http://pythonhosted.org/setuptools/setuptools.html#setuptools-package-index , but the only documentation on this is "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'])
+4
2

. 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

knitti, index-url extra-index-url. , .

setuptools setup.py:

from setuptools import setup

setup(
    ...
    dependency_links=[
        'https://myname:mypass@example.com/pypi/packages/'
    ])
+2

pip ~/.pip/pip.conf :

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

pip.conf pypiserver

, package_index='https://user:pass@example.com/pypi/simple setup.py.

+5

Source: https://habr.com/ru/post/1529065/


All Articles