User Tools

Site Tools


pypi

Server

Install prerequisites:

sudo apt-get install python-pip
sudo pip install pypiserver  passlib
mkdir -p /opt/pypi/packages

Add users who can upload packages

htpasswd -c /path/to/.htaccess myusername

Start the server

pypi-server -p 8080 -P /path/to/.htaccess /opt/pypi/packages

And visit your server via http

http://myserver:8080/

Find more information at https://pypi.python.org/pypi/pypiserver

Build and upload packages

Setup your Python project

….

Verify buildability

python setup.py bdist_egg

Prepare pip upload

Edit or create a ~/.pypirc file with the following content:

[distutils]
index-servers =
  pypi
  internal

[pypi]
username:pypiusername
password:pypipasswd

[internal]
repository: http://127.0.0.1:8080
username: myusername
password: mypasswd

And upload your egg to the server 'internal':

python setup.py sdist upload -r internal

Install from your server

Now you are ready to (re)install

sudo  pip install --upgrade --force-reinstall  -i http://127.0.0.1:8080/simple/ myegg

More infos e.g. here http://mrtopf.de/blog/en/a-small-introduction-to-python-eggs/

pypi.txt · Last modified: 2015/11/05 09:55 by mantis