Releasing a new version of niteoweb.click2sell involves the following steps:
Before every release make sure that:
For help with releasing we use jarn.mkreleaser. It’s listed as a dependency in setup.py and should already be installed in your local bin:
$ bin/mkrelease -d pypi -pq ./
Note
In order to push packages to PyPI you need to have the appropriate access rights to the package on PyPI and you need to configure your PyPI credentials in the ~/.pypirc file, e.g.:
[distutils]
index-servers =
pypi
[pypi]
username = fred
password = secret
In the following example we are releasing version 0.1 of niteoweb.click2sell. The package has been prepared so that version.txt contains the version 0.1, this change has been committed to git and all changes have been pushed upstream to GitHub:
# Check that package description is rendered correctly
$ bin/longtest
# Make a release and upload it to PyPI
$ bin/mkrelease -d pypi -pq ./
Releasing niteoweb.click2sell 0.1
Tagging niteoweb.click2sell 0.1
To git@github.com:niteoweb/niteoweb.click2sell.git
* [new tag] 0.1 -> 0.1
running egg_info
running sdist
warning: sdist: standard file not found: should have one of README, README.txt
running register
Server response (200): OK
running upload
warning: sdist: standard file not found: should have one of README, README.txt
Server response (200): OK
done
Note
Please ignore the sdist warning about README file above. PyPI does not depend on it and it’s just a bug in setupools (reported and waiting to be fixed).