mirror of
				https://github.com/psycopg/psycopg2.git
				synced 2025-10-31 15:57:31 +03:00 
			
		
		
		
	Improved notes to release psycopg packages
This commit is contained in:
		
							parent
							
								
									5730aa9a40
								
							
						
					
					
						commit
						ef9f9f5fff
					
				|  | @ -1,16 +1,32 @@ | ||||||
| How to make a psycopg2 release | How to make a psycopg2 release | ||||||
| ============================== | ============================== | ||||||
| 
 | 
 | ||||||
| - Edit ``setup.py`` and set a stable version release. Use PEP 440 as reversion | - Edit ``setup.py`` and set a stable version release. Use PEP 440 to choose | ||||||
|   numbers, e.g. ``2.7``. |   version numbers, e.g. | ||||||
| 
 | 
 | ||||||
| - Push psycopg2 to master or to the maint branch. Make sure tests pass. |   - ``2.7``: a new major release, new features | ||||||
|   in the `Travis settings`__ you may want to be sure that the varialbes |   - ``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.:: | ||||||
|  | 
 | ||||||
|  |     $ export VERSION=2.7 | ||||||
|  | 
 | ||||||
|  | - In the `Travis settings`__ you may want to be sure that the variables | ||||||
|   ``TEST_PAST`` and ``TEST_FUTURE`` are set to a nonzero string to check all |   ``TEST_PAST`` and ``TEST_FUTURE`` are set to a nonzero string to check all | ||||||
|   the supported postgres version. |   the supported postgres version. | ||||||
| 
 | 
 | ||||||
| .. __: https://travis-ci.org/psycopg/psycopg2/settings | .. __: https://travis-ci.org/psycopg/psycopg2/settings | ||||||
| 
 | 
 | ||||||
|  | - 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 | ||||||
|  | 
 | ||||||
| - For an extra test merge or rebase the `test_i686`__ branch on the commit to | - 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 |   release and push it too: this will test with Python 32 bits and debug | ||||||
|   versions. |   versions. | ||||||
|  | @ -41,34 +57,48 @@ How to make a psycopg2 release | ||||||
| .. __: https://ci.appveyor.com/project/psycopg/psycopg2-wheels | .. __: https://ci.appveyor.com/project/psycopg/psycopg2-wheels | ||||||
| .. __: http://initd.org/psycopg/upload/ | .. __: http://initd.org/psycopg/upload/ | ||||||
| 
 | 
 | ||||||
| - Download the packages generated:: | - Download the packages generated (this assumes ssh configured properly):: | ||||||
| 
 | 
 | ||||||
|     $ rsync -arv initd.org:/home/upload/upload/psycopg2-2.7 . |     $ rsync -arv initd-upload:psycopg2-${VERSION} . | ||||||
| 
 | 
 | ||||||
| - Sign the packages and upload the signatures back. This assumes you have a | - Sign the packages and upload the signatures back:: | ||||||
|   pkey configured to upload:: |  | ||||||
| 
 | 
 | ||||||
|     $ for f in psycopg2-2.7/*.{exe,tar.gz,whl}; do gpg --armor --detach-sign $f; done |     $ for f in psycopg2-${VERSION}/*.{exe,tar.gz,whl}; do \ | ||||||
|     $ rsync -arv -i ~/.ssh/id_rsa-initd-upload psycopg2-2.7 upload@initd.org: |         gpg --armor --detach-sign $f; | ||||||
|  |       done | ||||||
|  | 
 | ||||||
|  |     $ rsync -arv psycopg2-${VERSION} initd-upload: | ||||||
| 
 | 
 | ||||||
| - Run the ``copy-tarball.sh`` script on the server to copy the uploaded files | - Run the ``copy-tarball.sh`` script on the server to copy the uploaded files | ||||||
|   in the `tarballs`__ dir:: |   in the `tarballs`__ dir:: | ||||||
| 
 | 
 | ||||||
|     ssh psycoweb /home/psycoweb/copy-tarball.sh \ |     $ ssh psycoweb@initd.org copy-tarball.sh ${VERSION} | ||||||
|         /home/upload/upload/psycopg2-2.7/psycopg2-2.7.tar.gz  |  | ||||||
| 
 | 
 | ||||||
| .. __: http://initd.org/psycopg/tarballs/ | .. __: http://initd.org/psycopg/tarballs/ | ||||||
| 
 | 
 | ||||||
| - 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:: | ||||||
| 
 | 
 | ||||||
|     for f in psycopg2-2.7/*.exe; do rm -v $f $f.asc; done |     $ rm -v psycopg2-${VERSION}/*.exe{,.asc} | ||||||
| 
 | 
 | ||||||
| - Upload the packages on PyPI:: | - Only for stable packages: upload the packages and signatures on PyPI:: | ||||||
| 
 | 
 | ||||||
|     twine upload psycopg2-2.7/* |     $ twine upload 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. | ||||||
| 
 | 
 | ||||||
| - Edit ``setup.py`` changing the version again (e.g. go to ``2.7.1.dev0``). | - Edit ``setup.py`` changing the version again (e.g. go to ``2.7.1.dev0``). | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | Releasing test packages | ||||||
|  | ----------------------- | ||||||
|  | 
 | ||||||
|  | Test packages may be uploaded on the `PyPI testing site`__ using:: | ||||||
|  | 
 | ||||||
|  |     $ twine upload -r testpypi psycopg2-${VERSION}/* | ||||||
|  | 
 | ||||||
|  | assuming `proper configuration`__ of ``~/.pypirc``. | ||||||
|  | 
 | ||||||
|  | .. __: https://testpypi.python.org/pypi/psycopg2 | ||||||
|  | .. __: https://wiki.python.org/moin/TestPyPI | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user