Publishing to PyPI¶
- Bump the version in
pyproject.tomland add a changelog entry. - Build artifacts from a clean environment:
python -m pip install --upgrade build twine python -m build # dist/ now contains robbuffet-<ver>.tar.gz and robbuffet-<ver>-py3-none-any.whl - Upload with a PyPI token:
export PYPI_TOKEN="pypi-XXXXXXXXXXXXXXXXXXXX" twine upload -u __token__ -p "$PYPI_TOKEN" dist/* - Verify the release:
pip install --no-cache-dir robbuffet==<ver> python - <<'PY' import robbuffet print(robbuffet.__version__) PY
For TestPyPI, replace the upload command with:
twine upload --repository testpypi dist/*