blob: 7cf012bb0315262a4a01951fd2fc06f474c03589 [file] [log] [blame]
Alex Stapletonc5fffd32014-03-18 15:29:00 +00001Doing a release
Alex Gaynor89063f62014-01-06 15:52:38 -08002===============
3
Paul Kehrer27bb5fe2014-07-04 11:28:08 -05004Doing a release of ``cryptography`` requires a few steps.
5
Paul Kehrerb7af2f52015-09-22 14:50:26 -05006Verifying and upgrading OpenSSL version
7---------------------------------------
Paul Kehrer27bb5fe2014-07-04 11:28:08 -05008
Alex Gaynor06049442017-03-15 12:21:45 -04009The release process uses a static build for Windows and macOS wheels. Check
10that the Windows and macOS Jenkins builders have the latest version of OpenSSL
Paul Kehrerb7af2f52015-09-22 14:50:26 -050011installed before performing the release. If they do not:
12
13Upgrading Windows
14~~~~~~~~~~~~~~~~~
15
Paul Kehrere9dbbd82017-03-09 18:43:40 -040016Run the ``openssl-release-1.1`` Jenkins job, then copy the resulting artifacts
17to the Windows builders and unzip them in the root of the file system.
Paul Kehrerb7af2f52015-09-22 14:50:26 -050018
Alex Gaynor06049442017-03-15 12:21:45 -040019Upgrading macOS
20~~~~~~~~~~~~~~~
Paul Kehrerb7af2f52015-09-22 14:50:26 -050021
Paul Kehrere9dbbd82017-03-09 18:43:40 -040022``brew update`` and then ``brew upgrade openssl@1.1 --build-bottle`` to
23install a 64-bit only library compatible with all Intel Macs.
Alex Gaynor89063f62014-01-06 15:52:38 -080024
25Bumping the version number
26--------------------------
27
Paul Kehrer27bb5fe2014-07-04 11:28:08 -050028The next step in doing a release is bumping the version number in the
Alex Gaynor89063f62014-01-06 15:52:38 -080029software.
30
Alex Gaynor0064bfa2015-03-09 07:10:40 -040031* Update the version number in ``src/cryptography/__about__.py``.
Alex Stapletona39a3192014-03-14 20:03:12 +000032* Update the version number in ``vectors/cryptography_vectors/__about__.py``.
Alex Gaynor3f230402014-01-08 09:21:57 -080033* Set the release date in the :doc:`/changelog`.
Alex Gaynor89063f62014-01-06 15:52:38 -080034* Do a commit indicating this.
35* Send a pull request with this.
36* Wait for it to be merged.
37
38Performing the release
39----------------------
40
Alex Stapleton63b3de22014-02-08 09:43:16 +000041The commit that merged the version number bump is now the official release
Alex Gaynorb3794db2014-01-07 09:25:54 -080042commit for this release. You will need to have ``gpg`` installed and a ``gpg``
43key in order to do a release. Once this has happened:
Alex Gaynor89063f62014-01-06 15:52:38 -080044
Alex Gaynorc7dd9de2017-05-20 14:37:40 -070045* Run ``python release.py {version}``.
Alex Gaynor89063f62014-01-06 15:52:38 -080046
Alex Gaynorfea893c2014-01-07 11:06:51 -080047The release should now be available on PyPI and a tag should be available in
Paul Kehrer1f1e02f2014-07-06 08:52:17 -050048the repository.
49
50Verifying the release
51---------------------
52
53You should verify that ``pip install cryptography`` works correctly:
Alex Gaynor41c14d52014-01-07 11:19:08 -080054
55.. code-block:: pycon
56
57 >>> import cryptography
58 >>> cryptography.__version__
59 '...'
Alex Stapletona39a3192014-03-14 20:03:12 +000060 >>> import cryptography_vectors
61 >>> cryptography_vectors.__version__
62 '...'
Alex Gaynor41c14d52014-01-07 11:19:08 -080063
64Verify that this is the version you just released.
Paul Kehrerff26c742014-04-02 19:11:53 -050065
Paul Kehrer1f1e02f2014-07-06 08:52:17 -050066For the Windows wheels check the builds for the ``cryptography-wheel-builder``
67job and verify that the final output for each build shows it loaded and linked
68the expected OpenSSL version.
69
Paul Kehrerff26c742014-04-02 19:11:53 -050070Post-release tasks
71------------------
72
Paul Kehrer3bcd3e02014-04-02 21:00:35 -050073* Update the version number to the next major (e.g. ``0.5.dev1``) in
Paul Kehrerff26c742014-04-02 19:11:53 -050074 ``cryptography/__about__.py`` and
75 ``vectors/cryptography_vectors/__about__.py``.
Alex Gaynor5563ea02016-06-04 12:57:17 -070076* Close the `milestone`_ for the previous release on GitHub.
Paul Kehrer3bcd3e02014-04-02 21:00:35 -050077* Add new :doc:`/changelog` entry with next version and note that it is under
78 active development
Paul Kehrerff26c742014-04-02 19:11:53 -050079* Send a pull request with these items
Paul Kehrer32547412014-04-02 21:31:41 -050080* Check for any outstanding code undergoing a deprecation cycle by looking in
81 ``cryptography.utils`` for ``DeprecatedIn**`` definitions. If any exist open
82 a ticket to increment them for the next release.
Alex Gaynor72b596a2014-12-17 21:10:14 -080083* Send an email to the `mailing list`_ and `python-announce`_ announcing the
84 release.
Ayrxeced8b72014-05-04 16:07:39 +080085
Alex Gaynor5563ea02016-06-04 12:57:17 -070086.. _`milestone`: https://github.com/pyca/cryptography/milestones
Ayrxeced8b72014-05-04 16:07:39 +080087.. _`mailing list`: https://mail.python.org/mailman/listinfo/cryptography-dev
Alex Gaynor72b596a2014-12-17 21:10:14 -080088.. _`python-announce`: https://mail.python.org/mailman/listinfo/python-announce-list