-
Notifications
You must be signed in to change notification settings - Fork 10
How to upload a new version to PyPI
Marco Tazzari edited this page Mar 3, 2021
·
3 revisions
The following steps need to be performed if you want to publish a new version to PyPI.
- Update the version (in
uvplot/_version.py
). - If you added new, non-Python files to the project that need to be distributed as well, e.g., configuration files, add them to
MANIFEST.in
. - Open a terminal and go into the project's root dir (where
setup.py
is located) -
python setup.py sdist bdist_wheel
to create the packages indist/
directory. - Check the resulting files, especially the egg file: are all the files contained?
Check the content (e.g., with
tar tzf dist/*.tar.gz
) and more formally check with the official PyPI tooltwine check dist/*
- If everything is ok, upload the new version to PyPI:
twine upload --repository uvplot dist/*
Note:
In order to upload to PyPI, twine needs the PyPI credentials. They can be stored in a $HOME/.pypirc
file.
Examples on how to create the .pypirc
file are given in the PyPI page, just after creating the API token.
Useful resources: