From fe237f24f7200df5c3366d444e2ca43954f38a8f Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Fri, 6 Feb 2026 18:38:55 -0800 Subject: [PATCH 1/2] fix docs --- python/private/attributes.bzl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python/private/attributes.bzl b/python/private/attributes.bzl index 4687693cb7..a187fac4d6 100644 --- a/python/private/attributes.bzl +++ b/python/private/attributes.bzl @@ -189,7 +189,13 @@ List of import directories to be added to the PYTHONPATH. Subject to "Make variable" substitution. These import directories will be added for this rule and all rules that depend on it (note: not the rules this rule depends on. Each directory will be added to `PYTHONPATH` by `py_binary` rules -that depend on this rule. The strings are repo-runfiles-root relative, +that depend on this rule. + +The values are target-directory-relative runfiles-root paths. e.g. given target +`//foo/bar:baz`, `sys.path` will be affected as: +* `a/b` adds `$runfilesRoot/$repo/foo/bar/a/b` +* `../sibling` adds `$runfilesRoot/$repo/foo/sibling` +* `../../` adds `$runfilesRoot/$repo` Absolute paths (paths that start with `/`) and paths that references a path above the execution root are not allowed and will result in an error. From 5833b196380efb3fe3dc00d2a425db00cb7c2331 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Fri, 6 Feb 2026 19:02:16 -0800 Subject: [PATCH 2/2] Update python/private/attributes.bzl Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- python/private/attributes.bzl | 1 + 1 file changed, 1 insertion(+) diff --git a/python/private/attributes.bzl b/python/private/attributes.bzl index a187fac4d6..362eee8f2e 100644 --- a/python/private/attributes.bzl +++ b/python/private/attributes.bzl @@ -196,6 +196,7 @@ The values are target-directory-relative runfiles-root paths. e.g. given target * `a/b` adds `$runfilesRoot/$repo/foo/bar/a/b` * `../sibling` adds `$runfilesRoot/$repo/foo/sibling` * `../../` adds `$runfilesRoot/$repo` +(where `$repo` is the name of the repository containing the target). Absolute paths (paths that start with `/`) and paths that references a path above the execution root are not allowed and will result in an error.