Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions python/private/python.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ load(":full_version.bzl", "full_version")
load(":python_register_toolchains.bzl", "python_register_toolchains")
load(":pythons_hub.bzl", "hub_repo")
load(":repo_utils.bzl", "repo_utils")
load(":toolchains_repo.bzl", "host_toolchain", "multi_toolchain_aliases", "sorted_host_platforms")
load(":toolchains_repo.bzl", "host_compatible_python_repo", "multi_toolchain_aliases", "sorted_host_platforms")
load(":util.bzl", "IS_BAZEL_6_4_OR_HIGHER")
load(":version.bzl", "version")

Expand Down Expand Up @@ -321,7 +321,7 @@ def _python_impl(module_ctx):
host_platforms[platform_name] = platform_info

host_platforms = sorted_host_platforms(host_platforms)
host_toolchain(
host_compatible_python_repo(
name = toolchain_info.name + "_host",
# NOTE: Order matters. The first found to be compatible is (usually) used.
platforms = host_platforms.keys(),
Expand Down
4 changes: 2 additions & 2 deletions python/private/python_register_toolchains.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ load(":full_version.bzl", "full_version")
load(":python_repository.bzl", "python_repository")
load(
":toolchains_repo.bzl",
"host_toolchain",
"host_compatible_python_repo",
"toolchain_aliases",
"toolchains_repo",
)
Expand Down Expand Up @@ -185,7 +185,7 @@ def python_register_toolchains(
impl_repos = impl_repos,
)

host_toolchain(
host_compatible_python_repo(
name = name + "_host",
platforms = loaded_platforms,
python_version = python_version,
Expand Down
4 changes: 2 additions & 2 deletions python/private/toolchains_repo.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def _host_toolchain_impl(rctx):

# NOTE: The term "toolchain" is a misnomer for this rule. This doesn't define
# a repo with toolchains or toolchain implementations.
host_toolchain = repository_rule(
host_compatible_python_repo = repository_rule(
_host_toolchain_impl,
doc = """\
Creates a repository with a shorter name meant to be used in the repository_ctx,
Expand All @@ -400,7 +400,7 @@ If set, overrides the platform metadata. Keyed by index in `platforms`
),
"platforms": attr.string_list(mandatory = True),
"python_version": attr.string(mandatory = True),
"_rule_name": attr.string(default = "host_toolchain"),
"_rule_name": attr.string(default = "host_compatible_python_repo"),
"_rules_python_workspace": attr.label(default = Label("//:WORKSPACE")),
},
)
Expand Down