README.md
1# Bzlmod build file generation example
2
3This example demostrates how to use `rules_python` and gazelle with `bzlmod` enabled.
4[Bzlmod](https://bazel.build/external/overview#bzlmod), the new external dependency
5subsystem, does not directly work with repo definitions. Instead, it builds a dependency
6graph from modules, runs extensions on top of the graph, and defines repos accordingly.
7
8Gazelle is setup with the `rules_python`
9extension, so that targets like `py_library` and `py_binary` can be
10automatically created just by running:
11
12```sh
13$ bazel run //:gazelle update
14```
15
16The are other targets that allow you to update the gazelle dependency management
17when you update the requirements.in file. See:
18
19```bash
20bazel run //:gazelle_python_manifest.update
21```
22
23For more information on the behavior of the `rules_python` gazelle extension,
24see the [README.md](../../gazelle/README.md) file in the /gazelle folder.
25
26This example uses a `MODULE.bazel` file that configures the bzlmod dependency
27management. See comments in the `MODULE.bazel` and `BUILD.bazel` files for more
28information.
29