From 7b00ff2487e78e0d1977fab090b6e38183bd6038 Mon Sep 17 00:00:00 2001 From: Chris Cummings Date: Thu, 3 Sep 2026 20:03:25 +0100 Subject: [PATCH 1/3] Support internal wheel version suffixes --- setup.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 82770496d..d78152598 100644 --- a/setup.py +++ b/setup.py @@ -149,13 +149,13 @@ def run(self): with open("src/sgl/sgl.h") as f: matches = dict(VERSION_REGEX.findall(f.read())) - version_override = os.environ.get("SLANGPY_VERSION_OVERRIDE", "") - if version_override: - version = version_override - else: - version = "{MAJOR}.{MINOR}.{PATCH}".format(**matches) + version = "{MAJOR}.{MINOR}.{PATCH}".format(**matches) + version += os.environ.get("SLANGPY_VERSION_SUFFIX", "") print(f"version={version}") +if BUILD_RELEASE_WHEEL and not os.environ.get("SLANGPY_VERSION_SUFFIX"): + raise RuntimeError("Release-wheel builds require SLANGPY_VERSION_SUFFIX") + with open("README.md", "r") as f: long_description = f.read() From e1f94d65b34a99e2fe9b4adb90c00b11134a3b0c Mon Sep 17 00:00:00 2001 From: Chris Cummings Date: Fri, 4 Sep 2026 10:45:50 +0100 Subject: [PATCH 2/3] Preserve wheel version override behavior --- setup.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index d78152598..34e758e01 100644 --- a/setup.py +++ b/setup.py @@ -149,13 +149,16 @@ def run(self): with open("src/sgl/sgl.h") as f: matches = dict(VERSION_REGEX.findall(f.read())) - version = "{MAJOR}.{MINOR}.{PATCH}".format(**matches) - version += os.environ.get("SLANGPY_VERSION_SUFFIX", "") + version_override = os.environ.get("SLANGPY_VERSION_OVERRIDE", "") + if version_override: + version = version_override + else: + version = "{MAJOR}.{MINOR}.{PATCH}".format(**matches) + version_suffix = os.environ.get("SLANGPY_VERSION_SUFFIX", "") + if version_suffix: + version += version_suffix print(f"version={version}") -if BUILD_RELEASE_WHEEL and not os.environ.get("SLANGPY_VERSION_SUFFIX"): - raise RuntimeError("Release-wheel builds require SLANGPY_VERSION_SUFFIX") - with open("README.md", "r") as f: long_description = f.read() From 5b899532d48e336648b602fc148a82b1ce81ee48 Mon Sep 17 00:00:00 2001 From: Chris Cummings Date: Fri, 4 Sep 2026 10:48:01 +0100 Subject: [PATCH 3/3] Simplify wheel version suffix handling --- setup.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 34e758e01..eea8fbe88 100644 --- a/setup.py +++ b/setup.py @@ -154,9 +154,7 @@ def run(self): version = version_override else: version = "{MAJOR}.{MINOR}.{PATCH}".format(**matches) - version_suffix = os.environ.get("SLANGPY_VERSION_SUFFIX", "") - if version_suffix: - version += version_suffix + version += os.environ.get("SLANGPY_VERSION_SUFFIX", "") print(f"version={version}") with open("README.md", "r") as f: