Skip to content

Commit 248f52a

Browse files
jsoucheironclaude
andcommitted
Derive package version dynamically from git tag on publish
Use setuptools-scm to derive the package version from git tags at build time. This removes the need to manually bump the version in a separate commit before creating a release — the version is read directly from the git tag (e.g. v1.3.0 -> 1.3.0). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 69072d7 commit 248f52a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "pycfmodel"
3-
version = "1.2.0"
3+
dynamic = ["version"]
44
readme = "README.md"
55
description="A python model for Cloud Formation scripts"
66
requires-python=">=3.9.0"
@@ -21,10 +21,12 @@ email = "security@skyscanner.net"
2121

2222
[build-system]
2323
requires = [
24-
"setuptools", "wheel"
24+
"setuptools", "setuptools-scm", "wheel"
2525
]
2626
build-backend = "setuptools.build_meta"
2727

28+
[tool.setuptools_scm]
29+
2830
[tool.setuptools.packages.find]
2931
include = ["pycfmodel*"]
3032
exclude = ["tests", "docs"]

uv.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)