| commit | f84640bec471629c25d76052ed858eb3c0dd3a14 | [log] [tgz] |
|---|---|---|
| author | Richard Levasseur <richardlev@gmail.com> | Sat Oct 11 02:35:48 2025 -0700 |
| committer | GitHub <noreply@github.com> | Sat Oct 11 09:35:48 2025 +0000 |
| tree | 7edf9c38c53b797d03a2db6b846749408ac76ebb | |
| parent | a2f14eb4f7349bd18530d8057e96f093570fd103 [diff] |
fix(venv): symlink shared libraries directly (#3331) It seems `$ORIGIN` resolves prior to symlink resolution. This makes it resolve differently depending on if the directory or file itself is symlinked. To fix, special case shared libraries and have them symlinked directly. Since an explicit file is the target, `VenvSymlinkEntry.link_to_file` is added to hold the File object that will be linked to. An unfortunate side-effect of this logic is any package with `lib*.so` files will be more expensive to build (depset flattened at analysis time, more files symlinked), but it beats not working at all. Optimizing that can be done in another change. Tests added to generate libraries that look like what something from PyPI does. Manually verified a case using jax and jax plugins. Fixes https://github.com/bazel-contrib/rules_python/issues/3228
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.