diff options
author | jheaff1 <48310225+jheaff1@users.noreply.github.com> | 2022-06-21 23:46:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-21 15:46:03 -0700 |
commit | c49bab360f6b0d56f58428a1ea89728a63dd8bd9 (patch) | |
tree | e6350a8cde4be6c0229df045ad9c57e234f5e89d /docs/python.md | |
parent | e223da83953bf1f552c4866f90135e516590f654 (diff) | |
download | bazelbuild-rules_python-c49bab360f6b0d56f58428a1ea89728a63dd8bd9.tar.gz |
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>
Diffstat (limited to 'docs/python.md')
-rwxr-xr-x | docs/python.md | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/python.md b/docs/python.md index 2b57d25..bd14b82 100755 --- a/docs/python.md +++ b/docs/python.md @@ -1,5 +1,28 @@ <!-- Generated with Stardoc: http://skydoc.bazel.build --> +<a name="#current_py_toolchain"></a> + +## current_py_toolchain + +<pre> +current_py_toolchain(<a href="#current_py_toolchain-name">name</a>) +</pre> + + + This rule exists so that the current python toolchain can be used in the `toolchains` attribute of + other rules, such as genrule. It allows exposing a python toolchain after toolchain resolution has + happened, to a rule which expects a concrete implementation of a toolchain, rather than a + toolchain_type which could be resolved to that toolchain. + + +**ATTRIBUTES** + + +| Name | Description | Type | Mandatory | Default | +| :-------------: | :-------------: | :-------------: | :-------------: | :-------------: | +| name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | | + + <a name="#py_import"></a> ## py_import |