|
1 | 1 | # Python Rules for Bazel
|
2 | 2 |
|
3 |
| -rules_python is the home of the core Python rules -- `py_library`, |
4 |
| -`py_binary`, `py_test`, `py_proto_library`, and related symbols that provide the basis for Python |
5 |
| -support in Bazel. It also contains package installation rules for integrating with PyPI and other indices. |
| 3 | +`rules_python` is the home for 4 major components: |
| 4 | +* the core Python rules -- `py_library`, `py_binary`, `py_test`, |
| 5 | + `py_proto_library`, and related symbols that provide the basis for Python |
| 6 | + support in Bazel. |
| 7 | + |
| 8 | + This is subject to our breaking change policy outlined in the <support>. |
| 9 | +* Package installation rules for integrating with PyPI and other SimpleAPI |
| 10 | + complying indexes. |
| 11 | + |
| 12 | + This is still `experimental` and the APIs might change more often than the |
| 13 | + core rules or you may experience regressions between the minor releases. In |
| 14 | + that case, please raise tickets to the GH issues bug tracker. |
| 15 | +* `sphinxdocs` rules allowing users to generate documentation from bazel or |
| 16 | + Python source code. |
| 17 | + |
| 18 | + This is available as is and without any guarantees. The semantic versioning |
| 19 | + used by `rules_python` does not apply to bazel rules or the output. |
| 20 | +* `gazelle` plugin for generating `BUILD.bazel` files based on Python source |
| 21 | + code. |
| 22 | + |
| 23 | + This is available as is and without any guarantees. The semantic versioning |
| 24 | + used by `rules_python` does not apply to the plugin. |
6 | 25 |
|
7 | 26 | Documentation for rules_python lives here and in the
|
8 | 27 | [Bazel Build Encyclopedia](https://docs.bazel.build/versions/master/be/python.html).
|
9 | 28 |
|
10 | 29 | Examples are in the {gh-path}`examples` directory.
|
11 | 30 |
|
12 |
| -Currently, the core rules build into the Bazel binary, and the symbols in this |
13 |
| -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. See |
14 |
| -{ref}`Migrating from the Bundled Rules` below. |
| 31 | +When using bazel 6, the core rules built into the Bazel binary, and the symbols |
| 32 | +in this repository are simple aliases. However, on bazel 7 and above starlark |
| 33 | +implementation in this repository is used. |
| 34 | +See {ref}`Migrating from the Bundled Rules` below. |
15 | 35 |
|
16 | 36 | The core rules are stable. Their implementation in Bazel is subject to Bazel's
|
17 | 37 | [backward compatibility policy](https://docs.bazel.build/versions/master/backward-compatibility.html).
|
18 | 38 | Once migrated to rules_python, they may evolve at a different
|
19 | 39 | rate, but this repository will still follow [semantic versioning](https://semver.org).
|
20 | 40 |
|
21 |
| -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 |
22 |
| -{gh-path}`How to contribute <CONTRIBUTING.md>` for information on our development workflow. |
| 41 | +The Bazel community maintains this repository. Neither Google nor the Bazel |
| 42 | +team provides support for the code. However, this repository is part of the |
| 43 | +test suite used to vet new Bazel releases. See {gh-path}`How to contribute |
| 44 | +<CONTRIBUTING.md>` for information on our development workflow. |
23 | 45 |
|
24 | 46 | ## Bzlmod support
|
25 | 47 |
|
26 |
| -- Status: Beta |
27 |
| -- Full Feature Parity: No |
| 48 | +- Status: GA |
28 | 49 |
|
29 |
| -See {gh-path}`Bzlmod support <BZLMOD_SUPPORT.md>` for more details |
| 50 | +See {gh-path}`Bzlmod support <BZLMOD_SUPPORT.md>` for any behaviour differences between |
| 51 | +`bzlmod` and `WORKSPACE`. |
30 | 52 |
|
31 | 53 | ## Migrating from the bundled rules
|
32 | 54 |
|
|
0 commit comments