Repository navigation
build: derive the package version from git tags (setuptools-scm) - #172
Merged
Merged
Conversation
Replace the hard-coded version = "1.0" (out of step with the v0.2 tag) with a dynamic version from setuptools-scm, and fetch full history in the test workflow so the tags are visible there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KriFos1
approved these changes
Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pyproject.tomlhard-codedversion = "1.0", but the newest tag isv0.2. This PR takes the version from git tags with setuptools-scm instead.Changes
[build-system]requiressetuptools>=64andsetuptools-scm>=8.[project]usesdynamic = ["version"]in place ofversion = "1.0".[tool.setuptools_scm]table withfallback_version = "0.0.0", used for builds without git metadata (e.g. a source zip).actions/checkoutusesfetch-depth: 0. A shallow clone has no tags and would report0.1.dev1.pet versionalready readsimportlib.metadata.version("PET"), so it needed no change.Resulting versions
v1.01.01.1.devN+g<hash>main(afterv0.2)0.3.dev5+g92ded56(checked by installing into a clean venv)No tags are created automatically. To release, push a tag (or publish a GitHub Release).
1.0to0.3.devNuntil the next tag. If the next release should be 1.0, tagv1.0after merging.🤖 Generated with Claude Code