Skip to content

Commit 6c903ad

Browse files
committed
fix versioning
1 parent 26bc5c6 commit 6c903ad

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

duckdb_packaging/setuptools_scm_version.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,11 @@ def _git_describe_override_to_pep_440(override_value: str) -> str:
132132
version = version.replace("-rc", "rc")
133133

134134
# Bump version and format according to PEP440
135-
pep440_version = _bump_dev_version(version, int(distance or 0))
135+
distance = int(distance or 0)
136+
if distance == 0 and not version.dirty:
137+
pep440_version = _tag_to_version(str(version))
138+
else:
139+
pep440_version = _bump_dev_version(str(version), distance)
136140
if commit_hash:
137141
pep440_version += f"+g{commit_hash.lower()}"
138142

0 commit comments

Comments
 (0)