Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save BramVanroy/adb8e7d3a8d11c881015af370318277b to your computer and use it in GitHub Desktop.
Save BramVanroy/adb8e7d3a8d11c881015af370318277b to your computer and use it in GitHub Desktop.
My PyPI Release Checklist
  • Update HISTORY.rst
  • Commit the changes:
git add HISTORY.rst
git commit -m "Changelog for upcoming release 0.1.1."
  • Update version number (can also be major (x.0.0), minor (0.x.0) instead of patch (0.0.x)
bumpversion patch
  • Install the package again for local development, but with the new version number:
python setup.py develop
  • Run the tests:
tox
  • Build distributions
python setup.py sdist bdist_wheel

or with a pyproject.toml (requires build to be installed):

python -m build
  • Release on PyPI by uploading both sdist and wheel:
twine upload dist/* --skip-existing
  • Test that it pip installs:
virtualenv virtualtest
virtualtest/Scripts/activate
pip install my_project
<try out my_project>
deactivate
  • Push: git push
  • Push tags: git push --tags
  • Check the PyPI listing page to make sure that the README, release notes, and roadmap display properly. If not, copy and paste the RestructuredText into http://rst.ninjs.org/ to find out what broke the formatting.
  • Edit the release on GitHub (e.g. https://github.com/audreyr/cookiecutter/releases). Paste the release notes into the release's release page, and come up with a title for the release.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment