2015-07-26 21:20:32 +08:00
|
|
|
How to release pytest
|
2014-09-05 19:13:23 +08:00
|
|
|
--------------------------------------------
|
|
|
|
|
2015-07-26 21:20:32 +08:00
|
|
|
Note: this assumes you have already registered on pypi.
|
|
|
|
|
|
|
|
1. Bump version numbers in _pytest/__init__.py (setup.py reads it)
|
2014-09-05 19:13:23 +08:00
|
|
|
|
2015-07-26 21:20:32 +08:00
|
|
|
2. Check and finalize CHANGELOG
|
2014-09-05 19:13:23 +08:00
|
|
|
|
2015-07-26 21:20:32 +08:00
|
|
|
3. Write doc/en/announce/release-VERSION.txt and include
|
2015-11-19 00:55:18 +08:00
|
|
|
it in doc/en/announce/index.txt::
|
|
|
|
|
|
|
|
git log 2.8.2..HEAD --format='%aN' | sort -u # lists the names of authors involved
|
2014-09-05 19:13:23 +08:00
|
|
|
|
2015-09-26 10:10:35 +08:00
|
|
|
4. Use devpi for uploading a release tarball to a staging area::
|
2015-07-26 21:20:32 +08:00
|
|
|
|
2015-09-26 10:10:35 +08:00
|
|
|
devpi use https://devpi.net/USER/dev
|
|
|
|
devpi upload --formats sdist,bdist_wheel
|
2015-07-26 21:20:32 +08:00
|
|
|
|
2015-09-26 10:10:35 +08:00
|
|
|
5. Run from multiple machines::
|
2015-07-26 21:20:32 +08:00
|
|
|
|
2015-09-26 10:10:35 +08:00
|
|
|
devpi use https://devpi.net/USER/dev
|
|
|
|
devpi test pytest==VERSION
|
2015-07-26 21:20:32 +08:00
|
|
|
|
2015-09-26 10:10:35 +08:00
|
|
|
6. Check that tests pass for relevant combinations with::
|
2014-09-05 19:13:23 +08:00
|
|
|
|
2015-09-26 10:10:35 +08:00
|
|
|
devpi list pytest
|
2014-09-05 19:13:23 +08:00
|
|
|
|
|
|
|
or look at failures with "devpi list -f pytest".
|
|
|
|
There will be some failed environments like e.g. the py33-trial
|
|
|
|
or py27-pexpect tox environments on Win32 platforms
|
|
|
|
which is ok (tox does not support skipping on
|
|
|
|
per-platform basis yet).
|
|
|
|
|
2015-07-26 21:20:32 +08:00
|
|
|
7. Regenerate the docs examples using tox, and check for regressions::
|
|
|
|
|
2015-05-19 08:52:06 +08:00
|
|
|
tox -e regen
|
2015-07-26 21:20:32 +08:00
|
|
|
git diff
|
|
|
|
|
2014-09-05 19:55:58 +08:00
|
|
|
|
2015-08-04 05:01:03 +08:00
|
|
|
8. Build the docs, you need a virtualenv with py and sphinx
|
2015-05-19 08:52:06 +08:00
|
|
|
installed::
|
2015-07-26 21:20:32 +08:00
|
|
|
|
2015-12-12 08:35:44 +08:00
|
|
|
cd doc/en
|
2015-05-19 08:52:06 +08:00
|
|
|
make html
|
|
|
|
|
2015-07-26 21:20:32 +08:00
|
|
|
Commit any changes before tagging the release.
|
|
|
|
|
2015-05-19 16:32:21 +08:00
|
|
|
9. Tag the release::
|
2015-07-26 21:20:32 +08:00
|
|
|
|
|
|
|
git tag VERSION
|
|
|
|
git push
|
2015-05-19 16:32:21 +08:00
|
|
|
|
2015-08-04 05:01:03 +08:00
|
|
|
10. Upload the docs using doc/en/Makefile::
|
2015-07-26 21:20:32 +08:00
|
|
|
|
2015-08-04 05:01:03 +08:00
|
|
|
cd doc/en
|
2015-07-26 21:20:32 +08:00
|
|
|
make install # or "installall" if you have LaTeX installed for PDF
|
|
|
|
|
2015-11-24 22:05:41 +08:00
|
|
|
This requires ssh-login permission on pytest.org because it uses
|
|
|
|
rsync.
|
|
|
|
Note that the ``install`` target of ``doc/en/Makefile`` defines where the
|
|
|
|
rsync goes to, typically to the "latest" section of pytest.org.
|
2014-09-05 19:13:23 +08:00
|
|
|
|
2015-11-24 22:05:41 +08:00
|
|
|
If you are making a minor release (e.g. 5.4), you also need to manually
|
|
|
|
create a symlink for "latest"::
|
2015-07-26 21:20:32 +08:00
|
|
|
|
2015-11-24 22:05:41 +08:00
|
|
|
ssh pytest-dev@pytest.org
|
|
|
|
ln -s 5.4 latest
|
2015-07-26 21:20:32 +08:00
|
|
|
|
2015-11-24 22:05:41 +08:00
|
|
|
Browse to pytest.org to verify.
|
2015-07-26 21:20:32 +08:00
|
|
|
|
|
|
|
11. Publish to pypi::
|
|
|
|
|
|
|
|
devpi push pytest-VERSION pypi:NAME
|
|
|
|
|
2015-11-24 22:05:41 +08:00
|
|
|
where NAME is the name of pypi.python.org as configured in your ``~/.pypirc``
|
|
|
|
file `for devpi <http://doc.devpi.net/latest/quickstart-releaseprocess.html?highlight=pypirc#devpi-push-releasing-to-an-external-index>`_.
|
2015-07-26 21:20:32 +08:00
|
|
|
|
|
|
|
|
|
|
|
12. Send release announcement to mailing lists:
|
|
|
|
|
|
|
|
- pytest-dev
|
|
|
|
- testing-in-python
|
|
|
|
- python-announce-list@python.org
|
2014-09-05 19:13:23 +08:00
|
|
|
|
|
|
|
|
2015-07-26 21:20:32 +08:00
|
|
|
13. **after the release** Bump the version number in ``_pytest/__init__.py``,
|
2015-11-24 22:05:41 +08:00
|
|
|
to the next Minor release version (i.e. if you released ``pytest-2.8.0``,
|
|
|
|
set it to ``pytest-2.9.0.dev1``).
|
2015-12-10 04:20:54 +08:00
|
|
|
|
|
|
|
14. merge the actual release into the features branch and do a pull request against it
|