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):
49
49
50
50
return args
51
51
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
+
52
59
def _pip_repository_impl (rctx ):
53
60
python_interpreter = rctx .attr .python_interpreter
54
61
if rctx .attr .python_interpreter_target != None :
@@ -64,7 +71,7 @@ def _pip_repository_impl(rctx):
64
71
fail ("Incremental mode requires a requirements_lock attribute be specified." )
65
72
66
73
# We need a BUILD file to load the generated requirements.bzl
67
- rctx .file ("BUILD.bazel" , "" )
74
+ rctx .file ("BUILD.bazel" , _BUILD_FILE_CONTENTS )
68
75
69
76
pypath = _construct_pypath (rctx )
70
77
You can’t perform that action at this time.
0 commit comments