I was wondering what is the best procedure or practices for releasing a new python package version on pypi and github.
For example, is this the typical workflow a major python package would follow?
- On
master
branch, incrementversion
number- Set
version='1.5.0'
insetup.py
- Set
__version__ = '1.5.0'
in package__init__.py
- Set
- Update
CHANGELOG.md
with new version - Run
tox
locally to verify package - Push changes
git push origin master
- Create tag
git tag v1.5.0 -m "Release v1.5.0"
- Push tag
git push origin v1.5.0
- Wait for
Travis CI
build to finish. - Build package
python setup.py sdist bdist_wheel
- Verify created packages
test-sdist/bin/pip install dist/<package>-1.5.0.tar.gz
test-wheel/bin/pip install dist/<package>-1.5.0-py2.py3-none-any.whl
- Upload to
PyPI Staging
twine upload -r testpypi dist/<package>-1.5.0*
pip install --user --no-cache-dir --extra-index-url https://testpypi.python.org/pypi <package>
- Upload to
PyPI Production
twine upload dist/<package>-1.5.0>*
pip install <package>==1.5.0