Skip to content

Commit 7832853

Browse files
committed
Use minor version bounds for uv_build
1 parent 7c738e1 commit 7832853

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎scripts/update_uv_build_version.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
import httpx
1313
from packaging.utils import parse_wheel_filename
14-
from packaging.version import Version
1514

1615

1716
def main():
@@ -34,13 +33,14 @@ def main():
3433
[major, minor, _patch] = current_release.release
3534
if major != 0:
3635
raise NotImplementedError("The script needs to be updated for uv 1.x")
37-
upper_bound = Version(f"{major}.{minor + 1}.0")
36+
lower_bound = f"{major}.{minor}"
37+
upper_bound = f"{major}.{minor + 1}"
3838

3939
repository_root = Path(__file__).parent.parent
4040
existing = repository_root.joinpath(
4141
"source/shared/build-backend-tabs.rst"
4242
).read_text()
43-
replacement = f'requires = ["uv_build >= {current_release}, <{upper_bound}"]'
43+
replacement = f'requires = ["uv_build >= {lower_bound}, <{upper_bound}"]'
4444
searcher = re.compile(re.escape('requires = ["uv_build') + ".*" + re.escape('"]'))
4545
if not searcher.search(existing):
4646
raise RuntimeError("Could not `uv-build` entry")
@@ -51,7 +51,7 @@ def main():
5151
Path("source/shared/build-backend-tabs.rst").write_text(updated)
5252
if github_output := os.environ.get("GITHUB_OUTPUT"):
5353
with open(github_output, "a") as f:
54-
f.write(f"version={current_release}\n")
54+
f.write(f"version={lower_bound}\n")
5555
f.write("updated=true\n")
5656
else:
5757
print("Already up-to-date source/shared/build-backend-tabs.rst")

‎source/shared/build-backend-tabs.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@
3838
.. code-block:: toml
3939
4040
[build-system]
41-
requires = ["uv_build >= 0.13.6, <0.14.0"]
41+
requires = ["uv_build >= 0.13, <0.14"]
4242
build-backend = "uv_build"

0 commit comments

Comments
 (0)