Release dftracer by tagging the package version and publishing a GitHub release
RecipeVerified 30 Sep 2026Holds project: dftracer
Recipe. When to use it, the steps, and what showed that they work.
When to use#
Use this to cut a dftracer release to PyPI.
Steps#
- Bump the library version in
VERSION(4.x) withscript/repo/update_version.sh. Commit it through a PR todevelop.developis the default branch;masteris far behind. - Pick the tag from the PACKAGE version (2.x), not from
VERSION. Past pairs: v2.0.3 with lib 4.1.0, v2.1.0 with 4.2.0, v2.1.1 with 4.2.1. The "next steps" thatupdate_version.shprints saygit tag v<VERSION>. That is wrong: it would publishdftracer 4.xto PyPI. - Wait for CI on
developto pass. - Create a GitHub release:
gh release create v2.2.0 --target develop --generate-notes. A tag push alone does not publish to PyPI.python-publish.ymlruns only when a release is published. Av*tag push startsdocker-publish.yml. python-publish.ymlbuilds the wheels (cp39 to cp314, manylinux 2.28) throughwheels.yml, plus an sdist, and uploads them withPYPI_TOKEN.
Checks before release:
- In a throwaway clone, add the tag locally and run
scripts/wheel/build_wheels.sh --list | grep 'wheel version'. It must print the tag withoutv. - Download the latest
.postNwheel withpip download --platform manylinux_2_28_x86_64 --only-binary :all:and check its RECORD against its zip entries. - Smoke test in
python:3.12-slimwith--platform linux/amd64:DFTRACER_ENABLE=1 DFTRACER_LOG_FILE=/tmp/trace DFTRACER_DATA_DIR=all python t.py, then look for POSIX events in/tmp/trace*.pfw.gz. Withinitialize_log(logfile=...)and noDFTRACER_LOG_FILE, the file did not appear where I expected.
Note: develop prereleases are <tag>.postN. PyPI counts .postN as a final release, so a plain pip install dftracer gets them. The README says --pre is needed; that is not true.
Evidence#
Read from .github/workflows/{python-publish,prerelease,wheels,docker-publish}.yml and scripts/wheel/build_wheels.sh resolve_version on 2026-09-30. With a local v2.2.0 tag, the wheel script and setup.py myversion_func both gave 2.2.0, also with a dirty tree. PyPI info.version was 2.1.1.post45. The post45 cp312 wheel installed and traced open64, read, write, lseek64 and close.
Also found by searching
- update_version.sh says git tag v4.3.0 but PyPI should get dftracer 2.x
- which tag do I use when releasing dftracer, the VERSION file or package version
- how do I cut a dftracer release to PyPI with a GitHub release
- dftracer release develop default branch gh release create v2.2.0 --target develop
- update_version.sh next steps says git tag v4.2.1 and I worried it will publish dftracer 4.x to PyPI
- pushed a v* tag but nothing got uploaded to PyPI for dftracer
- how do I cut a dftracer release to PyPI, which tag and gh release command?