| commit | e58f3962b1ebd8e089efe45c0ed3e8610cec24b1 | [log] [tgz] |
|---|---|---|
| author | Shayan Hoshyari <108962133+shayanhoshyari@users.noreply.github.com> | Mon Dec 22 12:23:20 2025 -0800 |
| committer | GitHub <noreply@github.com> | Mon Dec 22 20:23:20 2025 +0000 |
| tree | 9a4669852f3f55a51585f7446b2a6f2a6ca3b7f5 | |
| parent | 9a20fc243a23399511023d78209590f776b36e38 [diff] |
fix(venv): Fix all .so files missing when py_binary lives at //:BUILD (#3474)
When `.label.package` was "" (empty string), doing
`"{}/{}".format(ctx.label.package, bin_venv_path)` created an absolute
path,
which caused files to be ignored later, as they no longer looked to be
part
of the correct prefix. An empty package name occurs when the target is
in
`//:BUILD` with venv on.
To fix, use skylib's `paths` instead, which handles it correctly and
won't add the
`/` prefix.
Fixes https://github.com/bazel-contrib/rules_python/issues/3470
Co-authored-by: Shayan Hoshyari <hoshyari@adobe.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.