Release process¶
Feature development takes places on the “master” branch. Periodically, a release is created by increasing the version number and tagging the relevant commit with the new version number.
Update the version number according to the versioning scheme.
- Update the version number in
doc/conf.py
. The full version must always be updated, the short (X.Y) version does not need to be updated if the version number is being increased from X.Y.Z to X.Y.Z+1. - Update the version number in
pypfilt/version.py
. - Update the version number in
setup.py
.
- Update the version number in
Describe the changes at the top of
NEWS.rst
under a heading of the formX.Y.Z (YYYY-MM-DD)
, which identifies the new version number and the date on which this version was released.Commit these changes; set the commit message to
Release pypfilt X.Y.Z
.Tag this commit
X.Y.Z
.Push this commit and the new tag upstream.
Publishing to PyPI¶
These instructions are based on the Python Packaging User Guide.
Ensure that twine
is installed:
pip install twine
Define the PyPI server(s) in .pypirc
:
[distutils]
index-servers =
pypi
pypitest
[pypi]
repository=https://upload.pypi.org/legacy/
[pypitest]
repository=https://testpypi.python.org/pypi
Build the wheel ./dist/pypfilt-X.Y.Z-py2.py3-none-any.whl
:
python setup.py bdist_wheel
Upload this wheel to the PyPI test server, so that any problems can be identified and fixed:
twine upload -r pypitest dist/pypfilt-X.Y.Z-py2.py3-none-any.whl
Then upload this wheel to PyPI:
twine upload dist/pypfilt-X.Y.Z-py2.py3-none-any.whl