8000 runfiles: Fix usage instructions (#985) · cflewis/rules_python@c988c0a · GitHub
[go: up one dir, main page]

Skip to content

Commit c988c0a

Browse files
authored
runfiles: Fix usage instructions (bazel-contrib#985)
The canonical location for the runfiles library going forward will be the rules_python repo, so users should load from it. Since repository names are essentially dynamic with Bzlmod, they should not be used in import statements.
1 parent 0d3c4f7 commit c988c0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/runfiles/runfiles.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
py_binary(
2222
name = "my_binary",
2323
...
24-
deps = ["@bazel_tools//tools/python/runfiles"],
24+
deps = ["@rules_python//python/runfiles"],
2525
)
2626
2727
2. Import the runfiles library.
2828
29-
from bazel_tools.tools.python.runfiles import runfiles
29+
from python.runfiles import runfiles
3030
3131
3. Create a Runfiles object and use rlocation to look up runfile paths:
3232

0 commit comments

Comments
 (0)
0