Provide current_py_toolchain (#731)
This commit introduces the current_py_toolchain rule, exposing the
PYTHON2 and PYTHON3 "make" variables in bazel rules, analagous to
@bazel_tools//tools/cpp:current_cc_toolchain.
See
https://docs.bazel.build/versions/main/be/make-variables.html#custom_variables
Co-authored-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>
diff --git a/python/BUILD b/python/BUILD
index 05cc9d1..ce19653 100644
--- a/python/BUILD
+++ b/python/BUILD
@@ -24,6 +24,8 @@
that @rules_python//python is only concerned with the core rules.
"""
+load(":defs.bzl", "current_py_toolchain")
+
package(default_visibility = ["//visibility:public"])
licenses(["notice"]) # Apache 2.0
@@ -138,3 +140,7 @@
"packaging.bzl",
"pip.bzl",
])
+
+current_py_toolchain(
+ name = "current_py_toolchain",
+)