Skip to content

Commit 2606b8f

Browse files
committed
Correct handling of pre-release Python versions.
1 parent e856075 commit 2606b8f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Apple/__main__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,11 @@ def package_version(prefix_path: Path) -> str:
447447
version = match[1]
448448
# If not building against a tagged commit, add a timestamp to the
449449
# version. Follow the PyPA version number rules, as this will make
450-
# it easier to process with other tools.
450+
# it easier to process with other tools. The version will have a
451+
# `+` suffix once any official release has been made; a freshly
452+
# forked main branch will have a version of 3.X.0a0.
453+
if version.endswith("a0"):
454+
version += "+"
451455
if version.endswith("+"):
452456
version += datetime.now(timezone.utc).strftime("%Y%m%d.%H%M%S")
453457

0 commit comments

Comments
 (0)