We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4be1f1f commit 74e10bdCopy full SHA for 74e10bd
1 file changed
python/uv/private/uv_repository.bzl
@@ -57,14 +57,24 @@ def _uv_repo_impl(repository_ctx):
57
),
58
)
59
60
- return {
+ attrs = {
61
"name": repository_ctx.attr.name,
62
"platform": repository_ctx.attr.platform,
63
"sha256": result.sha256,
64
"urls": repository_ctx.attr.urls,
65
"version": repository_ctx.attr.version,
66
}
67
68
+ # Bazel <8.3.0 lacks repository_ctx.repo_metadata
69
+ if not hasattr(repository_ctx, "repo_metadata"):
70
+ return attrs
71
+
72
+ reproducible = repository_ctx.attr.sha256 != ""
73
+ return repository_ctx.repo_metadata(
74
+ reproducible = reproducible,
75
+ attrs_for_reproducibility = {} if reproducible else attrs,
76
+ )
77
78
uv_repository = repository_rule(
79
_uv_repo_impl,
80
doc = "Fetch external tools needed for uv toolchain",
0 commit comments