Merge "Create python_runtime_pair and Python toolchain rules"
diff --git a/BUILD.bazel b/BUILD.bazel
index 3b2a41e..884e82a 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -1,3 +1,5 @@
+load("@bazel_tools//tools/python:toolchain.bzl", "py_runtime_pair")
+
 package(default_visibility = ["//visibility:public"])
 
 [filegroup(
@@ -9,12 +11,28 @@
     ]),
 ) for platform in ("linux-x86", "darwin")]
 
+py_runtime(
+    name = "python2",
+    files = ["linux-x86/bin/py2-cmd"],
+    interpreter = "linux-x86/bin/py2-cmd",
+    python_version = "PY2",
+)
 
-# TODO(b/199038020): Temporary solution. Use py_runtime_pair and
-# python_toolchain as soon as Python rules are checked-in.
 py_runtime(
     name = "python3",
     files = ["linux-x86/bin/py3-cmd"],
     interpreter = "linux-x86/bin/py3-cmd",
     python_version = "PY3",
 )
+
+py_runtime_pair(
+    name = "py_runtime_pair",
+    py2_runtime = ":python2",
+    py3_runtime = ":python3",
+)
+
+toolchain(
+    name = "py_toolchain",
+    toolchain = ":py_runtime_pair",
+    toolchain_type = "@bazel_tools//tools/python:toolchain_type",
+)