Skip to content

Commit 6929bf6

Browse files
committed
Move rules_pkg_lib to //pkg
... next to the .bzl files. This is because the //doc_build package is not loadable when rules_pkg itself is not the root Bazel module, because stardoc is a dev_dependency. So, //doc_build:rules_pkg_lib is not usable by clients of rules_pkg. Move the target to //pkg, next to the .bzl files. Also add @rules_python//python:defs_bzl used by pkg_install. Link: #897 Signed-off-by: HONG Yifan <elsk@google.com>
1 parent 1c0b6dd commit 6929bf6

2 files changed

Lines changed: 15 additions & 8 deletions

File tree

doc_build/BUILD

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ How to:
1919
git commit -m 'update docs' docs/latest.md
2020
"""
2121

22-
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
2322
load("@rules_python//python:defs.bzl", "py_binary")
2423
load("@stardoc//stardoc:stardoc.bzl", "stardoc")
2524
load("//:version.bzl", "version")
@@ -111,14 +110,9 @@ stardoc(
111110
],
112111
)
113112

114-
# gather all rules that should be documented
115-
bzl_library(
113+
alias(
116114
name = "rules_pkg_lib",
117-
srcs = [
118-
"//:version.bzl",
119-
"//pkg:bzl_srcs",
120-
"@bazel_skylib//lib:paths",
121-
],
115+
actual = "//pkg:rules_pkg_lib",
122116
visibility = ["//visibility:public"],
123117
)
124118

pkg/BUILD

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
1516
load("@rules_pkg//pkg/private:make_starlark_library.bzl", "starlark_library")
1617

1718
# -*- coding: utf-8 -*-
@@ -65,6 +66,18 @@ starlark_library(
6566
visibility = ["//visibility:public"],
6667
)
6768

69+
# gather all rules that should be documented
70+
bzl_library(
71+
name = "rules_pkg_lib",
72+
srcs = [
73+
"//:version.bzl",
74+
"//pkg:bzl_srcs",
75+
"@bazel_skylib//lib:paths",
76+
"@rules_python//python:defs_bzl",
77+
],
78+
visibility = ["//visibility:public"],
79+
)
80+
6881
# Used by pkg_rpm in rpm.bzl.
6982
py_binary(
7083
name = "make_rpm",

0 commit comments

Comments
 (0)