Document the new way of building packages

This commit is contained in:
Daniele Varrazzo 2021-05-26 17:22:14 +01:00
parent a9db3228d3
commit 808007456d

View File

@ -15,24 +15,12 @@ How to make a psycopg2 release
$ export VERSION=2.8.4 $ export VERSION=2.8.4
- In the `Travis settings`__ you may want to be sure that the variables - Push psycopg2 to master or to the maint branch. Make sure tests on `GitHub
``TEST_PAST`` and ``TEST_FUTURE`` are set to 1 to check all Actions`__ and AppVeyor__ pass.
the supported postgres version.
.. __: https://travis-ci.org/psycopg/psycopg2/settings .. __: https://github.com/psycopg/psycopg2/actions/workflows/tests.yml
- Push psycopg2 to master or to the maint branch. Make sure tests on Travis__
and AppVeyor__ pass.
.. __: https://travis-ci.org/psycopg/psycopg2
.. __: https://ci.appveyor.com/project/psycopg/psycopg2 .. __: https://ci.appveyor.com/project/psycopg/psycopg2
- For an extra test merge or rebase the `test_i686`__ branch on the commit to
release and push it too: this will test with Python 32 bits and debug
versions.
.. __: https://github.com/psycopg/psycopg2/tree/test_i686
- Create a signed tag with the content of the relevant NEWS bit and push it. - Create a signed tag with the content of the relevant NEWS bit and push it.
E.g.:: E.g.::
@ -49,34 +37,31 @@ How to make a psycopg2 release
- Fixed bug blah (:ticket:`#42`). - Fixed bug blah (:ticket:`#42`).
... ...
- Update the `psycopg2-wheels`_ submodule to the tag version and push. This - Create the packages:
will build the packages on `Travis CI`__ and `AppVeyor`__ and upload them to
https://upload.psycopg.org/.
.. _psycopg2-wheels: https://github.com/psycopg/psycopg2-wheels - On GitHub Actions run manually a `package build workflow`__.
.. __: https://travis-ci.org/psycopg/psycopg2-wheels
.. __: https://ci.appveyor.com/project/psycopg/psycopg2-wheels
- Download the packages generated (this assumes ssh configured properly):: - 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).
$ rsync -arv psycopg-upload:psycopg2-${VERSION} . .. __: https://github.com/psycopg/psycopg2/actions/workflows/packages.yml
.. __: https://ci.appveyor.com/project/psycopg/psycopg2/settings
- Sign the packages and upload the signatures back:: - When the workflows have finished download the packages using the
``download_packages.py`` and ``download_packages_appveyor.py`` scripts from
$ for f in psycopg2-${VERSION}/*.{exe,tar.gz,whl}; do \ the ``scripts/build`` directory. They will be saved in a
gpg --armor --detach-sign $f; ``psycopg2-${VERSION}`` directory.
done
$ rsync -arv psycopg2-${VERSION} psycopg-upload:
- Remove the ``.exe`` from the dir, because we don't want to upload them on - Remove the ``.exe`` from the dir, because we don't want to upload them on
PyPI:: PyPI::
$ rm -v psycopg2-${VERSION}/*.exe{,.asc} $ rm -v psycopg2-${VERSION}/*.exe
- Only for stable packages: upload the packages and signatures on PyPI:: - Only for stable packages: upload the signed packages on PyPI::
$ twine upload psycopg2-${VERSION}/* $ twine upload -s psycopg2-${VERSION}/*
- Create a release and release notes in the psycopg website, announce to - Create a release and release notes in the psycopg website, announce to
psycopg and pgsql-announce mailing lists. psycopg and pgsql-announce mailing lists.
@ -89,7 +74,7 @@ Releasing test packages
Test packages may be uploaded on the `PyPI testing site`__ using:: Test packages may be uploaded on the `PyPI testing site`__ using::
$ twine upload -r testpypi psycopg2-${VERSION}/* $ twine upload -s -r testpypi psycopg2-${VERSION}/*
assuming `proper configuration`__ of ``~/.pypirc``. assuming `proper configuration`__ of ``~/.pypirc``.