Thread (32 messages) 32 messages, 2 authors, 2025-06-14

Re: [PATCH v2 05/12] tools: ynl_gen_rst.py: Split library from command line tool

From: Donald Hunter <donald.hunter@gmail.com>
Date: 2025-06-14 13:34:13
Also in: linux-doc, linux-kernel-mentees, lkml

On Fri, 13 Jun 2025 at 13:18, Mauro Carvalho Chehab
[off-list ref] wrote:
Em Fri, 13 Jun 2025 12:13:28 +0100
Donald Hunter [off-list ref] escreveu:
quoted
Mauro Carvalho Chehab [off-list ref] writes:
quoted
As we'll be using the Netlink specs parser inside a Sphinx
extension, move the library part from the command line parser.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 scripts/lib/netlink_yml_parser.py  | 391 +++++++++++++++++++++++++++++
 tools/net/ynl/pyynl/ynl_gen_rst.py | 374 +--------------------------
I think the library code should be put in tools/net/ynl/pyynl/lib
because it is YNL specific code. Maybe call it rst_generator.py
We had a similar discussion before when we switched get_abi and
kernel-doc to Python. On that time, we opted to place all shared
Python libraries under scripts/lib.

From my side, I don't mind having them on a different place,
but I prefer to see all Sphinx extensions getting libraries from
the same base directory.
It's YNL specific code and I want to refactor it to make use of
tools/net/ynl/pyynl/lib/nlspec.py so it definitely belongs in
tools/net/ynl/pyynl/lib.
Jon,

What do you think?

Thanks,
Mauro
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help