Skip to content

Commit

Permalink
feat: allow extra dependencies to be passed to pip-compile (#1026)
Browse files Browse the repository at this point in the history
* feat: allow extra dependencies to be passed to pip-compile

Signed-off-by: Thulio Ferraz Assis <[email protected]>

* fix: update docs

Signed-off-by: Thulio Ferraz Assis <[email protected]>

---------

Signed-off-by: Thulio Ferraz Assis <[email protected]>
  • Loading branch information
f0rmiga authored Jan 30, 2023
1 parent 018e355 commit 3fe06a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions docs/pip.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion python/pip_install/requirements.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ load("//python/pip_install:repositories.bzl", "requirement")
def compile_pip_requirements(
name,
extra_args = [],
extra_deps = [],
py_binary = _py_binary,
py_test = _py_test,
requirements_in = None,
Expand All @@ -44,6 +45,7 @@ def compile_pip_requirements(
Args:
name: base name for generated targets, typically "requirements".
extra_args: passed to pip-compile.
extra_deps: extra dependencies passed to pip-compile.
py_binary: the py_binary rule to be used.
py_test: the py_test rule to be used.
requirements_in: file expressing desired dependencies.
Expand Down Expand Up @@ -97,7 +99,7 @@ def compile_pip_requirements(
requirement("importlib_metadata"),
requirement("zipp"),
requirement("more_itertools"),
]
] + extra_deps

attrs = {
"args": args,
Expand Down

0 comments on commit 3fe06a1

Please sign in to comment.