diff --git a/MODULE.bazel b/MODULE.bazel index 2c325a6ef8..d362104891 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -5,7 +5,7 @@ module( ) bazel_dep(name = "bazel_features", version = "1.9.1") -bazel_dep(name = "bazel_skylib", version = "1.3.0") +bazel_dep(name = "bazel_skylib", version = "1.6.1") bazel_dep(name = "rules_cc", version = "0.0.9") bazel_dep(name = "platforms", version = "0.0.4") @@ -14,7 +14,6 @@ bazel_dep(name = "rules_proto", version = "6.0.0-rc1") bazel_dep(name = "protobuf", version = "21.7", repo_name = "com_google_protobuf") internal_deps = use_extension("//python/private/bzlmod:internal_deps.bzl", "internal_deps") -internal_deps.install() use_repo( internal_deps, "rules_python_internal", diff --git a/python/private/bzlmod/internal_deps.bzl b/python/private/bzlmod/internal_deps.bzl index aadf2cc997..62ca71fecc 100644 --- a/python/private/bzlmod/internal_deps.bzl +++ b/python/private/bzlmod/internal_deps.bzl @@ -8,18 +8,15 @@ "Python toolchain module extension for internal rule use" +load("@bazel_skylib//lib:modules.bzl", "modules") load("//python/pip_install:repositories.bzl", "pip_install_dependencies") load("//python/private:internal_config_repo.bzl", "internal_config_repo") -# buildifier: disable=unused-variable -def _internal_deps_impl(module_ctx): +def _internal_deps(): internal_config_repo(name = "rules_python_internal") pip_install_dependencies() -internal_deps = module_extension( - doc = "This extension to register internal rules_python dependecies.", - implementation = _internal_deps_impl, - tag_classes = { - "install": tag_class(attrs = dict()), - }, +internal_deps = modules.as_extension( + _internal_deps, + doc = "This extension registers internal rules_python dependencies.", )