| commit | 1b2714e119e0cb4cf48c32b6e87978784a00460d | [log] [tgz] |
|---|---|---|
| author | Richard Levasseur <rlevasseur@google.com> | Tue Nov 12 15:25:01 2024 -0800 |
| committer | GitHub <noreply@github.com> | Tue Nov 12 23:25:01 2024 +0000 |
| tree | ca885268107d338d4f6431edb8ba4be74d7fa196 | |
| parent | 91e5751eacd5443728dba16d38d1136375c2b51a [diff] |
tests: use $(rootpaths) to get executable files paths for Bazel 8 compatibility (#2395) In Bazel 8, the singular `$(rootpath)` expansions require that the target expands to a single file. The py rules have an unfortunate legacy behavior where their default outputs are the executable and the main py file, thus causing an error. To fix, use the plural `$(rootpaths)`, then post-process the space-separated string to get just the executable portion of it. Along the way... * Add tests/integration/py_cc_toolchain_registered/bazel-* symlink to Bazel ignore. This avoids an infinite symlink expansions error and performance issues when those symlinks exist. Work towards https://github.com/bazelbuild/rules_python/issues/2378 --------- Co-authored-by: Ivo List <ilist@google.com>
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.