2017-03-01 18:58:49 +03:00
|
|
|
How to make a psycopg2 release
|
|
|
|
==============================
|
|
|
|
|
2017-03-13 19:50:57 +03:00
|
|
|
- Edit ``setup.py`` and set a stable version release. Use PEP 440 to choose
|
|
|
|
version numbers, e.g.
|
2017-03-01 18:58:49 +03:00
|
|
|
|
2017-03-13 19:50:57 +03:00
|
|
|
- ``2.7``: a new major release, new features
|
|
|
|
- ``2.7.1``: a bugfix release
|
|
|
|
- ``2.7.1.1``: a release to fix packaging problems
|
|
|
|
- ``2.7.2.dev0``: version held during development, non-public test packages...
|
|
|
|
- ``2.8b1``: a beta for public tests
|
|
|
|
|
|
|
|
In the rest of this document we assume you have exported the version number
|
|
|
|
into an environment variable, e.g.::
|
|
|
|
|
2019-12-30 19:13:37 +03:00
|
|
|
$ export VERSION=2.8.4
|
2017-03-13 19:50:57 +03:00
|
|
|
|
2021-05-26 19:22:14 +03:00
|
|
|
- Push psycopg2 to master or to the maint branch. Make sure tests on `GitHub
|
|
|
|
Actions`__ and AppVeyor__ pass.
|
2017-03-01 18:58:49 +03:00
|
|
|
|
2021-05-26 19:22:14 +03:00
|
|
|
.. __: https://github.com/psycopg/psycopg2/actions/workflows/tests.yml
|
2017-03-13 19:50:57 +03:00
|
|
|
.. __: https://ci.appveyor.com/project/psycopg/psycopg2
|
|
|
|
|
2017-03-01 18:58:49 +03:00
|
|
|
- Create a signed tag with the content of the relevant NEWS bit and push it.
|
|
|
|
E.g.::
|
|
|
|
|
2020-09-06 19:24:04 +03:00
|
|
|
# Tag name will be 2_8_4
|
|
|
|
$ git tag -a -s ${VERSION//\./_}
|
2017-03-01 18:58:49 +03:00
|
|
|
|
2019-12-30 19:13:37 +03:00
|
|
|
Psycopg 2.8.4 released
|
2017-03-01 18:58:49 +03:00
|
|
|
|
2019-12-30 19:13:37 +03:00
|
|
|
What's new in psycopg 2.8.4
|
|
|
|
---------------------------
|
2017-03-01 18:58:49 +03:00
|
|
|
|
|
|
|
New features:
|
|
|
|
|
2019-12-30 19:13:37 +03:00
|
|
|
- Fixed bug blah (:ticket:`#42`).
|
2017-03-01 18:58:49 +03:00
|
|
|
...
|
|
|
|
|
2021-05-26 19:22:14 +03:00
|
|
|
- Create the packages:
|
2017-03-13 19:50:57 +03:00
|
|
|
|
2021-05-26 19:22:14 +03:00
|
|
|
- On GitHub Actions run manually a `package build workflow`__.
|
2017-03-01 18:58:49 +03:00
|
|
|
|
2021-05-26 19:22:14 +03:00
|
|
|
- On Appveyor change the `build settings`__ and replace the custom
|
|
|
|
configuration file name from ``.appveyor/tests.yml`` to
|
|
|
|
``.appveyor/packages.yml`` (yeah, that sucks a bit. Remember to put it
|
|
|
|
back to testing).
|
2017-03-01 18:58:49 +03:00
|
|
|
|
2021-05-26 19:22:14 +03:00
|
|
|
.. __: https://github.com/psycopg/psycopg2/actions/workflows/packages.yml
|
|
|
|
.. __: https://ci.appveyor.com/project/psycopg/psycopg2/settings
|
2017-03-01 18:58:49 +03:00
|
|
|
|
2021-05-26 19:22:14 +03:00
|
|
|
- When the workflows have finished download the packages using the
|
|
|
|
``download_packages.py`` and ``download_packages_appveyor.py`` scripts from
|
|
|
|
the ``scripts/build`` directory. They will be saved in a
|
|
|
|
``psycopg2-${VERSION}`` directory.
|
2017-03-01 18:58:49 +03:00
|
|
|
|
|
|
|
- Remove the ``.exe`` from the dir, because we don't want to upload them on
|
|
|
|
PyPI::
|
|
|
|
|
2021-05-26 19:22:14 +03:00
|
|
|
$ rm -v psycopg2-${VERSION}/*.exe
|
2017-03-01 18:58:49 +03:00
|
|
|
|
2021-05-26 19:22:14 +03:00
|
|
|
- Only for stable packages: upload the signed packages on PyPI::
|
2017-03-01 18:58:49 +03:00
|
|
|
|
2021-05-26 19:22:14 +03:00
|
|
|
$ twine upload -s psycopg2-${VERSION}/*
|
2017-03-01 18:58:49 +03:00
|
|
|
|
|
|
|
- Create a release and release notes in the psycopg website, announce to
|
|
|
|
psycopg and pgsql-announce mailing lists.
|
|
|
|
|
2019-12-30 19:13:37 +03:00
|
|
|
- Edit ``setup.py`` changing the version again (e.g. go to ``2.8.5.dev0``).
|
2017-03-13 19:50:57 +03:00
|
|
|
|
|
|
|
|
|
|
|
Releasing test packages
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
Test packages may be uploaded on the `PyPI testing site`__ using::
|
|
|
|
|
2021-05-26 19:22:14 +03:00
|
|
|
$ twine upload -s -r testpypi psycopg2-${VERSION}/*
|
2017-03-13 19:50:57 +03:00
|
|
|
|
|
|
|
assuming `proper configuration`__ of ``~/.pypirc``.
|
|
|
|
|
2018-04-26 15:52:41 +03:00
|
|
|
.. __: https://test.pypi.org/project/psycopg2/
|
2017-03-13 19:50:57 +03:00
|
|
|
.. __: https://wiki.python.org/moin/TestPyPI
|