- Create PyPI account: https://pypi.org/account/register/
- Create API token: https://pypi.org/manage/account/token/
- Install twine:
pip install twine
-
Build the package:
python setup.py sdist bdist_wheel
-
Check the package:
twine check dist/* -
Upload to Test PyPI (optional):
twine upload --repository testpypi dist/* -
Upload to PyPI:
twine upload dist/*
Create ~/.pypirc:
[distutils]
index-servers = pypi
[pypi]
repository = https://upload.pypi.org/legacy/
username = __token__
password = pypi-YOUR_API_TOKEN_HERE- Update version in
setup.pyandhospitable/__init__.py - Update
CHANGELOG.md - Commit changes
- Create git tag:
git tag v0.1.1 - Push tag:
git push origin v0.1.1 - Build and upload new version
- Package Name:
hospitable-python - Import Name:
hospitable - PyPI URL: https://pypi.org/project/hospitable-python/
- Install:
pip install hospitable-python
- Wheel:
hospitable_python-0.1.0-py3-none-any.whl - Source:
hospitable-python-0.1.0.tar.gz
Both files are ready for PyPI upload.