Skip to content

PyPiInstructions

Giovanni Pizzi edited this page Sep 29, 2016 · 14 revisions

Instructions on how to upload a package on PyPi

Since I always forget, here are some instructions.

Only once

Commits and tags in the code

  • First, update __version__ in the code
  • commit and create a new tag 'vX.X.X' (remember to push it)
  • merge also into master.

Then:

Update pip

  1. clear the build/, dist and seekpath.egg-info folders

  2. git pull (possibly then checking out the tag to be sure of the version we are at)

  3. python setup.py sdist bdist_wheel

  4. first time: register project (here for test PyPi):

    twine register -r pypitest dist/seekpath-X.X.X.tar.gz

    twine register -r pypitest dist/seekpath-X.X.X-py2-none-any.whl

  5. upload the package

    twine upload -r pypitest dist/*

  6. to test: pip install -i https://testpypi.python.org/pypi seekpath

If all works, do the same on the main repo (remove -r options or -i options of pip).

Clone this wiki locally