1:::{default-domain} bzl 2::: 3:::{bzl:currentfile} //python:BUILD.bazel 4::: 5 6# //python 7 8:::{bzl:target} toolchain_type 9 10Identifier for the toolchain type for the target platform. 11 12This toolchain type gives information about the runtime for the target platform. 13It is typically implemented by the {obj}`py_runtime` rule. 14 15::::{seealso} 16{any}`Custom Toolchains` for how to define custom toolchains 17:::: 18 19::: 20 21:::{bzl:target} exec_tools_toolchain_type 22 23Identifier for the toolchain type for exec tools used to build Python targets. 24 25This toolchain type gives information about tools needed to build Python targets 26at build time. It is typically implemented by the {obj}`py_exec_tools_toolchain` 27rule. 28 29::::{seealso} 30{any}`Custom Toolchains` for how to define custom toolchains 31:::: 32::: 33 34:::{bzl:target} current_py_toolchain 35 36Helper target to resolve to the consumer's current Python toolchain. This target 37provides: 38 39* {obj}`PyRuntimeInfo`: The consuming target's target toolchain information 40 41::: 42 43::::{target} autodetecting_toolchain 44 45Legacy toolchain; despite its name, it doesn't autodetect anything. 46 47:::{deprecated} 0.34.0 48 49Use {obj}`@rules_python//python/runtime_env_toolchains:all` instead. 50::: 51:::: 52 53:::{target} none 54A special target so that label attributes with default values can be set to 55`None`. 56 57Bazel interprets `None` to mean "use the default value", which 58makes it impossible to have a label attribute with a default value that is 59optional. To work around this, a target with a special provider is used; 60internally rules check for this, then treat the value as `None`. 61 62::::{versionadded} 0.36.0 63:::: 64 65::: 66