This guide provides a concise reminder on updating your ot_handler package version for a new release on PyPI.
- Continue your work on the
developmentbranch. - When ready to release:
-
Test new released features on the robot.
-
Merge the
developmentbranch intomaster. -
Update the changelog.
-
Update the version numbers.
-
(Optional) Tag the release:
git checkout master git merge development git tag -a v<new_version> -m "Release version <new_version>" git push origin master --tags
-
- Open
setup.pyand change theversionfield (e.g., from"0.1.0"to"0.1.1"). - Update the version in
ot_handler/__init__.pywhere it may be exposed.
Perform the operations in the ot_handler root folder.
-
Upgrade your build tools:
python -m pip install --upgrade setuptools wheel twine
-
Build the distribution packages:
python setup.py sdist bdist_wheel
-
Test the installation locally by running:
pip install dist/ot_handler-<new_version>-py3-none-any.whl
-
Verify the update:
python -c "import ot_handler; print(ot_handler.__version__)"
-
Then, upload the final version to the main PyPI repository:
twine upload dist/*When prompted, paste your API token with the pypi- pefix.
-
You will be prompted to enter your PyPI credentials.