Skip to content

How to make a release

Alexander Turenko edited this page Apr 29, 2022 · 5 revisions
  • Write release notes based on unreleased changes in CHANGELOG.md.

    • Suggested sections are 'Overview', 'Breaking changes', 'New features', 'Bugfixes', 'Other'.
    • Features and bugfixes are about what a user can feel. Move code health activities such as improving testing or CI into its own section or 'Other' section.
    • Follow our style recommendations.
    • Ask a teammate to take a second glance.
  • Open a pull request with the version update.

    • Bump version in CHANGELOG.md. Add a new 'Unreleased' section.
    • Add an entry into debian/changelog file.
    • Change Version field in rpm/tarantool-python.spec file.
    • Change __version__ variable in tarantool/__init__.py file.
  • Build, upload to test.pypi.org, verify.

    • Register on https://test.pypi.org/account/register/ to proceed with the next steps.

    • Invoke python setup.py sdist to create dist/tarantool-X.Y.Z.tar.gz.

    • Invoke python setup.py bdist_wheel to create dist/tarantool-X.Y.Z-py3-none-any.whl.

    • Verify it: twine check dist/*.

    • Perform a test upload and verify it:

      $ twine upload -r testpypi dist/*
      $ virtualenv -p python3.10 ~/.env-3.10-test-tarantool-python
      $ . ~/.env-3.10-test-tarantool-python/bin/activate
      $ pip install --index-url https://test.pypi.org/simple tarantool
      $ tarantool foo.lua
      $ python
      >>> import tarantool
      >>> <..test something..>
  • Get the pull request merged. Pull the fresh master.

  • Tag a release on GitHub.

    • Create an annotated tag: git tag -a --cleanup verbatim X.Y.Z. Place release notes into the tag annotation.
    • Push the tag: git push --tags.
  • Create a release on GitHub: https://github.com/tarantool/tarantool-python/releases.

  • Build and upload the release to PyPI.

    • Register on https://pypi.org/account/register/ to proceed with the next steps.
    • Clean everything in the repository just in case: git clean -xffd.
    • Invoke python setup.py sdist to create dist/tarantool-X.Y.Z.tar.gz.
    • Invoke python setup.py bdist_wheel to create dist/tarantool-X.Y.Z-py3-none-any.whl.
    • Verify it: twine check dist/*.
    • Upload to PyPI: twine upload dist/*.
  • Verify the release:

    $ cd $(mktemp -d)
    $ tarantool -e "box.cfg{listen = 3301} box.schema.user.grant('guest', 'super')" -i
    $ virtualenv -p python3.10 ~/.env-3.10-test-tarantool-python-release
    $ . ~/.env-3.10-test-tarantool-python-release/bin/activate
    $ pip install tarantool
    <..is the fresh version installed?..>
    $ python
    >>> import tarantool
    >>> c = tarantool.connect('localhost', 3301)
    >>> c.call('box.info')
Clone this wiki locally