1licenses(["restricted"]) 2 3package(default_visibility = ["//visibility:public"]) 4 5# Point both runtimes to the same python binary to ensure we always 6# use the python binary specified by ./configure.py script. 7load("@bazel_tools//tools/python:toolchain.bzl", "py_runtime_pair") 8 9py_runtime( 10 name = "py2_runtime", 11 interpreter_path = "%{PYTHON_BIN_PATH}", 12 python_version = "PY2", 13) 14 15py_runtime( 16 name = "py3_runtime", 17 interpreter_path = "%{PYTHON_BIN_PATH}", 18 python_version = "PY3", 19) 20 21py_runtime_pair( 22 name = "py_runtime_pair", 23 py2_runtime = ":py2_runtime", 24 py3_runtime = ":py3_runtime", 25) 26 27toolchain( 28 name = "py_toolchain", 29 toolchain = ":py_runtime_pair", 30 toolchain_type = "@bazel_tools//tools/python:toolchain_type", 31) 32