py_runtime_pair(name, py2_runtime, py3_runtime)A toolchain rule for Python. This wraps up to two Python runtimes, one for Python 2 and one for Python 3. The rule consuming this toolchain will choose which runtime is appropriate. Either runtime may be omitted, in which case the resulting toolchain will be unusable for building Python code using that version. Usually the wrapped runtimes are declared using the `py_runtime` rule, but any rule returning a `PyRuntimeInfo` provider may be used. This rule returns a `platform_common.ToolchainInfo` provider with the following schema: ```python platform_common.ToolchainInfo( py2_runtime =
name |
Name; required
A unique name for this target. |
py2_runtime |
Label; optional
The runtime to use for Python 2 targets. Must have `python_version` set to `PY2`. |
py3_runtime |
Label; optional
The runtime to use for Python 3 targets. Must have `python_version` set to `PY3`. |
py_binary(attrs)See the Bazel core [py_binary](https://docs.bazel.build/versions/master/be/python.html#py_binary) documentation. ### Parameters
attrs |
optional.
Rule attributes |
py_library(attrs)See the Bazel core [py_library](https://docs.bazel.build/versions/master/be/python.html#py_library) documentation. ### Parameters
attrs |
optional.
Rule attributes |
py_runtime(attrs)See the Bazel core [py_runtime](https://docs.bazel.build/versions/master/be/python.html#py_runtime) documentation. ### Parameters
attrs |
optional.
Rule attributes |
py_test(attrs)See the Bazel core [py_test](https://docs.bazel.build/versions/master/be/python.html#py_test) documentation. ### Parameters
attrs |
optional.
Rule attributes |