-
Notifications
You must be signed in to change notification settings - Fork 94
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 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.
As stated in the above 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. To register, run:
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.
I think that tagging is not so useful, but keep this obsolete text in case we change our minds.
Tag the commit with the version:
git tag vM.mm # Where M.mm is your version
If you have to add a commit because you re-did something, move the
tag to the new commit using the -f
flag:
# Needed only if you want to move a tag
git tag -f vM.mm # Where M.mm is your version
git push --follow-tags