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

doc: clarify the precompile attribute affects the local target #2179

Merged
merged 1 commit into from
Sep 5, 2024
Merged
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
13 changes: 10 additions & 3 deletions python/private/common/attributes.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,7 @@ attribute.
),
"precompile": attr.string(
doc = """
Whether py source files should be precompiled.

See also: {flag}`--precompile` flag, which can override this attribute in some cases.
Whether py source files **for this target** should be precompiled.

Values:

Expand All @@ -291,6 +289,15 @@ Values:
* `disabled`: Don't compile Python source files at build time.
* `if_generated_source`: Compile Python source files, but only if they're a
generated file.

:::{seealso}

* The {flag}`--precompile` flag, which can override this attribute in some cases
and will affect all targets when building.
* The {obj}`pyc_collection` attribute for transitively enabling precompiling on
a per-target basis.
* The [Precompiling](precompiling) docs for a guide about using precompiling.
:::
""",
default = PrecompileAttr.INHERIT,
values = sorted(PrecompileAttr.__members__.values()),
Expand Down