Alex Stapleton | c5fffd3 | 2014-03-18 15:29:00 +0000 | [diff] [blame] | 1 | Doing a release |
Alex Gaynor | 89063f6 | 2014-01-06 15:52:38 -0800 | [diff] [blame] | 2 | =============== |
| 3 | |
Paul Kehrer | 27bb5fe | 2014-07-04 11:28:08 -0500 | [diff] [blame] | 4 | Doing a release of ``cryptography`` requires a few steps. |
| 5 | |
Paul Kehrer | b7af2f5 | 2015-09-22 14:50:26 -0500 | [diff] [blame] | 6 | Verifying and upgrading OpenSSL version |
| 7 | --------------------------------------- |
Paul Kehrer | 27bb5fe | 2014-07-04 11:28:08 -0500 | [diff] [blame] | 8 | |
Paul Kehrer | b7af2f5 | 2015-09-22 14:50:26 -0500 | [diff] [blame] | 9 | The release process uses a static build for Windows and OS X wheels. Check that |
| 10 | the Windows and OS X Jenkins builders have the latest version of OpenSSL |
| 11 | installed before performing the release. If they do not: |
| 12 | |
| 13 | Upgrading Windows |
| 14 | ~~~~~~~~~~~~~~~~~ |
| 15 | |
| 16 | Run the ``openssl-release`` Jenkins job, then copy the resulting artifacts to |
| 17 | the Windows builders and unzip them in the root of the file system. |
| 18 | |
| 19 | Upgrading OS X |
| 20 | ~~~~~~~~~~~~~~ |
| 21 | |
| 22 | ``brew update`` and then ``brew upgrade openssl --universal --build-bottle`` to |
| 23 | build a universal library (32-bit and 64-bit) compatible with all Intel Macs. |
| 24 | This can be confirmed by using |
| 25 | ``lipo -info /usr/local/opt/openssl/lib/libssl.dylib`` to see the available |
| 26 | architectures. |
Alex Gaynor | 89063f6 | 2014-01-06 15:52:38 -0800 | [diff] [blame] | 27 | |
| 28 | Bumping the version number |
| 29 | -------------------------- |
| 30 | |
Paul Kehrer | 27bb5fe | 2014-07-04 11:28:08 -0500 | [diff] [blame] | 31 | The next step in doing a release is bumping the version number in the |
Alex Gaynor | 89063f6 | 2014-01-06 15:52:38 -0800 | [diff] [blame] | 32 | software. |
| 33 | |
Alex Gaynor | 0064bfa | 2015-03-09 07:10:40 -0400 | [diff] [blame] | 34 | * Update the version number in ``src/cryptography/__about__.py``. |
Alex Stapleton | a39a319 | 2014-03-14 20:03:12 +0000 | [diff] [blame] | 35 | * Update the version number in ``vectors/cryptography_vectors/__about__.py``. |
Alex Gaynor | 3f23040 | 2014-01-08 09:21:57 -0800 | [diff] [blame] | 36 | * Set the release date in the :doc:`/changelog`. |
Alex Gaynor | 89063f6 | 2014-01-06 15:52:38 -0800 | [diff] [blame] | 37 | * Do a commit indicating this. |
| 38 | * Send a pull request with this. |
| 39 | * Wait for it to be merged. |
| 40 | |
| 41 | Performing the release |
| 42 | ---------------------- |
| 43 | |
Alex Stapleton | 63b3de2 | 2014-02-08 09:43:16 +0000 | [diff] [blame] | 44 | The commit that merged the version number bump is now the official release |
Alex Gaynor | b3794db | 2014-01-07 09:25:54 -0800 | [diff] [blame] | 45 | commit for this release. You will need to have ``gpg`` installed and a ``gpg`` |
| 46 | key in order to do a release. Once this has happened: |
Alex Gaynor | 89063f6 | 2014-01-06 15:52:38 -0800 | [diff] [blame] | 47 | |
| 48 | * Run ``invoke release {version}``. |
| 49 | |
Alex Gaynor | fea893c | 2014-01-07 11:06:51 -0800 | [diff] [blame] | 50 | The release should now be available on PyPI and a tag should be available in |
Paul Kehrer | 1f1e02f | 2014-07-06 08:52:17 -0500 | [diff] [blame] | 51 | the repository. |
| 52 | |
| 53 | Verifying the release |
| 54 | --------------------- |
| 55 | |
| 56 | You should verify that ``pip install cryptography`` works correctly: |
Alex Gaynor | 41c14d5 | 2014-01-07 11:19:08 -0800 | [diff] [blame] | 57 | |
| 58 | .. code-block:: pycon |
| 59 | |
| 60 | >>> import cryptography |
| 61 | >>> cryptography.__version__ |
| 62 | '...' |
Alex Stapleton | a39a319 | 2014-03-14 20:03:12 +0000 | [diff] [blame] | 63 | >>> import cryptography_vectors |
| 64 | >>> cryptography_vectors.__version__ |
| 65 | '...' |
Alex Gaynor | 41c14d5 | 2014-01-07 11:19:08 -0800 | [diff] [blame] | 66 | |
| 67 | Verify that this is the version you just released. |
Paul Kehrer | ff26c74 | 2014-04-02 19:11:53 -0500 | [diff] [blame] | 68 | |
Paul Kehrer | 1f1e02f | 2014-07-06 08:52:17 -0500 | [diff] [blame] | 69 | For the Windows wheels check the builds for the ``cryptography-wheel-builder`` |
| 70 | job and verify that the final output for each build shows it loaded and linked |
| 71 | the expected OpenSSL version. |
| 72 | |
Paul Kehrer | ff26c74 | 2014-04-02 19:11:53 -0500 | [diff] [blame] | 73 | Post-release tasks |
| 74 | ------------------ |
| 75 | |
Paul Kehrer | 3bcd3e0 | 2014-04-02 21:00:35 -0500 | [diff] [blame] | 76 | * Update the version number to the next major (e.g. ``0.5.dev1``) in |
Paul Kehrer | ff26c74 | 2014-04-02 19:11:53 -0500 | [diff] [blame] | 77 | ``cryptography/__about__.py`` and |
| 78 | ``vectors/cryptography_vectors/__about__.py``. |
Alex Gaynor | 5563ea0 | 2016-06-04 12:57:17 -0700 | [diff] [blame] | 79 | * Close the `milestone`_ for the previous release on GitHub. |
Paul Kehrer | 3bcd3e0 | 2014-04-02 21:00:35 -0500 | [diff] [blame] | 80 | * Add new :doc:`/changelog` entry with next version and note that it is under |
| 81 | active development |
Paul Kehrer | ff26c74 | 2014-04-02 19:11:53 -0500 | [diff] [blame] | 82 | * Send a pull request with these items |
Paul Kehrer | 3254741 | 2014-04-02 21:31:41 -0500 | [diff] [blame] | 83 | * 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 Gaynor | 72b596a | 2014-12-17 21:10:14 -0800 | [diff] [blame] | 86 | * Send an email to the `mailing list`_ and `python-announce`_ announcing the |
| 87 | release. |
Ayrx | eced8b7 | 2014-05-04 16:07:39 +0800 | [diff] [blame] | 88 | |
Alex Gaynor | 5563ea0 | 2016-06-04 12:57:17 -0700 | [diff] [blame] | 89 | .. _`milestone`: https://github.com/pyca/cryptography/milestones |
Ayrx | eced8b7 | 2014-05-04 16:07:39 +0800 | [diff] [blame] | 90 | .. _`mailing list`: https://mail.python.org/mailman/listinfo/cryptography-dev |
Alex Gaynor | 72b596a | 2014-12-17 21:10:14 -0800 | [diff] [blame] | 91 | .. _`python-announce`: https://mail.python.org/mailman/listinfo/python-announce-list |