Skip to content

Commit

Permalink
Move rules_pkg_lib to //pkg
Browse files Browse the repository at this point in the history
... 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 <[email protected]>
  • Loading branch information
HONG Yifan committed Oct 1, 2024
1 parent 1c0b6dd commit 6929bf6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
10 changes: 2 additions & 8 deletions doc_build/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ How to:
git commit -m 'update docs' docs/latest.md
"""

load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@rules_python//python:defs.bzl", "py_binary")
load("@stardoc//stardoc:stardoc.bzl", "stardoc")
load("//:version.bzl", "version")
Expand Down Expand Up @@ -111,14 +110,9 @@ stardoc(
],
)

# gather all rules that should be documented
bzl_library(
alias(
name = "rules_pkg_lib",
srcs = [
"//:version.bzl",
"//pkg:bzl_srcs",
"@bazel_skylib//lib:paths",
],
actual = "//pkg:rules_pkg_lib",
visibility = ["//visibility:public"],
)

Expand Down
13 changes: 13 additions & 0 deletions pkg/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

# -*- coding: utf-8 -*-
Expand Down Expand Up @@ -65,6 +66,18 @@ starlark_library(
visibility = ["//visibility:public"],
)

# gather all rules that should be documented
bzl_library(
name = "rules_pkg_lib",
srcs = [
"//:version.bzl",
"//pkg:bzl_srcs",
"@bazel_skylib//lib:paths",
"@rules_python//python:defs_bzl",
],
visibility = ["//visibility:public"],
)

# Used by pkg_rpm in rpm.bzl.
py_binary(
name = "make_rpm",
Expand Down

0 comments on commit 6929bf6

Please sign in to comment.