diff --git a/DEPENDENCY_POLICY.md b/DEPENDENCY_POLICY.md index abefac1fe550a..9bed482b46a8b 100644 --- a/DEPENDENCY_POLICY.md +++ b/DEPENDENCY_POLICY.md @@ -58,7 +58,7 @@ Dependency declarations must: be used if no CPE for the project is available in the CPE database. CPEs should be _versionless_ with a `:*` suffix, since the version can be computed from `version`. -When build or test code references Python modules, they should be imported via `pip3_import` in +When build or test code references Python modules, they should be specified via `pip_install` in [bazel/repositories_extra.bzl](bazel/repositories_extra.bzl). Python modules should not be listed in `repository_locations.bzl` entries. `requirements.txt` files for Python dependencies must pin to exact versions, e.g. `PyYAML==5.3.1` and ideally also include a [SHA256 diff --git a/bazel/EXTERNAL_DEPS.md b/bazel/EXTERNAL_DEPS.md index 02ba28e30674a..18eb5a4a40099 100644 --- a/bazel/EXTERNAL_DEPS.md +++ b/bazel/EXTERNAL_DEPS.md @@ -59,16 +59,13 @@ to binaries, libraries, headers, etc. # Adding external dependencies to Envoy (Python) -Python dependencies should be added via `pip3` and `rules_python`. The process +Python dependencies should be added via `pip` and `rules_python`. The process is: -1. Define a `pip3_import()` pointing at your target `requirements.txt` in +1. Define a `pip_install()` pointing at your target `requirements.txt` in [`bazel/repositories_extra.bzl`](repositories_extra.bzl) -2. Add a `pip_install()` invocation in - [`bazel/dependency_imports.bzl`](dependency_imports.bzl). - -3. Add a `requirements("