This guide shows how to make a new Perfetto Python library release to PyPI.
The package version is derived automatically from the CHANGELOG (the top vX.Y entry maps to the PyPI version 0.X.Y), so there is no separate version-bump step. Publishing is a single stage, driven by the tools/release/release_python.py script.
.venv (the script uses .venv/bin/python).__token__. For the password (API token), find “Perfetto PyPi API Key” on http://go/valentine.vX.Y tag commit. For example:COMMIT=$(git rev-parse v56.0^{commit})
tools/release/release_python.py --publish --commit "$COMMIT"
The script will then perform the following steps:
download_url in python/setup.py to that commit's source archive, build the package (the version is read from the CHANGELOG), and, after you confirm, upload it to PyPI. You will be prompted for your PyPI credentials.python/setup.py.download_url in python/setup.py to point to the commit from the --commit argument.download_url update and create a pull request. After this final PR is landed, the release is complete.