Skip to content

Commit c9ea2e0

Browse files
committed
add docs
1 parent 0636221 commit c9ea2e0

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

docs/sphinx/pip.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,19 @@ For example:
8585
},
8686
# For the list of standard platforms that the rules_python has toolchains for, default to
8787
# the following requirements file.
88-
"requirements_lock" = "requirements_lock.txt",
88+
requirements_lock = "requirements_lock.txt",
8989
```
9090

91+
In case of duplicate platforms, `rules_python` will raise an error as there has
92+
to be unambiguous mapping of the requirement files to the (os, arch) tuples.
93+
9194
An alternative way is to use per-OS requirement attributes.
9295
```starlark
9396
# ...
97+
requirements_windows = "requirements_windows.txt",
9498
requirements_darwin = "requirements_darwin.txt",
95-
# For the list of standard platforms that the rules_python has toolchains for, default to
96-
# the following requirements file.
97-
"requirements_lock" = "requirements_lock.txt",
99+
# For the remaining platforms (which is basically only linux OS), use this file.
100+
requirements_lock = "requirements_lock.txt",
98101
)
99102
```
100103

0 commit comments

Comments
 (0)