Skip to content

Making a release to PyPI

Robin Edwards edited this page Oct 12, 2018 · 5 revisions

We should really automate some of this.

  1. Get the latest code:
$ git checkout master
$ git pull
  1. Get the tag of the last release
$ git describe --abbrev=0 --tags
  1. Inspect the changes since then and update the Changelog

$ git log 3.2.9... $ vi Changelog

Change log format like so

Version <VERSION_NUMBER> 2018-10-04                                                  
 * Add check for wiping db on test run - Athanasios
 * Correct function name in doc string - Henry Jordan
  1. Update the version number in setup.py
$ vi setup.py
  1. Commit the changes, tag and push
$ git commit -a -m "<VERSION_NUMBER> release"
$ git tag <VERSION_NUMBER>
$ git push --tags
  1. Make sure you have twine and are auth'd with PyPi
$ pip install twine
  1. Create and upload the dists
$ rm -rf dist/*
$ python setup.py sdist
$ twine upload dist/*
  1. Update read the docs with the latest
Clone this wiki locally