File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,13 @@ def _parse_optional_attrs(rctx, args):
4949
5050 return args
5151
52+ _BUILD_FILE_CONTENTS = """\
53+ package(default_visibility = ["//visibility:public"])
54+
55+ # Ensure the `requirements.bzl` source can be accessed by stardoc, since users load() from it
56+ exports_files(["requirements.bzl"])
57+ """
58+
5259def _pip_repository_impl (rctx ):
5360 python_interpreter = rctx .attr .python_interpreter
5461 if rctx .attr .python_interpreter_target != None :
@@ -64,7 +71,7 @@ def _pip_repository_impl(rctx):
6471 fail ("Incremental mode requires a requirements_lock attribute be specified." )
6572
6673 # We need a BUILD file to load the generated requirements.bzl
67- rctx .file ("BUILD.bazel" , "" )
74+ rctx .file ("BUILD.bazel" , _BUILD_FILE_CONTENTS )
6875
6976 pypath = _construct_pypath (rctx )
7077
You can’t perform that action at this time.
0 commit comments