In this series about releasing python software, I’ve talked about two things till now:
With just these two points, the basic idea of releasing boils down to three tasks:
Those tasks are pretty mechanical. I’m lazy, so I automated it. Install zest.releaser (easy_install zest.releaser) and you’re set.
Zest.releaser gives you four commands to help in releasing python packages. The commands must be run in a version controlled checkout. The commands are:
prerelease: asks you for a version number (defaults to the current version minus a ‘dev’ or so), updates the setup.py or version.txt and the HISTORY.txt/CHANGES.txt/CHANGES with this new version number and offers to commit those changes to subversion (or bzr or hg or git).
release: copies the the trunk or branch of the current checkout and creates a version control tag of it.
If you want, it makes a checkout of the tag in a temporary directory and offers to register and upload a source dist of this package to PyPI (Python Package Index).
Note: if the package has not been registered yet, it will not do that for you. You must register the package manually (python setup.py register) so this remains a conscious decision. The main reason is that you want to avoid having to say: “Oops, I uploaded our client code to the internet; and this is the initial version with the plaintext root passwords.”
postrelease: asks you for a version number (gives a sane default), adds a development marker to it, updates the setup.py or version.txt and the HISTORY.txt with this and offers to commit those changes to version control.
fullrelease: all of the above in order.
Zest.releaser makes it easy and comfortable to release software. So use it for error-free and hassle-free releases. Zest.releaser makes it easy to do the right thing.
My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.
Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):