Skip to main content
Version: 0.1.x

py_binary

Implementation for the py_binary and py_test rules.

Rules

py_binary

Example usage (generated):

load("@aspect_rules_py//py/private:py_binary.bzl", "py_binary")

py_binary(
# A unique name for this target.
name = "",
main = "",
)

name

Required name.

A unique name for this target.

data

Optional list of labels. Default: []

deps

Optional list of labels. Default: []

[Must provide PyInfo][Must provide `PyWheelInfo`]

env

Optional dictionary: String → String. Default: {}

imports

Optional list of strings. Default: []

main

Required label.

srcs

Optional list of labels. Default: []

py_test

Example usage (generated):

load("@aspect_rules_py//py/private:py_binary.bzl", "py_test")

py_test(
# A unique name for this target.
name = "",
main = "",
)

name

Required name.

A unique name for this target.

data

Optional list of labels. Default: []

deps

Optional list of labels. Default: []

[Must provide PyInfo][Must provide `PyWheelInfo`]

env

Optional dictionary: String → String. Default: {}

imports

Optional list of strings. Default: []

main

Required label.

srcs

Optional list of labels. Default: []

Macros and Functions

py_base.implementation

Example usage (generated):

load("@aspect_rules_py//py/private:py_binary.bzl", "py_base")

py_base.implementation(
ctx = None,
)

ctx

Required.