Skip to content

Commit 148122a

Browse files
authored
docs: document py_cc_toolchain and py_runtime_pair (bazel-contrib#2196)
Their doc targets weren't included in the main docs deps list, so they weren't showing up. Also xref from the py_runtime_pair macro to the underlying rule.
1 parent 118573b commit 148122a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docs/BUILD.bazel

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ sphinx_docs(
7272
deps = [
7373
":bzl_api_docs",
7474
":py_api_srcs",
75+
":py_cc_toolchain",
76+
":py_runtime_pair",
7577
"//sphinxdocs/docs:docs_lib",
7678
],
7779
)
@@ -123,8 +125,7 @@ sphinx_stardoc(
123125
sphinx_stardoc(
124126
name = "py_runtime_pair",
125127
src = "//python/private:py_runtime_pair_rule_bzl",
126-
prefix = "api/rules_python",
127-
public_load_path = "//python:py_runtime_pair.bzl",
128+
prefix = "api/rules_python/",
128129
tags = ["docs"],
129130
target_compatible_with = _TARGET_COMPATIBLE_WITH,
130131
)

python/py_runtime_pair.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ _py_runtime_pair = _starlark_impl if IS_BAZEL_6_OR_HIGHER else _bazel_tools_impl
2525
def py_runtime_pair(name, py2_runtime = None, py3_runtime = None, **attrs):
2626
"""A toolchain rule for Python.
2727
28+
This is a macro around the underlying {rule}`py_runtime_pair` rule.
29+
2830
This used to wrap up to two Python runtimes, one for Python 2 and one for Python 3.
2931
However, Python 2 is no longer supported, so it now only wraps a single Python 3
3032
runtime.

0 commit comments

Comments
 (0)