//python/private/api:py_common_api.bzl

Implementation of py_api.

rule py_common_api(name)

Internal Rule implementing py_common API.

Attributes:
  • name(Name)

    A unique name for this target.

    mandatory

typedef PyCommonApi

The py_common API implementation.

An instance of this object is obtained using py_common.get()

PyCommonApi.merge_py_infos(transitive, direct=[])

Merge PyInfo objects into a single PyInfo.

This is a convenience wrapper around PyInfoBuilder.merge_all. For more control over merging PyInfo objects, use PyInfoBuilder.

Args:
  • transitive(list[PyInfo])

    The PyInfo objects with info considered indirectly provided by something (e.g. via its deps attribute).

  • direct(list[PyInfo]) (default [])

    The PyInfo objects that are considered directly provided by something (e.g. via the srcs attribute).

Returns:

PyInfo A PyInfo containing the merged values.

PyCommonApi.PyInfoBuilder()

Creates an instance.

Returns:

PyInfoBuilder