Skip to content

Instantly share code, notes, and snippets.

@martyzz1
Last active October 14, 2018 21:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martyzz1/e7569a14a3e738c8f1d0982bc46fdfec to your computer and use it in GitHub Desktop.
Save martyzz1/e7569a14a3e738c8f1d0982bc46fdfec to your computer and use it in GitHub Desktop.
Pypi Release process
  • Update HISTORY.rst
  • Update version number in my_project/__init__.py
  • 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 --current-version 3.3.0 minor setup.py
  • 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 bdist_wheel --universal
twine upload dist/*
  • Test that it pip installs:
mktmpenv
pip install my_project
<try out my_project>
deactivate
  • Wait for Travis-CI to pass
  • If it passes, tag the commit.
git tag 3.4.0
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