//python/cc:py_cc_toolchain.bzl

Implementation of py_cc_toolchain rule.

NOTE: This is a beta-quality feature. APIs subject to change until https://github.com/bazelbuild/rules_python/issues/824 is considered done.

py_cc_toolchain

py_cc_toolchain(name, headers, libs, python_version)

A toolchain for a Python runtime’s C/C++ information (e.g. headers)

This rule carries information about the C/C++ side of a Python runtime, e.g. headers, shared libraries, etc.

Provides: no providers advertised.

ATTRIBUTES

name:

(required Name) A unique name for this target.

headers:

(required label) Target that provides the Python headers. Typically this is a cc_library target.

Required providers: CcInfo

libs:

(required label) Target that provides the Python runtime libraries for linking. Typically this is a cc_library target of .so files.

Required providers: CcInfo

python_version:

(required string) The Major.minor Python version, e.g. 3.11