Skip to content

Instantly share code, notes, and snippets.

@SpiralOutDotEu
Forked from audreyfeldroy/pypi-release-checklist.md
Last active September 23, 2019 19:43
Show Gist options
  • Save SpiralOutDotEu/91f4593ef40312d581eea15563d97ae4 to your computer and use it in GitHub Desktop.
Save SpiralOutDotEu/91f4593ef40312d581eea15563d97ae4 to your computer and use it in GitHub Desktop.
My PyPI Release Checklist

build

python3 setup.py sdist bdist_wheel

travis encrypt

travis encrypt my_password --add deploy.password

bump2version

bumpversion major
bumpversion minor
bumpversion patch

git tag

git tag -a 'Release_1_0' -m 'Tagged basic string operation code' HEAD
# or tag a specific commit with id
git tag -a 'Release_1_0' -m 'Tagged basic string operation code' 521747298a3790fde1710f3aa2d03b55020575aa

git push with tags

git push --follow-tags

git global config to push always with tags

git config --global push.followTags true

upload to testPyPI

python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*

upload to pypi

twine upload dist/*

cookiecutter-pypackage https://cookiecutter-pypackage.readthedocs.io/en/latest/tutorial.html

  • 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 minor or major)
bumpversion patch
  • Install the package again for local development, but with the new version number:
python setup.py develop
  • Run the tests:
tox
  • Release on PyPI by uploading both sdist and wheel:
python setup.py sdist upload
python setup.py bdist_wheel upload
  • Test that it pip installs:
mktmpenv
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