mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Akira Yokosawa <akiyks@gmail.com>,
	Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [PATCH 06/13] docs: move get_abi.py to tools/doc
Date: Thu, 14 Aug 2025 01:43:59 +0200	[thread overview]
Message-ID: <20250814014359.0631931a@foz.lan> (raw)
In-Reply-To: <20250813213218.198582-7-corbet@lwn.net>

Em Wed, 13 Aug 2025 15:32:05 -0600
Jonathan Corbet <corbet@lwn.net> escreveu:

> Move this tool out of scripts/ to join the other documentation tools; fix
> up a couple of erroneous references in the process.
> 
> It's worth noting that this script will fail badly unless one has a
> PYTHONPATH referencing scripts/lib/abi.

Heh, on all Python scripts you're moving, you need to change the logic.

In the case of kernel-doc, you need to change from:

	LIB_DIR = "lib/kdoc"
	SRC_DIR = os.path.dirname(os.path.realpath(__file__))		# Currently scripts/
	sys.path.insert(0, os.path.join(SRC_DIR, LIB_DIR))

to:

	LIB_DIR = "../../scripts/lib/kdoc"
	SRC_DIR = os.path.dirname(os.path.realpath(__file__))		# Currently scripts/
	sys.path.insert(0, os.path.join(SRC_DIR, LIB_DIR))

Here, it is the same, except that LIB_DIR will now be:

	LIB_DIR = "../../scripts/lib/abi"
	

