-
Notifications
You must be signed in to change notification settings - Fork 4
PyPI Publishing
Greg Annandale edited this page May 9, 2022
·
2 revisions
- Log in to both https://test.pypi.org/ and https://pypi.org/
- Generate API tokens for each (use your name for the token name)
- Create
~/.pypirc
and place into it the following (pasting in the tokens from the step above):
[pypi]
username = __token__
password = pypi-AgEIcH...
[testpypi]
username = __token__
password = pypi-AgENdG...
- Ensure the package version is bumped up as appropriate.
- Build:
python setup.py sdist bdist_wheel
(you may need topip install wheel
first) - Test the build:
python3 -m twine check dist/*
- Upload to PyPI Test:
python3 -m twine upload --repository testpypi dist/*
- Check the package at the URL supplied
- Upload to PyPI:
python3 -m twine upload dist/*