8000 Also name the BUILD file in external repository roots BUILD.bazel (#457) · AutomatedTester/rules_python@04c6d7f · GitHub
[go: up one dir, main page]

Skip to content

Commit 04c6d7f

Browse files
authored
Also name the BUILD file in external repository roots BUILD.bazel (bazel-contrib#457)
* Also name the BUILD file in external repository roots BUILD.bazel * Don't put empty BUILD.bazel into package-specific external repos
1 parent 37f04a4 commit 04c6d7f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/pip_install/pip_repository.bzl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ def _construct_pypath(rctx):
1212
rctx: Handle to the repository_context.
1313
Returns: String of the PYTHONPATH.
1414
"""
15-
rctx.file("BUILD", "")
1615

1716
# Get the root directory of these rules
1817
rules_root = rctx.path(Label("//:BUILD")).dirname
@@ -64,6 +63,9 @@ def _pip_repository_impl(rctx):
6463
if rctx.attr.incremental and not rctx.attr.requirements_lock:
6564
fail("Incremental mode requires a requirements_lock attribute be specified.")
6665

66+
# We need a BUILD file to load the generated requirements.bzl
67+
rctx.file("BUILD.bazel", "")
68+
6769
pypath = _construct_pypath(rctx)
6870

6971
if rctx.attr.incremental:

0 commit comments

Comments
 (0)
0