Skip to content

Release 1.3.0: take the version from the git tag - #45

Merged
binyamin555 merged 3 commits into
mainfrom
release/1.3.0
Oct 27, 2026
Merged

binyamin555 merged 3 commits into
mainfrom
release/1.3.0

Conversation

@binyamin555

@binyamin555 binyamin555 commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Summary

The package version now comes from the latest vX.Y.Z git tag, so releasing only takes publishing a GitHub release. There's no version to bump in the code anymore.

Publishing a v1.3.0 release after this is merged produces 1.3.0, the release that adds Python 3.14 and free-threaded 3.14t support (#44).

How it works

  • tools/version.py computes the version:
    • On a tagged commit: X.Y.Z.
    • After a tag: X.Y.(Z+1).devN+g<hash>.
    • In an sdist: the version stored in its .version file.
    • Without git history (e.g. a shallow PR checkout): 0.0.0.dev0.
  • meson.build takes the project version from that script. A meson dist script writes .version into every sdist, since sdists have no git history.
  • __version__ is generated at build time (src/extype/_version.py.in → extype/_version.py).

Publish workflow

  • The publish jobs check out with fetch-depth: 0, so the release tag is available.
  • The Linux job builds an sdist first and runs cibuildwheel on it, because the build containers don't have the git history. Windows and macOS already build their wheels from the sdist via python -m build.
  • New check before uploading: every wheel's version must match the release tag. This stops dev versions from reaching PyPI. Note that a manual workflow_dispatch run from a branch now fails at this step; run it from a tag instead.
  • The README has a new "Releasing" section.

Testing

Locally on Windows:

  • An untagged commit builds as 1.2.1.dev14+g90d64db. The sdist contains .version, and the wheel built from that sdist has the same version.
  • With a temporary local v1.3.0 tag (deleted afterwards, never pushed), the sdist and wheels build as 1.3.0. That includes cibuildwheel building extype-1.3.0-cp314-cp314t-win_amd64.whl from the sdist.
  • A shallow clone builds as 0.0.0.dev0, so PR test runs keep working.
  • Tests pass on 3.9 and 3.14t, and extype.__version__ matches the build.
  • The release-version check accepts matching wheels and rejects a mismatched version or a non-tag ref.

Not verified: the Linux cibuildwheel run inside Docker. The publish workflow only runs on a release.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@binyamin555
binyamin555 requested a review from neriyaco October 27, 2026 13:54
binyamin555 and others added 2 commits October 27, 2026 16:04
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Fetch the git history in the publish jobs so the tag is available
- Build the Linux wheels from the sdist, which carries the version
- Refuse to upload wheels whose version doesn't match the release tag
- Document the release process

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@binyamin555 binyamin555 changed the title Bump version to 1.3.0 Release 1.3.0: take the version from the git tag Oct 27, 2026
@binyamin555
binyamin555 requested a review from elazarcoh October 27, 2026 14:26
@binyamin555
binyamin555 merged commit b0a0aa7 into main Oct 27, 2026
27 checks passed
@binyamin555
binyamin555 deleted the release/1.3.0 branch October 27, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants