aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAiden Grossman <39388941+boomanaiden154@users.noreply.github.com>2023-06-02 08:26:35 -0700
committerGitHub <noreply@github.com>2023-06-02 15:26:35 +0000
commit7f6de725d99aa3dec9e2b20cfc038bdc4704cc1c (patch)
treee4f983d44e731fecf33d258316da7d70a7454c18
parent148622aa92fdd5afcaf9f153d7bb6afce713e553 (diff)
downloadbazelbuild-rules_python-7f6de725d99aa3dec9e2b20cfc038bdc4704cc1c.tar.gz
docs(compile_pip_requirements): Add note on requirements.txt VC (#1245)
The documentation is currently ambiguous on whether or not to check requirements.txt into version control. This has raised some confusion in other projects (e.g., https://github.com/google/gematria/pull/3). This makes it clear that requirements.txt files produced by this rule should be checked into version control in an easy to find place to avoid confusion.
-rw-r--r--docs/pip.md3
-rw-r--r--python/pip_install/requirements.bzl3
2 files changed, 6 insertions, 0 deletions
diff --git a/docs/pip.md b/docs/pip.md
index e4c3f21..8ad5b69 100644
--- a/docs/pip.md
+++ b/docs/pip.md
@@ -45,6 +45,9 @@ It also generates two targets for running pip-compile:
- validate with `bazel test [name]_test`
- update with `bazel run [name].update`
+If you are using a version control system, the requirements.txt generated by this rule should
+be checked into it to ensure that all developers/users have the same dependency versions.
+
**PARAMETERS**
diff --git a/python/pip_install/requirements.bzl b/python/pip_install/requirements.bzl
index 7594471..86fd408 100644
--- a/python/pip_install/requirements.bzl
+++ b/python/pip_install/requirements.bzl
@@ -42,6 +42,9 @@ def compile_pip_requirements(
- validate with `bazel test [name]_test`
- update with `bazel run [name].update`
+ If you are using a version control system, the requirements.txt generated by this rule should
+ be checked into it to ensure that all developers/users have the same dependency versions.
+
Args:
name: base name for generated targets, typically "requirements".
extra_args: passed to pip-compile.