Skip to content

Instantly share code, notes, and snippets.

@tonyskapunk
Last active February 14, 2019 15:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonyskapunk/53d419b3f9cc6aec1f6430a9cbe601fa to your computer and use it in GitHub Desktop.
Save tonyskapunk/53d419b3f9cc6aec1f6430a9cbe601fa to your computer and use it in GitHub Desktop.
pypi release how-to

Releasing to pypi

Requirements

Config file for ~/.pypirc

[pypi]
username: theusername
password: theusernamepassword

Packages:

  • twine

Releasing a new version

git checkout <TAG>
python3 setup.py sdist
gpg --detach-sign -a dist/*
twine upload dist/*

Cleaning up

rm -Rf dist *.egg-info

Important notes

It's possible to remove/delete a released version but is impossible to upload it with changes, in reality once the package is removed it will not allow you to upload another one despite of seem like is doing it. The source dist package or tarball is located in this location and likely it will be missing if that's removed: https://pypi.python.org/simple/package-name

References

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