//python/api:executables.bzl

Loading-phase APIs specific to executables (binaries/tests).

Added in version 1.3.0.

executables.executable_rule_builder(implementation, **kwargs)

Create a rule builder for an executable Python program.

Important

Public, but volatile, API. Some parts are stable, while others are implementation details and may change more frequently.

An executable rule is one that sets either executable=True or test=True, and the output is something that can be run directly (e.g. bazel run, exec(...) etc)

Added in version 1.3.0.

Args:
Returns:

ruleb.Rule with the necessary settings for creating an executable Python rule.

executables.py_binary_rule_builder()

Create a rule builder for a py_binary.

Important

Public, but volatile, API. Some parts are stable, while others are implementation details and may change more frequently.

Added in version 1.3.0.

Returns:

ruleb.Rule with the necessary settings for creating a py_binary rule.

executables.py_test_rule_builder()

Create a rule builder for a py_test.

Important

Public, but volatile, API. Some parts are stable, while others are implementation details and may change more frequently.

Added in version 1.3.0.

Returns:

ruleb.Rule with the necessary settings for creating a py_test rule.