@@ -20,12 +20,13 @@ load("//python/pip_install:requirements.bzl", _compile_pip_requirements = "compi
2020compile_pip_requirements = _compile_pip_requirements
2121package_annotation = _package_annotation
2222
23- def pip_install (requirements , name = "pip" , ** kwargs ):
23+ def pip_install (requirements = None , name = "pip" , ** kwargs ):
2424 """Accepts a `requirements.txt` file and installs the dependencies listed within.
2525
2626 Those dependencies become available in a generated `requirements.bzl` file.
2727
28- This macro runs a repository rule that invokes `pip`. In your WORKSPACE file:
28+ This macro wraps the [`pip_repository`](./pip_repository.md) rule that invokes `pip`.
29+ In your WORKSPACE file:
2930
3031 ```python
3132 pip_install(
@@ -88,7 +89,7 @@ def pip_install(requirements, name = "pip", **kwargs):
8889 Args:
8990 requirements (Label): A 'requirements.txt' pip requirements file.
9091 name (str, optional): A unique name for the created external repository (default 'pip').
91- **kwargs (dict): Keyword arguments passed directly to the `pip_repository` repository rule.
92+ **kwargs (dict): Additional arguments to the [ `pip_repository`](./pip_repository.md) repository rule.
9293 """
9394
9495 # Just in case our dependencies weren't already fetched
@@ -107,7 +108,8 @@ def pip_parse(requirements_lock, name = "pip_parsed_deps", **kwargs):
107108 Those dependencies become available in a generated `requirements.bzl` file.
108109 You can instead check this `requirements.bzl` file into your repo, see the "vendoring" section below.
109110
110- This macro runs a repository rule that invokes `pip`. In your WORKSPACE file:
111+ This macro wraps the [`pip_repository`](./pip_repository.md) rule that invokes `pip`, with `incremental` set.
112+ In your WORKSPACE file:
111113
112114 ```python
113115 load("@rules_python//python:pip.bzl", "pip_parse")
@@ -191,10 +193,11 @@ def pip_parse(requirements_lock, name = "pip_parsed_deps", **kwargs):
191193 of 'requirements' no resolve will take place and pip_repository will create
192194 individual repositories for each of your dependencies so that wheels are
193195 fetched/built only for the targets specified by 'build/run/test'.
196+ Note that if your lockfile is platform-dependent, you can use the `requirements_[platform]`
197+ attributes.
194198 name (str, optional): The name of the generated repository. The generated repositories
195199 containing each requirement will be of the form <name>_<requirement-name>.
196- **kwargs (dict): Additional keyword arguments for the underlying
197- `pip_repository` rule.
200+ **kwargs (dict): Additional arguments to the [`pip_repository`](./pip_repository.md) repository rule.
198201 """
199202
200203 # Just in case our dependencies weren't already fetched
0 commit comments