From 04dc0b5b22e177d155612f1dc7832892e538c495 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Thu, 12 Jan 2023 15:57:28 +0100 Subject: [PATCH] runfiles: Fix usage instructions 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. --- python/runfiles/runfiles.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/runfiles/runfiles.py b/python/runfiles/runfiles.py index 293af3a49b..5e9cb795cf 100644 --- a/python/runfiles/runfiles.py +++ b/python/runfiles/runfiles.py @@ -27,12 +27,12 @@ py_binary( name = "my_binary", ... - deps = ["@bazel_tools//tools/python/runfiles"], + deps = ["@rules_python//python/runfiles"], ) 2. Import the runfiles library. - from bazel_tools.tools.python.runfiles import runfiles + from python.runfiles import runfiles 3. Create a Runfiles object and use rlocation to look up runfile paths: