Skip to content

Commit af3516e

Browse files
authored
docs: clarify that the runtime env toolchains don't provide build info (#2279)
This stems after some conversation with a user where they were surprised that building C extensions wasn't working when using the runtime env toolchain.
1 parent ca0b27a commit af3516e

File tree

1 file changed

+11
-5
lines changed
  • docs/api/rules_python/python/runtime_env_toolchains

1 file changed

+11
-5
lines changed

docs/api/rules_python/python/runtime_env_toolchains/index.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,17 @@
77

88
::::{target} all
99

10-
A set of toolchains that invoke `python3` from the runtime environment.
11-
12-
Note that this toolchain provides no build-time information, which makes it of
13-
limited utility. This is because the invocation of `python3` is done when a
14-
program is run, not at build time.
10+
A set of toolchains that invoke `python3` from the runtime environment (i.e
11+
after building).
12+
13+
:::{note}
14+
These toolchains do not provide any build-time information, including but not
15+
limited to the Python version or C headers. As such, they cannot be used
16+
for e.g. precompiling, building Python C extension modules, or anything else
17+
that requires information about the Python runtime at build time. Under the
18+
hood, these simply create a fake "interpreter" that calls `python3` that
19+
built programs use to run themselves.
20+
:::
1521

1622
This is only provided to aid migration off the builtin Bazel toolchain
1723
(`@bazel_tools//python:autodetecting_toolchain`), and is largely only applicable

0 commit comments

Comments
 (0)