Fix mappings/external repo tests (#943) * Fix mappings/external repo tests so that they work with bzlmod as of Bazel head * Fix stardoc generation
diff --git a/MODULE.bazel b/MODULE.bazel index ab6cb27..c20d98f 100644 --- a/MODULE.bazel +++ b/MODULE.bazel
@@ -23,3 +23,10 @@ "@rules_pkg_rpmbuild//:all", dev_dependency = True, ) + +local_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:local.bzl", "local_repository") + +local_repository( + name = "mappings_test_external_repo", + path = "tests/mappings/external_repo", +)
diff --git a/doc_build/BUILD b/doc_build/BUILD index ab28fe7..14db111 100644 --- a/doc_build/BUILD +++ b/doc_build/BUILD
@@ -69,7 +69,10 @@ symbol_names = [ rule, ], - deps = [":rules_pkg_lib"], + deps = [ + ":rules_pkg_lib", + "//toolchains/rpm:standard_package", + ], ) for rule, src in ORDER if src
diff --git a/pkg/BUILD b/pkg/BUILD index b3115f5..01d9994 100644 --- a/pkg/BUILD +++ b/pkg/BUILD
@@ -56,6 +56,7 @@ srcs = [ ":standard_package", "//pkg:pkg.bzl", + "//pkg:rpm_pfg.bzl", "//pkg/private:standard_package", "//pkg/private/deb:standard_package", "//pkg/private/tar:standard_package",
diff --git a/tests/mappings/external_repo/MODULE.bazel b/tests/mappings/external_repo/MODULE.bazel new file mode 100644 index 0000000..0137c38 --- /dev/null +++ b/tests/mappings/external_repo/MODULE.bazel
@@ -0,0 +1,45 @@ +# Copyright 2025 The Bazel Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module( + name = "test_external_project", + version = "0", + compatibility_level = 0, +) + +local_path_override( + module_name = "rules_pkg", + path = "../../../", +) + +bazel_dep(name = "rules_license", version = "1.0.0") +bazel_dep(name = "rules_python", version = "1.0.0") +bazel_dep(name = "bazel_skylib", version = "1.7.1") + +######################################### +# Do not update to newer versions until you need a specific new feature. + +# Only for development +#bazel_dep(name = "platforms", version = "0.0.10", dev_dependency = True) +#bazel_dep(name = "rules_cc", version = "0.0.17", dev_dependency = True) +#bazel_dep(name = "stardoc", version = "0.7.2", dev_dependency = True) +# +## Find the system rpmbuild if one is available. +#find_rpm = use_extension("//toolchains/rpm:rpmbuild_configure.bzl", "find_system_rpmbuild_bzlmod", dev_dependency = True) +#use_repo(find_rpm, "rules_pkg_rpmbuild") +# +#register_toolchains( +# "@rules_pkg_rpmbuild//:all", +# dev_dependency = True, +#)
diff --git a/toolchains/rpm/BUILD b/toolchains/rpm/BUILD index 58ec5db..ae9e615 100644 --- a/toolchains/rpm/BUILD +++ b/toolchains/rpm/BUILD
@@ -33,7 +33,10 @@ srcs = glob([ "*", ]), - visibility = ["//distro:__pkg__"], + visibility = [ + "//distro:__pkg__", + "//doc_build:__pkg__", + ], ) exports_files(