Making a release

A core developer should use the following steps to create a release X.Y.Z of cmake-python-distributions on PyPI.

This is usually done after Updating the CMake version.


Documentation conventions

The commands reported below should be evaluated in the same terminal session.

Commands to evaluate starts with a dollar sign. For example:

$ echo "Hello"

means that echo "Hello" should be copied and evaluated in the terminal.

PyPI: Step-by-step

  1. Make sure that all CI tests are passing on GitHub Actions.

  2. Download the latest sources

$ cd /tmp && \
  git clone cmake-python-distributions-release && \
  cd cmake-python-distributions-release
  1. List all tags sorted by version

$ git fetch --tags && \
  git tag -l | sort -V
  1. Choose the next release version number

$ release=X.Y.Z


To ensure the packages are uploaded on PyPI, tags must match this regular expression: ^[0-9]+(\.[0-9]+)*(\.post[0-9]+)?$.

  1. Tag the release

$ git tag --sign -m "cmake-python-distributions $release" $release master


We recommend using a GPG signing key to sign the tag.

  1. Publish the release tag

$ git push origin $release


This will trigger builds on each CI services and automatically upload the wheels and source distribution on PyPI.

  1. Check the status of the builds on GitHub Actions.

  2. Once the builds are completed, check that the distributions are available on PyPI.

  3. Make a GitHub release based on the tag. This will display the latest version in the GitHub sidebar, and will notify release watchers of the release. Title it Version X.Y.Z and add a little note about what changed (Python only).

  4. Create a clean testing environment to test the installation

$ pushd $(mktemp -d) && \
  mkvirtualenv cmake-$release-install-test && \
  pip install cmake && \
  cmake --version


If the mkvirtualenv command is not available, this means you do not have virtualenvwrapper installed, in that case, you could either install it or directly use virtualenv or venv.

  1. Cleanup

$ popd && \
  deactivate  && \
  rm -rf dist/* && \
  rmvirtualenv cmake-$release-install-test