You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: update compile_pip_requirements to support multiple input files (#1067)
`pip-compile` can compile multiple input files into a single output
file, but `rules_python`'s `compile_pip_requirements` doesn't currently
support this.
With this change, the `requirements_in` argument to
`compile_pip_requirements` can now accept a list of strings (in addition
to the previously accepted argument types).
In order to support a variable number of input files, my coworker
(@lpulley) and I updated `dependency_resolver.py` to use the `click` CLI
library. We felt this was acceptable since `pip-compile` already
requires `click` to run, so we're not adding a new dependency.
We also made changes to the script to avoid mutating `sys.argv`, instead
opting to build a new list (`argv`) from scratch that'll be passed to
the `pip-compile` CLI. While subjective, I feel this improves
readability, since it's not immediately obvious what's in `sys.argv`,
but it's clear that `argv` begins empty, and is added to over the course
of the program's execution.
---------
Co-authored-by: Logan Pulley <[email protected]>
Co-authored-by: Ignas Anikevicius <[email protected]>
Co-authored-by: Richard Levasseur <[email protected]>
0 commit comments