Re: [PATCH v8 06/13] docs: use parser_yaml extension to handle Netlink specs

Donald Hunter
2025-06-27T11:04:57Z

Mauro Carvalho Chehab <mchehab+huawei@kernel.org> writes:

> Instead of manually calling ynl_gen_rst.py, use a Sphinx extension.
> This way, no .rst files would be written to the Kernel source
> directories.
>
> We are using here a toctree with :glob: property. This way, there
> is no need to touch the netlink/specs/index.rst file every time
> a new Netlink spec is added/renamed/removed.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> Reviewed-by: Donald Hunter <donald.hunter@gmail.com>

This patch doesn't currently merge in the net-next tree because it
depends on a series in docs-next.

> diff --git a/Documentation/sphinx/parser_yaml.py b/Documentation/sphinx/parser_yaml.py
> index 585a7ec81ba0..fa2e6da17617 100755
> --- a/Documentation/sphinx/parser_yaml.py
> +++ b/Documentation/sphinx/parser_yaml.py
> @@ -18,9 +18,9 @@ from sphinx.util import logging
> from sphinx.parsers import Parser
>
> srctree = os.path.abspath(os.environ["srctree"])
> -sys.path.insert(0, os.path.join(srctree, "tools/net/ynl/pyynl"))
> +sys.path.insert(0, os.path.join(srctree, "tools/net/ynl/pyynl/lib"))
>
> -from netlink_yml_parser import YnlDocGenerator # pylint: disable=C0413
> +from doc_generator import YnlDocGenerator # pylint: disable=C0413

Please fix up patch 5 so that this diff can be dropped.