Skip to content

Latest commit

History

History
66 lines (49 loc) 路 1.33 KB

File metadata and controls

66 lines (49 loc) 路 1.33 KB

PyPI Distribution Guide

Publishing to PyPI

Prerequisites

  1. Create PyPI account: https://pypi.org/account/register/
  2. Create API token: https://pypi.org/manage/account/token/
  3. Install twine: pip install twine

Publishing Steps

  1. Build the package:

    python setup.py sdist bdist_wheel
  2. Check the package:

    twine check dist/*
  3. Upload to Test PyPI (optional):

    twine upload --repository testpypi dist/*
  4. Upload to PyPI:

    twine upload dist/*

Configuration

Create ~/.pypirc:

[distutils]
index-servers = pypi

[pypi]
repository = https://upload.pypi.org/legacy/
username = __token__
password = pypi-YOUR_API_TOKEN_HERE

Version Updates

  1. Update version in setup.py and hospitable/__init__.py
  2. Update CHANGELOG.md
  3. Commit changes
  4. Create git tag: git tag v0.1.1
  5. Push tag: git push origin v0.1.1
  6. Build and upload new version

Package Information

Distribution Files

  • 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.