commit | 2f6ca17d79c0016d307197c4e155eb32df08a542 | [log] [tgz] |
---|---|---|
author | Richard Levasseur <rlevasseur@google.com> | Tue Nov 12 15:47:04 2024 -0800 |
committer | GitHub <noreply@github.com> | Tue Nov 12 23:47:04 2024 +0000 |
tree | 5c5dec3dd1b39e0352f0bd8d6e7e4b31c998d127 | |
parent | 1b2714e119e0cb4cf48c32b6e87978784a00460d [diff] |
fix: skip precompiling if using Bazel-builtin PyRuntimeInfo (#2394) When the `@bazel_tools//python/tools:python_autodetecting` toolchain is used, it returns the Bazel-builtin PyRuntimeInfo provider. Because this provider doesn't support the additional fields needed for precompiling (`pyc_tag`, among others), it would result in an attribute error. To fix, detect the absence of the `pyc_tag` attribute and return early, as is done when the pyc_tag field is empty. Fixes https://github.com/bazelbuild/rules_python/issues/2364
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.