blob: 0feb59bb306db01e7dc0c0c7a78b40781d1585e8 [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
Paul Kehrerb7af2f52015-09-22 14:50:26 -05009The release process uses a static build for Windows and OS X wheels. Check that
10the Windows and OS X Jenkins builders have the latest version of OpenSSL
11installed before performing the release. If they do not:
12
13Upgrading Windows
14~~~~~~~~~~~~~~~~~
15
16Run the ``openssl-release`` Jenkins job, then copy the resulting artifacts to
17the Windows builders and unzip them in the root of the file system.
18
19Upgrading OS X
20~~~~~~~~~~~~~~
21
22``brew update`` and then ``brew upgrade openssl --universal --build-bottle`` to
23build a universal library (32-bit and 64-bit) compatible with all Intel Macs.
24This can be confirmed by using
25``lipo -info /usr/local/opt/openssl/lib/libssl.dylib`` to see the available
26architectures.
Alex Gaynor89063f62014-01-06 15:52:38 -080027
28Bumping the version number
29--------------------------
30
Paul Kehrer27bb5fe2014-07-04 11:28:08 -050031The next step in doing a release is bumping the version number in the
Alex Gaynor89063f62014-01-06 15:52:38 -080032software.
33
Alex Gaynor0064bfa2015-03-09 07:10:40 -040034* Update the version number in ``src/cryptography/__about__.py``.
Alex Stapletona39a3192014-03-14 20:03:12 +000035* Update the version number in ``vectors/cryptography_vectors/__about__.py``.
Alex Gaynor3f230402014-01-08 09:21:57 -080036* Set the release date in the :doc:`/changelog`.
Alex Gaynor89063f62014-01-06 15:52:38 -080037* Do a commit indicating this.
38* Send a pull request with this.
39* Wait for it to be merged.
40
41Performing the release
42----------------------
43
Alex Stapleton63b3de22014-02-08 09:43:16 +000044The commit that merged the version number bump is now the official release
Alex Gaynorb3794db2014-01-07 09:25:54 -080045commit for this release. You will need to have ``gpg`` installed and a ``gpg``
46key in order to do a release. Once this has happened:
Alex Gaynor89063f62014-01-06 15:52:38 -080047
48* Run ``invoke release {version}``.
49
Alex Gaynorfea893c2014-01-07 11:06:51 -080050The release should now be available on PyPI and a tag should be available in
Paul Kehrer1f1e02f2014-07-06 08:52:17 -050051the repository.
52
53Verifying the release
54---------------------
55
56You should verify that ``pip install cryptography`` works correctly:
Alex Gaynor41c14d52014-01-07 11:19:08 -080057
58.. code-block:: pycon
59
60 >>> import cryptography
61 >>> cryptography.__version__
62 '...'
Alex Stapletona39a3192014-03-14 20:03:12 +000063 >>> import cryptography_vectors
64 >>> cryptography_vectors.__version__
65 '...'
Alex Gaynor41c14d52014-01-07 11:19:08 -080066
67Verify that this is the version you just released.
Paul Kehrerff26c742014-04-02 19:11:53 -050068
Paul Kehrer1f1e02f2014-07-06 08:52:17 -050069For the Windows wheels check the builds for the ``cryptography-wheel-builder``
70job and verify that the final output for each build shows it loaded and linked
71the expected OpenSSL version.
72
Paul Kehrerff26c742014-04-02 19:11:53 -050073Post-release tasks
74------------------
75
Paul Kehrer3bcd3e02014-04-02 21:00:35 -050076* Update the version number to the next major (e.g. ``0.5.dev1``) in
Paul Kehrerff26c742014-04-02 19:11:53 -050077 ``cryptography/__about__.py`` and
78 ``vectors/cryptography_vectors/__about__.py``.
Alex Gaynor5563ea02016-06-04 12:57:17 -070079* Close the `milestone`_ for the previous release on GitHub.
Paul Kehrer3bcd3e02014-04-02 21:00:35 -050080* Add new :doc:`/changelog` entry with next version and note that it is under
81 active development
Paul Kehrerff26c742014-04-02 19:11:53 -050082* Send a pull request with these items
Paul Kehrer32547412014-04-02 21:31:41 -050083* Check for any outstanding code undergoing a deprecation cycle by looking in
84 ``cryptography.utils`` for ``DeprecatedIn**`` definitions. If any exist open
85 a ticket to increment them for the next release.
Alex Gaynor72b596a2014-12-17 21:10:14 -080086* Send an email to the `mailing list`_ and `python-announce`_ announcing the
87 release.
Ayrxeced8b72014-05-04 16:07:39 +080088
Alex Gaynor5563ea02016-06-04 12:57:17 -070089.. _`milestone`: https://github.com/pyca/cryptography/milestones
Ayrxeced8b72014-05-04 16:07:39 +080090.. _`mailing list`: https://mail.python.org/mailman/listinfo/cryptography-dev
Alex Gaynor72b596a2014-12-17 21:10:14 -080091.. _`python-announce`: https://mail.python.org/mailman/listinfo/python-announce-list