From 7832853cba1f2a8b56bda09eaeb94f455fb4605e Mon Sep 17 00:00:00 2001 From: konsti-openai Date: Thu, 12 Nov 2026 17:39:06 +0100 Subject: [PATCH] Use minor version bounds for uv_build --- scripts/update_uv_build_version.py | 8 ++++---- source/shared/build-backend-tabs.rst | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/update_uv_build_version.py b/scripts/update_uv_build_version.py index 69fefba278..a7e5f29c70 100644 --- a/scripts/update_uv_build_version.py +++ b/scripts/update_uv_build_version.py @@ -11,7 +11,6 @@ import httpx from packaging.utils import parse_wheel_filename -from packaging.version import Version def main(): @@ -34,13 +33,14 @@ def main(): [major, minor, _patch] = current_release.release if major != 0: raise NotImplementedError("The script needs to be updated for uv 1.x") - upper_bound = Version(f"{major}.{minor + 1}.0") + lower_bound = f"{major}.{minor}" + upper_bound = f"{major}.{minor + 1}" repository_root = Path(__file__).parent.parent existing = repository_root.joinpath( "source/shared/build-backend-tabs.rst" ).read_text() - replacement = f'requires = ["uv_build >= {current_release}, <{upper_bound}"]' + replacement = f'requires = ["uv_build >= {lower_bound}, <{upper_bound}"]' searcher = re.compile(re.escape('requires = ["uv_build') + ".*" + re.escape('"]')) if not searcher.search(existing): raise RuntimeError("Could not `uv-build` entry") @@ -51,7 +51,7 @@ def main(): Path("source/shared/build-backend-tabs.rst").write_text(updated) if github_output := os.environ.get("GITHUB_OUTPUT"): with open(github_output, "a") as f: - f.write(f"version={current_release}\n") + f.write(f"version={lower_bound}\n") f.write("updated=true\n") else: print("Already up-to-date source/shared/build-backend-tabs.rst") diff --git a/source/shared/build-backend-tabs.rst b/source/shared/build-backend-tabs.rst index c826ce9bde..9036597172 100644 --- a/source/shared/build-backend-tabs.rst +++ b/source/shared/build-backend-tabs.rst @@ -38,5 +38,5 @@ .. code-block:: toml [build-system] - requires = ["uv_build >= 0.13.6, <0.14.0"] + requires = ["uv_build >= 0.13, <0.14"] build-backend = "uv_build"