Skip to content

Commit 987c906

Browse files
committed
repro pip_repository_annotations_test failure
1 parent 5a798a6 commit 987c906

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

examples/pip_repository_annotations/pip_repository_annotations_test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@
2121
import unittest
2222
from pathlib import Path
2323

24+
print("sys.path:")
25+
for i, x in enumerate(sorted(sys.path)):
26+
print(x)
27+
28+
raise SystemExit(1)
29+
2430
from rules_python.python.runfiles import runfiles
2531

2632

python/runfiles/BUILD.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ py_library(
3333
# Add the repo root so `import python.runfiles.runfiles` works. This makes it agnostic
3434
# to the --experimental_python_import_all_repositories setting.
3535
"../..",
36+
## todo: this fixes the test, but I don't think its generally safe to do.
37+
## It adds the runfiles root, which makes _everything_ under it importable,
38+
## not just the rules_python directory
39+
##"../../..",
3640
],
3741
visibility = ["//visibility:public"],
3842
)

0 commit comments

Comments
 (0)