doing-a-release.rst 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. Doing a release
  2. ===============
  3. Doing a release of ``cryptography`` requires a few steps.
  4. Verifying and upgrading OpenSSL version
  5. ---------------------------------------
  6. The release process uses a static build for Windows and OS X wheels. Check that
  7. the Windows and OS X Jenkins builders have the latest version of OpenSSL
  8. installed before performing the release. If they do not:
  9. Upgrading Windows
  10. ~~~~~~~~~~~~~~~~~
  11. Run the ``openssl-release`` Jenkins job, then copy the resulting artifacts to
  12. the Windows builders and unzip them in the root of the file system.
  13. Upgrading OS X
  14. ~~~~~~~~~~~~~~
  15. ``brew update`` and then ``brew upgrade openssl --universal --build-bottle`` to
  16. build a universal library (32-bit and 64-bit) compatible with all Intel Macs.
  17. This can be confirmed by using
  18. ``lipo -info /usr/local/opt/openssl/lib/libssl.dylib`` to see the available
  19. architectures.
  20. Bumping the version number
  21. --------------------------
  22. The next step in doing a release is bumping the version number in the
  23. software.
  24. * Update the version number in ``src/cryptography/__about__.py``.
  25. * Update the version number in ``vectors/cryptography_vectors/__about__.py``.
  26. * Set the release date in the :doc:`/changelog`.
  27. * Do a commit indicating this.
  28. * Send a pull request with this.
  29. * Wait for it to be merged.
  30. Performing the release
  31. ----------------------
  32. The commit that merged the version number bump is now the official release
  33. commit for this release. You will need to have ``gpg`` installed and a ``gpg``
  34. key in order to do a release. Once this has happened:
  35. * Run ``invoke release {version}``.
  36. The release should now be available on PyPI and a tag should be available in
  37. the repository.
  38. Verifying the release
  39. ---------------------
  40. You should verify that ``pip install cryptography`` works correctly:
  41. .. code-block:: pycon
  42. >>> import cryptography
  43. >>> cryptography.__version__
  44. '...'
  45. >>> import cryptography_vectors
  46. >>> cryptography_vectors.__version__
  47. '...'
  48. Verify that this is the version you just released.
  49. For the Windows wheels check the builds for the ``cryptography-wheel-builder``
  50. job and verify that the final output for each build shows it loaded and linked
  51. the expected OpenSSL version.
  52. Post-release tasks
  53. ------------------
  54. * Update the version number to the next major (e.g. ``0.5.dev1``) in
  55. ``cryptography/__about__.py`` and
  56. ``vectors/cryptography_vectors/__about__.py``.
  57. * Add new :doc:`/changelog` entry with next version and note that it is under
  58. active development
  59. * Send a pull request with these items
  60. * Check for any outstanding code undergoing a deprecation cycle by looking in
  61. ``cryptography.utils`` for ``DeprecatedIn**`` definitions. If any exist open
  62. a ticket to increment them for the next release.
  63. * Send an email to the `mailing list`_ and `python-announce`_ announcing the
  64. release.
  65. .. _`mailing list`: https://mail.python.org/mailman/listinfo/cryptography-dev
  66. .. _`python-announce`: https://mail.python.org/mailman/listinfo/python-announce-list