aboutsummaryrefslogtreecommitdiff
path: root/examples/build_file_generation/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'examples/build_file_generation/README.md')
-rw-r--r--examples/build_file_generation/README.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/build_file_generation/README.md b/examples/build_file_generation/README.md
new file mode 100644
index 0000000..cd3cd1f
--- /dev/null
+++ b/examples/build_file_generation/README.md
@@ -0,0 +1,22 @@
+# Build file generation with Gazelle
+
+This example shows a project that has Gazelle setup with the rules_python
+extension, so that targets like `py_library` and `py_binary` can be
+automatically created just by running
+
+```sh
+bazel run //:requirements.update
+bazel run //:gazelle_python_manifest.update
+bazel run //:gazelle
+```
+
+As a demo, try creating a `__main__.py` file in this directory, then
+re-run that gazelle command. You'll see that a `py_binary` target
+is created in the `BUILD` file.
+
+Or, try importing the `requests` library in `__init__.py`.
+You'll see that `deps = ["@pip//pypi__requests"]` is automatically
+added to the `py_library` target in the `BUILD` file.
+
+For more information on the behavior of the rules_python gazelle extension,
+see the README.md file in the /gazelle folder.