Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Mark internal and python extension as reproducible #1892

Merged
merged 5 commits into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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")
fmeum marked this conversation as resolved.
Show resolved Hide resolved
bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "platforms", version = "0.0.4")

Expand All @@ -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",
Expand Down
13 changes: 5 additions & 8 deletions python/private/bzlmod/internal_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
)
Loading