Skip to content

Commit

Permalink
docs: clarify that the runtime env toolchains don't provide build info (
Browse files Browse the repository at this point in the history
#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.
  • Loading branch information
rickeylev authored Oct 9, 2024
1 parent ca0b27a commit af3516e
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions docs/api/rules_python/python/runtime_env_toolchains/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@

::::{target} all

A set of toolchains that invoke `python3` from the runtime environment.

Note that this toolchain provides no build-time information, which makes it of
limited utility. This is because the invocation of `python3` is done when a
program is run, not at build time.
A set of toolchains that invoke `python3` from the runtime environment (i.e
after building).

:::{note}
These toolchains do not provide any build-time information, including but not
limited to the Python version or C headers. As such, they cannot be used
for e.g. precompiling, building Python C extension modules, or anything else
that requires information about the Python runtime at build time. Under the
hood, these simply create a fake "interpreter" that calls `python3` that
built programs use to run themselves.
:::

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

0 comments on commit af3516e

Please sign in to comment.