Skip to content

Commit

Permalink
Alias autodetecting_toolchain to @rules_python.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 696766762
Change-Id: I01040ac41f89d7039198a95bb85339c1e4b9f6f8
  • Loading branch information
comius authored and copybara-github committed Nov 15, 2024
1 parent 4b02c95 commit 17cc9a4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 137 deletions.
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ use_repo(remote_coverage_tools_extension, "remote_coverage_tools")

register_execution_platforms("//:default_host_platform")

register_toolchains("@bazel_tools//tools/python:autodetecting_toolchain")
register_toolchains("@rules_python//python:autodetecting_toolchain")

register_toolchains("@local_config_winsdk//:all")

Expand Down
2 changes: 1 addition & 1 deletion scripts/bootstrap/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ _BAZEL_ARGS="--spawn_strategy=standalone \
--repository_cache=derived/repository_cache \
--repo_env=BAZEL_HTTP_RULES_URLS_AS_DEFAULT_CANONICAL_ID=0 \
--extra_toolchains=//scripts/bootstrap:all \
--extra_toolchains=@bazel_tools//tools/python:autodetecting_toolchain \
--extra_toolchains=@rules_python//python:autodetecting_toolchain \
--enable_bzlmod \
--check_direct_dependencies=error \
--lockfile_mode=update \
Expand Down
4 changes: 2 additions & 2 deletions src/test/shell/bazel/bazel_determinism_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function test_determinism() {
bazel \
--output_base="${TEST_TMPDIR}/out 1" \
build \
--extra_toolchains=@bazel_tools//tools/python:autodetecting_toolchain \
--extra_toolchains=@rules_python//python:autodetecting_toolchain \
--enable_bzlmod \
--check_direct_dependencies=error \
--lockfile_mode=update \
Expand All @@ -90,7 +90,7 @@ function test_determinism() {
--install_base="${TEST_TMPDIR}/install_base2" \
--output_base="${TEST_TMPDIR}/out 2" \
build \
--extra_toolchains=@bazel_tools//tools/python:autodetecting_toolchain \
--extra_toolchains=@rules_python//python:autodetecting_toolchain \
--enable_bzlmod \
--check_direct_dependencies=error \
--lockfile_mode=update \
Expand Down
8 changes: 4 additions & 4 deletions tools/python/BUILD.tools
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
################################################################################

load(":python_version.bzl", "define_python_version_flag")
load(":define_autodetecting_toolchain.bzl", "define_autodetecting_toolchain")

package(default_visibility = ["//visibility:public"])

Expand Down Expand Up @@ -102,8 +101,9 @@ constraint_setting(name = "py3_interpreter_path")
# workspaces. Ideally you should register your own Python toolchain, which will
# supersede this one so long as its constraints match the target platform.

define_autodetecting_toolchain(
alias(
name = "autodetecting_toolchain",
pywrapper_template = "pywrapper_template.txt",
windows_config_setting = "@bazel_tools//src/conditions:windows",
actual = "@rules_python//python:autodetecting_toolchain",
deprecation = "Use @rules_python//python:autodetecting_toolchain",
)

129 changes: 0 additions & 129 deletions tools/python/define_autodetecting_toolchain.bzl

This file was deleted.

0 comments on commit 17cc9a4

Please sign in to comment.