This Java library turns Python packages storage (files, S3 objects, anything) into Python Repository which pip and twine can perfectly understand. This library is a part of Artipie binary artifact management tool and provides Python storage functionality for Artipie central.
How to use
To install packages with pip add the following section to .pip/pip.conf:
[global]
extra-index-url = https://myname:mypass@central.artipie.com/my_pypi
To upload using pip create valid ~/.pypirc file:
[distutils]
index-servers = example
[example]
repository = https://central.artipie.com/my_pypi
username = myname
password = mypass
To upload package with twine specify --repository-url:
python3 -m twine upload --repository-url https://central.artipie.com/my_pypi -u myname -p mypass --verbose my_project/dist/*
To use a private server with setuptools unittesting add the following to your setup.py:
from setuptools import setup
setup(
...
dependency_links=[
'https://myname:mypass@central.artipie.com/my_pypi/my_project/'
])
PYPI repository API and file structure
PYPI repository API is explained by PEP-503. The repository root / API must return a valid HTML5 page with a single anchor element per project in the repository:
<!DOCTYPE html>
<html>
<body>
<a href="/frob/">frob</a>
<a href="/spamspamspam/">spamspamspam</a>
</body>
</html>
These links may be helpful:
- Simple repository layout https://packaging.python.org/guides/hosting-your-own-index/
- Repository API https://www.python.org/dev/peps/pep-0503/
How to contribute
Fork repository, make changes, send us a pull request. We will review your changes and apply them to the master branch shortly, provided they don't violate our quality standards. To avoid frustration, before sending us your pull request please run full Maven build:
$ mvn verify -Pqulice
To avoid build errors use Maven 3.2+.