Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aignas committed May 17, 2024
1 parent 0636221 commit c9ea2e0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docs/sphinx/pip.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,19 @@ For example:
},
# For the list of standard platforms that the rules_python has toolchains for, default to
# the following requirements file.
"requirements_lock" = "requirements_lock.txt",
requirements_lock = "requirements_lock.txt",
```

In case of duplicate platforms, `rules_python` will raise an error as there has
to be unambiguous mapping of the requirement files to the (os, arch) tuples.

An alternative way is to use per-OS requirement attributes.
```starlark
# ...
requirements_windows = "requirements_windows.txt",
requirements_darwin = "requirements_darwin.txt",
# For the list of standard platforms that the rules_python has toolchains for, default to
# the following requirements file.
"requirements_lock" = "requirements_lock.txt",
# For the remaining platforms (which is basically only linux OS), use this file.
requirements_lock = "requirements_lock.txt",
)
```

Expand Down

0 comments on commit c9ea2e0

Please sign in to comment.