commit | f22f39c9de5ee394002d1b50d4d1f8c209c251e9 | [log] [tgz] |
---|---|---|
author | Richard Levasseur <rlevasseur@google.com> | Wed Oct 16 09:41:04 2024 -0700 |
committer | GitHub <noreply@github.com> | Wed Oct 16 16:41:04 2024 +0000 |
tree | 763be53d9d9625530caf276d7aabcfa9ff422edd | |
parent | dd5db656e3beeed739220dfc0d62e5e5bc88ff36 [diff] |
fix(precompiling): only add pyc to default outputs if precompiling explicitly enabled for target (#2307) This fixes a bug where precompiled files were *always* being added to the default outputs of a target. The intent is they are only added to a target's default outputs if the target explicitly opted into precompiling. This went unnoticed because the exec tools toolchain is still disabled by default, so the test that verifies a basic py_binary's default outputs didn't generate implicit pyc files. It was introduced when fixing the pyc collection bug. To fix, only add the pyc files deemed "required", not all the pyc files generated. Also added a test to capture this case to the precompile tests.
This repository is the home of the core Python rules -- py_library
, py_binary
, py_test
, py_proto_library
, and related symbols that provide the basis for Python support in Bazel. It also contains package installation rules for integrating with PyPI and other indices.
Documentation for rules_python is at https://rules-python.readthedocs.io and in the Bazel Build Encyclopedia.
Examples live in the examples directory.
The core rules are stable. Their implementation is subject to Bazel's backward compatibility policy. This repository aims to follow semantic versioning.
The Bazel community maintains this repository. Neither Google nor the Bazel team provides support for the code. However, this repository is part of the test suite used to vet new Bazel releases. See How to contribute page for information on our development workflow.
For detailed documentation, see https://rules-python.readthedocs.io
See Bzlmod support for more details.