Skip to content

Instantly share code, notes, and snippets.

@peterhurford
Last active October 19, 2023 01:09
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterhurford/eb7637ba7f77a63dc7032a49756d4d61 to your computer and use it in GitHub Desktop.
Save peterhurford/eb7637ba7f77a63dc7032a49756d4d61 to your computer and use it in GitHub Desktop.
How to release a new Python package

Nothing novel here, just want these instructions all in one place for my own use.

1.) Ensure everything is pushed to master and is working

2.) Ensure CHANGES.md is up to date with latest

3.) Ensure version in setup.py is incremented

4.) Tag the repo - e.g., git tag 0.2 && git push origin 0.2

5.) Draft a release with the latest tag and the content from CHANGES.md

6.) Create the build - rm -rf build; rm -rf dist; python setup.py sdist bdist_wheel

7.) Upload to Pypi using Twine - twine upload dist/*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment