| commit | bdb2aa2e5c0ca435918037aa3568c0b0c4c9c1ab | [log] [tgz] |
|---|---|---|
| author | Douglas Thor <dougthor42@users.noreply.github.com> | Sat Mar 16 19:28:29 2024 -0700 |
| committer | GitHub <noreply@github.com> | Sun Mar 17 02:28:29 2024 +0000 |
| tree | fcaabefc328c027348c28fb69eb567b4e999f1b6 | |
| parent | 565a531d167a6f066ff555d8831a30a38dacb74c [diff] |
feat(gazelle): Add "python_default_visibility" directive (#1787) Fixes #1783. Provides a way to fix #1682. Add the `python_default_visibility` directive. This directive sets the `visibility` attribute on all generated `py_*` rules. It accepts a comma-separated list of labels to add as visibility targets, similar to how the base `default_visibility` directive works. Setting this directive multiple times will override previous values. Two special values are also accepted: `NONE` and `DEFAULT`. See ./gazelle/README.md#directive-python_default_visibility for details. The directive also accepts a special string `"$python_root"` that gets replaced with the `python_root` value, if set. If not set, `"$python_root"` is replaced with the empty string. --------- Co-authored-by: Thulio Ferraz Assis <3149049+f0rmiga@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.
Currently, the core rules build into the Bazel binary, and the symbols in this repository are simple aliases. However, we are migrating the rules to Starlark and removing them from the Bazel binary. Therefore, the future-proof way to depend on Python rules is via this repository. SeeMigrating from the Bundled Rules below.
The core rules are stable. Their implementation in Bazel is subject to Bazel's backward compatibility policy. Once migrated to rules_python, they may evolve at a different rate, but this repository will still 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.