1load("@rules_python//python:defs.bzl", "py_library") 2 3# python_visibilty directive applies to all child bazel packages. 4# Thus, the generated file for this package will also have vis for 5# //tests:__pkg__ and //bar:baz in addition to the default. 6# gazelle:python_visibility //tests:__subpackages__ 7 8py_library( 9 name = "subdir", 10 srcs = [ 11 "__init__.py", 12 "bar.py", 13 ], 14 visibility = [ 15 "//:__subpackages__", 16 "//bar:baz", 17 "//tests:__pkg__", 18 "//tests:__subpackages__", 19 ], 20) 21