From 9a3aab0d4c9f57b140ce3b8ce054d717bd5837cd Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Tue, 28 May 2024 17:41:39 -0700 Subject: [PATCH] docs: document the current_py_cc_headers and libraries targets This come from the recent slack thread where someone was trying to figure out how to get at the runtime's headers. --- docs/sphinx/api/python/cc/index.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 docs/sphinx/api/python/cc/index.md diff --git a/docs/sphinx/api/python/cc/index.md b/docs/sphinx/api/python/cc/index.md new file mode 100644 index 0000000000..acaaf4f687 --- /dev/null +++ b/docs/sphinx/api/python/cc/index.md @@ -0,0 +1,27 @@ +:::{bzl:currentfile} //python/cc:BUILD.bazel +::: +# //python/cc + +:::{bzl:target} current_py_cc_headers + +A convenience target that provides the Python headers. It uses toolchain +resolution to find the headers for the Python runtime matching the interpreter +that will be used. This basically forwards the underlying +`cc_library(name="python_headers")` target defined in the `@python_X_Y` repo. + +This target provides: + +* `CcInfo`: The C++ information about the Python headers. +::: + +:::{bzl:target} current_py_cc_libs + +A convenience target that provides the Python libraries. It uses toolchain +resolution to find the libraries for the Python runtime matching the interpreter +that will be used. This basically forwards the underlying +`cc_library(name="libpython")` target defined in the `@python_X_Y` repo. + +This target provides: + +* `CcInfo`: The C++ information about the Python libraries. +:::