Skip to content

Commit c7e573e

Browse files
authored
feat: add public filegroups containing bzl files to allow downstream rulesets to generate docs (#443)
1 parent 7aaf762 commit c7e573e

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

BUILD

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,20 @@ filegroup(
3333
],
3434
visibility = ["//distro:__pkg__"],
3535
)
36+
37+
# Reexport of all bzl files used to allow downstream rules to generate docs
38+
# without shipping with a dependency on Skylib
39+
filegroup(
40+
name = "bzl",
41+
srcs = [
42+
"//python/pip_install:bzl",
43+
"//python:bzl",
44+
# Requires Bazel 0.29 onward for public visibility of these .bzl files.
45+
"@bazel_tools//tools/python:private/defs.bzl",
46+
"@bazel_tools//tools/python:python_version.bzl",
47+
"@bazel_tools//tools/python:srcs_version.bzl",
48+
"@bazel_tools//tools/python:toolchain.bzl",
49+
"@bazel_tools//tools/python:utils.bzl",
50+
],
51+
visibility = ["//visibility:public"],
52+
)

python/BUILD

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,20 @@ filegroup(
3838
visibility = ["//:__pkg__"],
3939
)
4040

41+
# Filegroup of bzl files that can be used by downstream rules for documentation generation
42+
# Using a filegroup rather than bzl_library to not give a transitive dependency on Skylib
43+
filegroup(
44+
name = "bzl",
45+
srcs = [
46+
"defs.bzl",
47+
"packaging.bzl",
48+
"pip.bzl",
49+
"whl.bzl",
50+
"private/reexports.bzl",
51+
],
52+
visibility = ["//:__pkg__"],
53+
)
54+
4155
# ========= Core rules =========
4256

4357
exports_files([

python/pip_install/BUILD

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ filegroup(
88
visibility = ["//:__pkg__"],
99
)
1010

11+
filegroup(
12+
name = "bzl",
13+
srcs = [
14+
"pip_repository.bzl",
15+
"repositories.bzl",
16+
],
17+
visibility = ["//:__pkg__"],
18+
)
19+
1120
exports_files(
1221
["pip_repository.bzl", "repositories.bzl"],
1322
visibility = ["//docs:__pkg__"],

0 commit comments

Comments
 (0)