Skip to content

Commit

Permalink
Also name the BUILD file in external repository roots BUILD.bazel (ba…
Browse files Browse the repository at this point in the history
…zelbuild#457)

* Also name the BUILD file in external repository roots BUILD.bazel

* Don't put empty BUILD.bazel into package-specific external repos
  • Loading branch information
person142 authored Apr 18, 2021
1 parent 37f04a4 commit 04c6d7f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/pip_install/pip_repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ def _construct_pypath(rctx):
rctx: Handle to the repository_context.
Returns: String of the PYTHONPATH.
"""
rctx.file("BUILD", "")

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

# We need a BUILD file to load the generated requirements.bzl
rctx.file("BUILD.bazel", "")

pypath = _construct_pypath(rctx)

if rctx.attr.incremental:
Expand Down

0 comments on commit 04c6d7f

Please sign in to comment.