From 3862dac86f96738332f851884f472076610221e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 15 Feb 2023 14:01:31 -0800 Subject: [PATCH] python: Remove unused function py_executable_macro PiperOrigin-RevId: 509925028 Change-Id: Ia401371745684afbc142463b7299b5fa5dbe8ea1 --- .../common/python/py_executable.bzl | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/src/main/starlark/builtins_bzl/common/python/py_executable.bzl b/src/main/starlark/builtins_bzl/common/python/py_executable.bzl index 351d9627eb11fd..e3093f3eb5b522 100644 --- a/src/main/starlark/builtins_bzl/common/python/py_executable.bzl +++ b/src/main/starlark/builtins_bzl/common/python/py_executable.bzl @@ -24,7 +24,6 @@ load( "create_py_info", "csv", "filter_to_py_srcs", - "is_bool", "union_attrs", ) load( @@ -820,29 +819,6 @@ def create_base_executable_rule(*, attrs, fragments = [], **kwargs): **kwargs ) -def py_executable_macro(*, exec_rule, rule_is_test, name, paropts = [], **kwargs): - """Wrapper macro for common executable logic. - - Args: - exec_rule: rule object; the underlying rule to call. It will be passed `kwargs` among - other attributes. - name: str, the target name - rule_is_test: bool, True if `exec_rule` has test=True, False if not. - paropts: list of str; additional flags that affect par building. - **kwargs: Additional args passed to `exec_rule`. - """ - - # The Java version of tristate attributes also accept boolean. - if is_bool(kwargs.get("stamp")): - kwargs["stamp"] = 1 if kwargs["stamp"] else 0 - exec_rule( - name = name, - # Even though the binary rule doesn't generate the par, it still needs - # paropts so it can add them to the build_data.txt file. - paropts = paropts, # Google-specific - **kwargs - ) - def cc_configure_features(ctx, *, cc_toolchain, extra_features): """Configure C++ features for Python purposes.