Skip to content

Releasing the Python Client

Brett Hazen edited this page Dec 14, 2015 · 10 revisions

Currently Python has its own version of riak client which lives out in PyPI:

These releases are manually built on developer machines and automagically uploaded to PyPI. There are two prerequisites for being able to release to PyPI. First you need to have a PGP Key and second, you need to be an administrator for those projects in PyPI.

For all versions of Python, the environment variable RELEASE_GPG_KEYNAME needs to be set to the key currently registered with PyPI, e.g. export RELEASE_GPG_KEYNAME=AABBCCDD. You will also need this .pypirc file in your home directory:

[server-login]
username:javajolt
password:cleartextpassword

For each version you'll need to build a new version-specific egg distribution. These versions must be in your path to make the release:

  • python2.7
  • python3.3
  • python3.4
  • python3.5

Each of these versions must have these packages installed already:

  • six
  • protobuf (Python 2)
  • riak_pb (Python 2)
  • pyopenssl (Python 2.7.8 and below)
  • python3_protobuf (Python 3)
  • python3_riak_pb (Python 3)

Once that is done, make sure each of these are done:

  1. Release Notes.md update
  2. Update readthedocs.org
  3. Annoted tag for release:
    • git tag --sign -a 2.2.0 -m "Release 2.2.0" --local-user AABBCCDD
  4. Upload to PyPI:
    • python2.7 setup.py sdist upload -s -i AABBCCDD
    • python2.7 setup.py bdist_egg upload -s -i AABBCCDD
    • python3.3 setup.py bdist_egg upload -s -i AABBCCDD
    • python3.4 setup.py bdist_egg upload -s -i AABBCCDD
  5. Create a 2.3-stable branch (no minor version)
  6. Send out message to mailing list

Once the files have been uploaded, do a sanity check on PyPI. You should see something like this for each project:

Remove? | Type | Py Version | Comment | Download | Size | MD5 digest --------|------|------------|---------|----------|------|-----|------- | Python Egg | 2.6 | riak_pb-2.0.0.16-py2.6.egg | sig | 36KB | 7e36c57c8e2db12cb73ff69e163693d5 | Python Egg | 2.7 | riak_pb-2.0.0.16-py2.7.egg | sig | 36KB | 3cadb19640e5b78f735b8c847fe801f0 | Source | source | riak_pb-2.0.0.16.tar.gz | sig | 16KB | b40403fe7e2179ad489733c109a2c03f

Each project also includes two eggs and a source tar file shown above. It's always good to test by pulling down a new version from PyPI just to be sure.

NOTE : You can create a release in PyPI once and only once. If you screw it up, you'll need to tag a new version and start over. There is no overwriting of old versions. You have been warned.

Clone this wiki locally