pip install build twineEdit pyproject.toml — the version field is the single source of truth:
[project]
version = "2.1.X"Also update __date__ in fetchmgs/fetchmgs.py if desired.
rm -rf dist/python -m buildThis produces dist/fetchMGs-<version>.tar.gz (sdist) and dist/fetchMGs-<version>-py3-none-any.whl (wheel).
twine check dist/*Fix any warnings before uploading.
twine upload --repository testpypi dist/*Install from TestPyPI to verify:
pip install --index-url https://test.pypi.org/simple/ fetchMGstwine upload dist/*Enter your PyPI username (__token__) and API token when prompted, or configure ~/.pypirc:
[pypi]
username = __token__
password = pypi-<your-token>