Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: document the exec tools toolchain pieces #2163

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ sphinx_stardocs(
"//python:py_test_bzl",
"//python/cc:py_cc_toolchain_info_bzl",
"//python/entry_points:py_console_script_binary_bzl",
"//python/private:py_exec_tools_info_bzl",
"//python/private:py_exec_tools_toolchain_bzl",
"//python/private/common:py_binary_rule_bazel_bzl",
"//python/private/common:py_library_rule_bazel_bzl",
"//python/private/common:py_runtime_rule_bzl",
Expand Down
2 changes: 1 addition & 1 deletion docs/api/rules_python/python/config_settings/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Values:
Determines if Python source files should be compiled at build time.

:::{note}
The flag value is overridden by the target level `precompile` attribute,
The flag value is overridden by the target level {attr}`precompile` attribute,
except for the case of `force_enabled` and `forced_disabled`.
:::

Expand Down
7 changes: 7 additions & 0 deletions python/private/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,19 @@ bzl_library(
],
)

bzl_library(
name = "py_exec_tools_info_bzl",
srcs = ["py_exec_tools_info.bzl"],
)

bzl_library(
name = "py_exec_tools_toolchain_bzl",
srcs = ["py_exec_tools_toolchain.bzl"],
deps = [
":py_exec_tools_info_bzl",
":toolchain_types_bzl",
"//python/private/common:providers_bzl",
"@bazel_skylib//lib:paths",
"@bazel_skylib//rules:common_settings",
],
)
Expand Down
3 changes: 2 additions & 1 deletion python/private/common/py_executable.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,9 @@ Determines whether pyc files from dependencies should be manually included.
NOTE: This setting is only useful with {flag}`--precompile_add_to_runfiles=decided_elsewhere`.

Valid values are:
* `inherit`: Inherit the value from {flag}`--pyc_collection`.
* `include_pyc`: Add pyc files from dependencies in the binary (from
`PyInfo.transitive_pyc_files`.
{obj}`PyInfo.transitive_pyc_files`.
* `disabled`: Don't explicitly add pyc files from dependencies. Note that
pyc files may still come from dependencies if a target includes them as
part of their runfiles (such as when {obj}`--precompile_add_to_runfiles=always`
Expand Down