Add exports_files declaration for some .bzl's in @bazel_tools This is needed so rules_python can run stardoc on .bzl files that depend on or mirror parts of these @bazel_tools files. See bazelbuild/rules_python#213. RELNOTES: None PiperOrigin-RevId: 260496745
diff --git a/tools/python/BUILD.tools b/tools/python/BUILD.tools index d53871b..f790237 100644 --- a/tools/python/BUILD.tools +++ b/tools/python/BUILD.tools
@@ -31,6 +31,19 @@ is_executable = True, ) +# These exports are needed for Starlark tooling to work on files that +# transitive load these ones. Ideally they would be bzl_library targets, but we +# don't have access to Skylib here. See +# https://github.com/bazelbuild/skydoc/issues/166. +exports_files([ + "python_version.bzl", + "srcs_version.bzl", + "toolchain.bzl", + "utils.bzl", + # write_file.bzl fortunately doesn't need to be exposed because it's only + # used in this BUILD file. +]) + # This target can be used to inspect the current Python major version. To use, # put it in the `flag_values` attribute of a `config_setting` and test it # against the values "PY2" or "PY3". It will always match one or the other.