-
Notifications
You must be signed in to change notification settings - Fork 92
Release procedure
This article shows developers how to prepare a release for pyfakefs. Ordinary users will not be interested in this article.
The pyfakefs package is released on PyPi.
Decide on a new version "M.mm" according to semantic versioning.
On your local computer, clone or pull branch master of pyfakefs. Check out a new branch version-M.mm
:
git checkout -b version-M.mm
Edit CHANGES.md
with descriptions of the new features and bug fixes.
Make sure that pyfakefs/fake_filesystem.py
attribute __version__
is the correct version number:
__version__ = 'M.mm'
Run the tests:
./all_tests.py
Git add, commit.
Push your branch to GitHub:
git push --set-upstream origin version-M.mm
Wait until Travis and Appveyor say your branch passes the tests.
Go to the pyfakefs project on github.com. Create a Pull Request for your release branch.
Wait for Travis and Appveyor to say your pull request passes the tests.
After the tests pass, accept the merge request. Do not delete the branch.
Return to your local computer.
Make sure your ~/.pypirc file looks like this:
[distutils]
index-servers =
pypi
pypitest
[pypi]
username:jmcgeheeiv
password:<your password>
[pypitest]
username:jmcgeheeiv
password:<your password>
Make sure pypandoc is installed locally before registering the package:
pip install pypandoc
If the above command does not properly install pandoc on your platform, consult the Pandoc Installation Instructions.
Release on PyPI:
python setup.py sdist upload -r pypi
Check that pyfakefs is now live on PyPi. In particular, try downloading the tarball and examine the CHANGES.md
file for the changes in this release.
After releasing on PyPi, also create a release on GitHub so that we have a record of the exact commit that was released.
On GitHub, go to Release.
Choose a version tag of the format vM.mm
, where M.mm is the version number. Enter this name.
Choose the release branch version-M.mm
. You may wonder why the tag and branch have different names that express the same thing. This is because git tag names and branch names are often in the same name space. With different names, tag vM.mm
and branch version-M.mm
are easily distinguished.
Explain the contents of the release, and release it!
Return to branch master:
git checkout master
git pull
Edit pyfakefs/fake_filesystem.py
attribute __version__
with the new version number M.nn, where nn=mm+1:
__version__ = 'M.nn'
Go to the Appveyor Settings and update the version number there, too.
Edit CHANGES.md
, add the template for the upcoming release:
## Version M.nn (as yet unreleased)
#### New Features
#### Infrastructure
#### Fixes