From 385c4b15fb7b32630a436de552a200cc467f2aa5 Mon Sep 17 00:00:00 2001 From: Tim Geypens Date: Fri, 25 Nov 2022 08:44:53 +0000 Subject: [PATCH] forwards extra kwargs from py_venv to its internal targets --- venv.bzl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/venv.bzl b/venv.bzl index 6c471a0..79fda99 100644 --- a/venv.bzl +++ b/venv.bzl @@ -59,7 +59,7 @@ _py_venv_deps = rule( toolchains = [PYTHON_TOOLCHAIN_TYPE], ) -def py_venv(name, deps = None, extra_pip_commands = None): +def py_venv(name, deps = None, extra_pip_commands = None, **kwargs): deps = deps or [] extra_pip_commands = extra_pip_commands or [] @@ -71,15 +71,17 @@ def py_venv(name, deps = None, extra_pip_commands = None): deps = deps, commands = extra_pip_commands, output = out_name, + **kwargs, ) py_binary( name = name, srcs = ["@rules_pyvenv//:build_env.py"], - deps = ["@rules_pyvenv//vendor/importlib_metadata"], + deps = ["@rules_pyvenv//vendor/importlib_metadata"], data = [out_label] + deps, main = "@rules_pyvenv//:build_env.py", env = { "BUILD_ENV_INPUT": "$(location " + out_label + ")", }, + **kwargs, )