Skip to content

Commit

Permalink
python: Remove unused function py_executable_macro
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 509925028
Change-Id: Ia401371745684afbc142463b7299b5fa5dbe8ea1
  • Loading branch information
tkoeppe authored and copybara-github committed Feb 15, 2023
1 parent 93df534 commit 3862dac
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/main/starlark/builtins_bzl/common/python/py_executable.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ load(
"create_py_info",
"csv",
"filter_to_py_srcs",
"is_bool",
"union_attrs",
)
load(
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 3862dac

Please sign in to comment.