Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow extra dependencies to be passed to pip-compile #1026

Merged
merged 2 commits into from
Jan 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -6,6 +6,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 @@ -30,6 +31,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 @@ -83,7 +85,7 @@ def compile_pip_requirements(
requirement("importlib_metadata"),
requirement("zipp"),
requirement("more_itertools"),
]
] + extra_deps

attrs = {
"args": args,
Expand Down