| commit | 1198422c8986c10af8e9313b2570e8a4dd2dc2b1 | [log] [tgz] |
|---|---|---|
| author | Richard Levasseur <richardlev@gmail.com> | Sun Dec 14 15:27:50 2025 -0800 |
| committer | GitHub <noreply@github.com> | Sun Dec 14 23:27:50 2025 +0000 |
| tree | cfb7f02787c1a857a4af7e254b1c82abc987a400 | |
| parent | 4558ffb0c6f97044dc2fb9731454a4797e549fcf [diff] |
refactor: optimize venv building for namespace packages (#3454) When implicit namespace packages are used, it's common for multiple distributions to install into the same directory, triggering the expensive conflict merging logic. This can be observed wit our doc builds, where `sphinxcontrib` is a namespace package that 7 distributions install into. To fix, treat top-level directories that have an importable name and don't have an `__init__` looking file as implicit namespace packages and mark them as disallowed from being directly linked. The importable name check is to exclude dist-info directories. --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.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.