commit | 67126e8f32feb8d9f8ca48c1317dd340da827e5c | [log] [tgz] |
---|---|---|
author | Richard Levasseur <rlevasseur@google.com> | Wed Dec 20 23:27:48 2023 -0800 |
committer | GitHub <noreply@github.com> | Thu Dec 21 07:27:48 2023 +0000 |
tree | 19bf4beee21efac72301711cd518609ac3d1ba72 | |
parent | 2cbdc1b57bb7591577fbf406d499ce403af067a6 [diff] |
chore: enable bzlmod by default (for Bazel 6) (#1632) This enables bzlmod by default so that, by default, builds are using it for both Bazel 6 and Bazel 7. This exposed some gaps in our test coverage, so some new jobs are created to cover minimum bzlmod and workspace versions. Basically, our CI config used mostly workspace builds, while Bazel's downstream testing used bzlmod builds. Changing our config to default to bzlmod means we lost most workspace build coverage. Unfortunately, adding these new jobs goes over the CI job limit, so I consolidated tests a bit: * The py_proto_library example for bzlmod is moved under the bzlmod example. This saves about 6 jobs * Change some tests with both (Bazel 7, workspace) and (Bazel 6, workspace) to have just one of the two. This saves about 4 jobs. Many jobs still test both, so coverage should still be sufficient. Also some various cleanups: * Deletes the last bazel-in-bazel integration test using our old, private, fork of bazel_integration_test. It hasn't been running in a long time and is broken. * Renames the CI jobs to have shorter names.
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.