Skip to content

Instantly share code, notes, and snippets.

@beveradb
Forked from audreyfeldroy/pypi-release-checklist.md
Last active February 2, 2019 02:08
Show Gist options
  • Select an option

  • Save beveradb/19afc6efdb5df5d5b7a1f9c4df8db0d8 to your computer and use it in GitHub Desktop.

Select an option

Save beveradb/19afc6efdb5df5d5b7a1f9c4df8db0d8 to your computer and use it in GitHub Desktop.
My PyPI Release Checklist
  • Finish work, committing all changes. Check you've got no uncommitted changes before following this list:
git status
  • Merge any remote changes to master:
git pull
  • Run the tests to ensure you're not releasing broken functionality:
tox
  • Edit HISTORY.rst to add a summary of what's changed in this new release:
vim HISTORY.rst
  • Check your RST documentation is still valid
python setup.py checkdocs
  • Commit the updated changelog:
git commit -am "Changelog for upcoming release"
  • Update version number (can also be minor or major) - this immediately creates a new commit and new tag!
bump2version patch
  • Install the package again for local development, but with the new version number:
python setup.py develop
  • Run the tests again to ensure everything still works after installation:
tox
  • Delete old releases to not attempt to re-upload these to PyPI:
rm dist/*
  • Build new releases for PyPI in both the legacy source-only sdist format, and modern wheel format:
python setup.py sdist bdist_wheel
  • Check the reStructuredText documentation will render correctly on PyPI after being uploaded by Travis:
twine check dist/*
  • Push the new commits, and the new tag created by bumpversion. This only works because bump2version (fork of bumpversion creates annotated tags, so you can push them along with the commits in a single command:
git push --follow-tags

** Not currently needed, but would be just before the git push if we weren't using Travis to upload builds to PyPi: Upload to PyPi with Twine (credentials in ~/.pypirc): twine upload dist/* Travis is configured (in .travis.yml) to upload new versions to PyPi itself after a successful build.

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