use common python toolchain

Bug: 291553072
Test: ./tools/bazel run //lk:qemu_riscv64_dist
Change-Id: I2a3f2948769db8fa3cf196c6350c980b9c1f33fd
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
diff --git a/BUILD b/BUILD
index ed186ce..19b7862 100644
--- a/BUILD
+++ b/BUILD
@@ -1,7 +1,7 @@
-load("@bazel_tools//tools/python:toolchain.bzl", "py_runtime_pair")
 load("//build/bazel_common_rules/dist:dist.bzl", "copy_to_dist_dir")
 
-clang = "prebuilts/clang/host/linux-x86/clang-r498229b"
+# TODO: import clang as a toolchain
+clang = "prebuilts/clang/host/linux-x86/clang-r522817"
 
 make = "./prebuilts/build-tools/linux-x86/bin/make"
 
@@ -87,16 +87,3 @@
     dist_dir = "out/lk/dist",
     flat = True,
 )
-
-# Use SWIG enabled Python
-py_runtime_pair(
-    name = "py_runtime_pair",
-    py2_runtime = "//prebuilts/build-tools:python2",
-    py3_runtime = "//{toolchain}:python3".format(toolchain = clang),
-)
-
-toolchain(
-    name = "py_toolchain",
-    toolchain = ":py_runtime_pair",
-    toolchain_type = "@bazel_tools//tools/python:toolchain_type",
-)
diff --git a/bazel.WORKSPACE b/bazel.WORKSPACE
index 8b5fb58..c2cea66 100644
--- a/bazel.WORKSPACE
+++ b/bazel.WORKSPACE
@@ -1,5 +1 @@
-# Call this before define_kleaf_workspace so we
-# always prefer the u-boot py_toolchain.
-# As a side effect, all u-boot targets, including those that do not need
-# this special python, will use this special python.
-register_toolchains("//lk:py_toolchain")
\ No newline at end of file
+register_toolchains("//prebuilts/build-tools:py_toolchain")
\ No newline at end of file