Custom PyPI Server

 7th March 2019 at 8:53am

Custom PyPI server can be achieved by using pypiserver/pypiserver, cooperating with ignacysokolowski/pypi-uploader for uploading packages.

pypiserver

Quick start:

pip install pypiserver

# Create a directory for packages to live in
mkdir ~/packages

# Set a user name and password for authentication when uploading packages
htpasswd -c htpasswd.txt <username> <password>
./pypi-server -p 8080 -P htpasswd.txt ~/packages &

pypi-uploader

Quick start:

Write a ~/.pypirc file:

[distutils]
index-servers =
  internal

[internal]
repository: <pypi-server>  ; e.g. http://10.123.16.167:8080
username: <username>
password: <password>
pip install pypi-uploader
pypiupload files <python-pacakges> -i internal