Skip to content

Commit 7897da8

Browse files
committed
fix visibility
1 parent 752b3b0 commit 7897da8

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

python/private/pypi/BUILD.bazel

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ exports_files(
2323
visibility = ["//visibility:public"],
2424
)
2525

26+
exports_files(
27+
srcs = ["deps.bzl"],
28+
visibility = ["//tools/private/update_deps:__pkg__"],
29+
)
30+
2631
filegroup(
2732
name = "distribution",
2833
srcs = glob(

python/private/pypi/generate_whl_library_build_bazel.bzl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,18 @@ def generate_whl_library_build_bazel(
100100
])
101101

102102
additional_content = []
103+
entry_points = kwargs.get("entry_points")
104+
if entry_points:
105+
entry_point_files = sorted({
106+
entry_point_script.replace("\\", "/"): True
107+
for entry_point_script in entry_points.values()
108+
}.keys())
109+
additional_content.append(
110+
"exports_files(\n" +
111+
" srcs = {},\n".format(render.list(entry_point_files)) +
112+
" visibility = [\"//visibility:public\"],\n" +
113+
")\n",
114+
)
103115
if annotation:
104116
kwargs["data"] = annotation.data
105117
kwargs["copy_files"] = annotation.copy_files

0 commit comments

Comments
 (0)