Skip to content

Commit 58e5ddf

Browse files
authored
fix(uv): Venv config conditions to public (#749)
Make the venv configuration conditions public so that the `compatible_with` and `incompatible_with` select generators are usable globally. ### Changes are visible to end-users: yes - Searched for relevant documentation and updated as needed: yes - Breaking change (forces users to change their own code or config): no - Suggested release notes appear below: yes Fixed venv configuration conditions being private by default. ### Test plan - Covered by existing test cases
1 parent 11a04f3 commit 58e5ddf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

uv/private/hub/repository.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ config_setting(
7373
flag_values = {{
7474
"@aspect_rules_py//uv/private/constraints/venv:venv": "{0}",
7575
}},
76-
visibility = ["//:__subpackages__"],
76+
visibility = ["//visibility:public"], # So that compatible_with is usable from other repos
7777
)
7878
""".format(name),
7979
)
@@ -99,7 +99,7 @@ def compatible_with(venvs, extra_constraints = []):
9999
fail("Errant virtualenv reference %r" % v)
100100
101101
return {{
102-
("@@" + _repo + "//venv:" + it): extra_constraints
102+
Label("//venv:" + it): extra_constraints
103103
for it in venvs
104104
}} | {{
105105
"//conditions:default": ["@platforms//:incompatible"],
@@ -111,7 +111,7 @@ def incompatible_with(venvs, extra_constraints = []):
111111
fail("Errant virtualenv reference %r" % v)
112112
113113
return {{
114-
("@@" + _repo + "//venv:" + it): ["@platforms//:incompatible"]
114+
Label("//venv:" + it): ["@platforms//:incompatible"]
115115
for it in venvs
116116
}} | {{
117117
"//conditions:default": extra_constraints,

0 commit comments

Comments
 (0)