-
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 pyfakefs. Check out a new branch version-M.mm
.
Edit pyfakefs/fake_filesystem.py
attribute __version__
with the new version number.
Run the tests:
./all_tests.py
Git add, commit.
Push your branch to GitHub:
git push origin version-M.mm
Go to the pyfakefs project on github.com. Create a Pull Request for your release branch.
Wait until Travis says your pull request passes the tests.
Return to your local computer. If necessary, set up for PyPi according to this article on releasing to PyPi.
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.
As stated in the above PyPi setup article, first perform a test release:
python setup.py register -r pypitest
python setup.py sdist upload -r pypitest
You should get no errors, and should also now be able to see your library in the test PyPI repository.
Once you've successfully uploaded to PyPI Test, perform the same steps but point to the live PyPI server instead:
python setup.py register -r pypi
python setup.py sdist upload -r pypi
Check that pyfakefs is now live on PyPi. In particular, try downloading the tarball and examine it for some representative change present only in the new 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!