8000 fix: correct the labels returned by all_requirements lists (#1146) · jml-derek/rules_python@52e14b7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 52e14b7

Browse files
authored
fix: correct the labels returned by all_requirements lists (bazel-contrib#1146)
This apparently was not working to begin with, but the CI running the example did not catch it because we did not have an empty `WORKSPACE.bzlmod` file. Tested with the CI and with a clean cache on the local laptop.
1 parent ee8cecf commit 52e14b7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This file will be used when bzlmod is enabled, keep it empty
2+
# to ensure that all of the setup is done in MODULE.bazel

python/pip_install/pip_repository.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,11 +370,11 @@ def _pip_repository_bzlmod_impl(rctx):
370370
rctx.file("BUILD.bazel", build_contents)
371371
rctx.template("requirements.bzl", rctx.attr._template, substitutions = {
372372
"%%ALL_REQUIREMENTS%%": _format_repr_list([
373-
"@@{}//{}".format(repo_name, p) if rctx.attr.incompatible_generate_aliases else "@{}_{}//:pkg".format(rctx.attr.name, p)
373+
"@{}//{}".format(repo_name, p) if rctx.attr.incompatible_generate_aliases else "@{}_{}//:pkg".format(rctx.attr.name, p)
374374
for p in bzl_packages
375375
]),
376376
"%%ALL_WHL_REQUIREMENTS%%": _format_repr_list([
377-
"@@{}//{}:whl".format(repo_name, p) if rctx.attr.incompatible_generate_aliases else "@{}_{}//:whl".format(rctx.attr.name, p)
377+
"@{}//{}:whl".format(repo_name, p) if rctx.attr.incompatible_generate_aliases else "@{}_{}//:whl".format(rctx.attr.name, p)
378378
for p in bzl_packages
379379
]),
380380
"%%NAME%%": rctx.attr.name,

0 commit comments

Comments
 (0)
0