Skip to content

Commit fe1d9a7

Browse files
authored
doc: clarify the precompile attribute affects the local target (bazel-contrib#2179)
Also mention the pyc_collection attribute and precompiling guide to better guide users on how to use precompiling and use binary-level opt-in.
1 parent 076fbc7 commit fe1d9a7

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

python/private/common/attributes.bzl

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,7 @@ attribute.
278278
),
279279
"precompile": attr.string(
280280
doc = """
281-
Whether py source files should be precompiled.
282-
283-
See also: {flag}`--precompile` flag, which can override this attribute in some cases.
281+
Whether py source files **for this target** should be precompiled.
284282
285283
Values:
286284
@@ -291,6 +289,15 @@ Values:
291289
* `disabled`: Don't compile Python source files at build time.
292290
* `if_generated_source`: Compile Python source files, but only if they're a
293291
generated file.
292+
293+
:::{seealso}
294+
295+
* The {flag}`--precompile` flag, which can override this attribute in some cases
296+
and will affect all targets when building.
297+
* The {obj}`pyc_collection` attribute for transitively enabling precompiling on
298+
a per-target basis.
299+
* The [Precompiling](precompiling) docs for a guide about using precompiling.
300+
:::
294301
""",
295302
default = PrecompileAttr.INHERIT,
296303
values = sorted(PrecompileAttr.__members__.values()),

0 commit comments

Comments
 (0)