commit | 677fb53a16d65082729be927dafd3a45fafa04c5 | [log] [tgz] |
---|---|---|
author | Nikolaus Wittenstein <nikolaus.wittenstein@gmail.com> | Wed Feb 07 23:49:53 2024 -0800 |
committer | GitHub <noreply@github.com> | Thu Feb 08 07:49:53 2024 +0000 |
tree | d781a9590e69a731f408191b96c1c4445a29eb16 | |
parent | 74d576f7a2c9435a18b4b2bf663537d8e1a2c047 [diff] |
feat(gazelle): Remove integrity field from Gazelle manifest (#1666) As per the discussion in #1465 and in this PR, this PR does the following: - Make the `requirements` parameter to the `gazelle_python_manifest` macro optional. - If `requirements` is not provided, no integrity field is added to the manifest, and `diff_test` is used to see if the manifest is stale instead of the existing `go_test` that just checks the integrity. - Migrates `go_binary` to `genrule` to generate the manifest file that can be used with `diff_test`. (There's still a `go_binary` under the hood, but the manifest macro itself uses a genrule now rather than a wrapper `go_binary`.) - It does not migrate the manifest generator from Go to Python; hopefully that can be deferred to another PR. A custom `copy_to_source.sh` script is included, which is used to update the manifest in the source tree. Compatibility discussion: - The update and test target names have not changed; they are still `//:gazelle_python_manifest.update` and `//:gazelle_python_manifest.test`.
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.