> 
> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
> ---
>  Documentation/Kconfig              | 2 +-
>  Documentation/Makefile             | 2 +-
>  Documentation/sphinx/kernel_abi.py | 2 +-
>  MAINTAINERS                        | 1 -
>  {scripts => tools/doc}/get_abi.py  | 0
>  5 files changed, 3 insertions(+), 4 deletions(-)
>  rename {scripts => tools/doc}/get_abi.py (100%)
> 
> diff --git a/Documentation/Kconfig b/Documentation/Kconfig
> index 3a0e7ac0c4e3..70178e9e0c6c 100644
> --- a/Documentation/Kconfig
> +++ b/Documentation/Kconfig
> @@ -19,7 +19,7 @@ config WARN_ABI_ERRORS
>  	  described at Documentation/ABI/README. Yet, as they're manually
>  	  written, it would be possible that some of those files would
>  	  have errors that would break them for being parsed by
> -	  scripts/get_abi.pl. Add a check to verify them.
> +	  tools/doc/get_abi.py. Add a check to verify them.
>  
>  	  If unsure, select 'N'.
>  
> diff --git a/Documentation/Makefile b/Documentation/Makefile
> index 962c4fab94b0..eef5decb79b8 100644
> --- a/Documentation/Makefile
> +++ b/Documentation/Makefile
> @@ -13,7 +13,7 @@ endif
>  
>  # Check for broken ABI files
>  ifeq ($(CONFIG_WARN_ABI_ERRORS),y)
> -$(shell $(srctree)/scripts/get_abi.py --dir $(srctree)/Documentation/ABI validate)
> +$(shell $(srctree)/tools/doc/get_abi.py --dir $(srctree)/Documentation/ABI validate)
>  endif
>  endif
>  
> diff --git a/Documentation/sphinx/kernel_abi.py b/Documentation/sphinx/kernel_abi.py
> index 4c4375201b9e..32e39fb8bc3b 100644
> --- a/Documentation/sphinx/kernel_abi.py
> +++ b/Documentation/sphinx/kernel_abi.py
> @@ -14,7 +14,7 @@
>      :license:    GPL Version 2, June 1991 see Linux/COPYING for details.
>  
>      The ``kernel-abi`` (:py:class:`KernelCmd`) directive calls the
> -    scripts/get_abi.py script to parse the Kernel ABI files.
> +    AbiParser class to parse the Kernel ABI files.
>  
>      Overview of directive's argument and options.
>  
> diff --git a/MAINTAINERS b/MAINTAINERS
> index ec9872642597..b41b78215035 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -7302,7 +7302,6 @@ P:	Documentation/doc-guide/maintainer-profile.rst
>  T:	git git://git.lwn.net/linux.git docs-next
>  F:	Documentation/
>  F:	tools/doc/
> -F:	scripts/get_abi.py
>  F:	scripts/kernel-doc*
>  F:	scripts/lib/abi/*
>  F:	scripts/lib/kdoc/*
> diff --git a/scripts/get_abi.py b/tools/doc/get_abi.py
> similarity index 100%
> rename from scripts/get_abi.py
> rename to tools/doc/get_abi.py



Thanks,
Mauro

  reply	other threads:[~2025-08-13 23:44 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-13 21:31 [PATCH RFC 00/13] Collect documention-related tools under tools/doc Jonathan Corbet
2025-08-13 21:32 ` [PATCH 01/13] docs: Move the "features" tools to tools/doc Jonathan Corbet
2025-08-13 23:38   ` Mauro Carvalho Chehab
2025-08-13 23:42     ` Randy Dunlap
2025-08-14  5:56       ` Mauro Carvalho Chehab
2025-08-14  5:57         ` Randy Dunlap
2025-08-13 21:32 ` [PATCH 02/13] docs: move checktransupdate.py " Jonathan Corbet
2025-08-13 23:51   ` Mauro Carvalho Chehab
2025-08-13 21:32 ` [PATCH 03/13] docs: move scripts/check-variable-fonts.sh " Jonathan Corbet
2025-08-13 23:46   ` Mauro Carvalho Chehab
2025-08-13 21:32 ` [PATCH 04/13] docs: move scripts/documentation-file-ref-check " Jonathan Corbet
2025-08-13 23:47   ` Mauro Carvalho Chehab
2025-08-13 21:32 ` [PATCH 05/13] docs: move parallel-wrapper.sh to tools/doc/ Jonathan Corbet
2025-08-13 23:31   ` Mauro Carvalho Chehab
2025-08-13 21:32 ` [PATCH 06/13] docs: move get_abi.py to tools/doc Jonathan Corbet
2025-08-13 23:43   ` Mauro Carvalho Chehab [this message]
2025-08-13 21:32 ` [PATCH 07/13] docs: move sphinx-pre-install " Jonathan Corbet
2025-08-13 23:36   ` Mauro Carvalho Chehab
2025-08-14  2:14     ` Jonathan Corbet
2025-08-14  6:21       ` Mauro Carvalho Chehab
2025-08-14 13:52         ` Jonathan Corbet
2025-08-15  5:18           ` Mauro Carvalho Chehab
2025-08-15 13:18             ` Jonathan Corbet
2025-08-15 15:13               ` Mauro Carvalho Chehab
2025-08-15 19:31                 ` Jonathan Corbet
2025-08-16  9:34                   ` Mauro Carvalho Chehab
2025-08-13 21:32 ` [PATCH 08/13] docs: move test_doc_build.py " Jonathan Corbet
2025-08-13 23:36   ` Mauro Carvalho Chehab
2025-08-13 21:32 ` [PATCH 09/13] docs: move parse-headers.pl " Jonathan Corbet
2025-08-13 23:32   ` Mauro Carvalho Chehab
2025-08-13 21:32 ` [PATCH 10/13] docs: move kernel-doc " Jonathan Corbet
2025-08-13 23:33   ` Mauro Carvalho Chehab
2025-08-13 23:48   ` Mauro Carvalho Chehab
2025-08-14 12:13   ` kernel test robot
2025-08-13 21:32 ` [PATCH 11/13] docs: move split-man.pl " Jonathan Corbet
2025-08-13 23:50   ` Mauro Carvalho Chehab
2025-08-13 21:32 ` [PATCH 12/13] docs: move find-unused-docs.sh " Jonathan Corbet
2025-08-13 23:50   ` Mauro Carvalho Chehab
2025-08-13 21:32 ` [PATCH 13/13] docs: remove kernel-doc.pl Jonathan Corbet
2025-08-13 23:33   ` Mauro Carvalho Chehab
2025-08-15  2:43   ` Randy Dunlap
2025-08-15  4:45     ` Mauro Carvalho Chehab
2025-08-13 21:38 ` [PATCH RFC 00/13] Collect documention-related tools under tools/doc Jonathan Corbet
2025-08-13 23:29 ` Mauro Carvalho Chehab
2025-08-14 14:59 ` Jani Nikula
2025-08-15  2:53   ` Randy Dunlap
2025-08-15  8:29     ` Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250814014359.0631931a@foz.lan \
    --to=mchehab+huawei@kernel.org \
    --cc=akiyks@gmail.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®