aboutsummaryrefslogtreecommitdiff
path: root/docs/python.md
diff options
context:
space:
mode:
authorjheaff1 <48310225+jheaff1@users.noreply.github.com>2022-06-21 23:46:03 +0100
committerGitHub <noreply@github.com>2022-06-21 15:46:03 -0700
commitc49bab360f6b0d56f58428a1ea89728a63dd8bd9 (patch)
treee6350a8cde4be6c0229df045ad9c57e234f5e89d /docs/python.md
parente223da83953bf1f552c4866f90135e516590f654 (diff)
downloadbazelbuild-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-xdocs/python.md23
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