All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Corbet <corbet@lwn.net>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Linux Doc Mailing List <linux-doc@vger.kernel.org>
Cc: "Mauro Carvalho Chehab" <mchehab+huawei@kernel.org>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Mauro Carvalho Chehab" <mchehab+huawei@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Andreas Hindborg" <mchehab+huawei@kernel.org>,
	"Benno Lossin" <mchehab+huawei@kernel.org>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Danilo Krummrich" <mchehab+huawei@kernel.org>,
	"Gary Guo" <gary@garyguo.net>,
	"Miguel Ojeda" <mchehab+huawei@kernel.org>,
	"Trevor Gross" <tmgross@umich.edu>,
	linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org
Subject: Re: [PATCH 04/11] scripts: sphinx-build-wrapper: add a wrapper for sphinx-build
Date: Thu, 21 Aug 2025 14:11:06 -0600	[thread overview]
Message-ID: <87plco5tb9.fsf@trenco.lwn.net> (raw)
In-Reply-To: <88a95c7f6996cafb247d6706060173b17a46d570.1755258303.git.mchehab+huawei@kernel.org>

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

> There are too much magic inside docs Makefile to properly run
> sphinx-build. Create an ancillary script that contains all
> kernel-related sphinx-build call logic currently at Makefile.
>
> Such script is designed to work both as an standalone command
> and as part of a Makefile. As such, it properly handles POSIX
> jobserver used by GNU make.
>
> It should be noticed that, when running the script alone,
> it will only take care of sphinx-build and cleandocs target.
> As such:
>
> - it won't run "make rustdoc";
> - no extra checks.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> ---
>  .pylintrc                    |   2 +-
>  scripts/sphinx-build-wrapper | 627 +++++++++++++++++++++++++++++++++++
>  2 files changed, 628 insertions(+), 1 deletion(-)
>  create mode 100755 scripts/sphinx-build-wrapper

As a whole I like the idea of this - I would rather be reading code in
Python than in makefilese.  But I have some overall notes...

I am a bit dismayed by the size of it; this is many times the amount of
code it allows us to remove from the makefile.  Perhaps there's nothing
to be done for that, but ...

Is there value in the SphinxBuilder class?  Just because you can create
classes in Python doesn't mean that you have to; I'm not sure why you
would create one here rather than just doing it all at the module level.

Is the "search for a newer Python" code really going to be useful for
anybody?  It seems like a lot of work (and code) to try to quietly patch
things up for somebody who has some sort of a strange setup.

Please, no "except Exception:"  (or the equivalent bare "except:").
That bit of locale tweaking shows up in enough places that it should
maybe go into a little helper module rather than being repeatedly
open-coded?

Thanks,

jon

  parent reply	other threads:[~2025-08-21 20:11 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-15 11:50 [PATCH 00/11] Split sphinx call logic from docs Makefile Mauro Carvalho Chehab
2025-08-15 11:50 ` [PATCH 01/11] scripts/jobserver-exec: move the code to a class Mauro Carvalho Chehab
2025-08-15 11:50 ` [PATCH 02/11] scripts/jobserver-exec: move its class to the lib directory Mauro Carvalho Chehab
2025-08-15 11:50 ` [PATCH 03/11] scripts/jobserver-exec: add a help message Mauro Carvalho Chehab
2025-08-15 11:50 ` [PATCH 04/11] scripts: sphinx-build-wrapper: add a wrapper for sphinx-build Mauro Carvalho Chehab
2025-08-16  1:16   ` Akira Yokosawa
2025-08-16 11:06     ` Mauro Carvalho Chehab
2025-08-21 19:36   ` Jonathan Corbet
2025-08-21 19:43     ` Mauro Carvalho Chehab
2025-08-21 20:18       ` Jonathan Corbet
2025-08-21 20:11   ` Jonathan Corbet [this message]
2025-08-22  2:06     ` Mauro Carvalho Chehab
2025-08-22 13:55       ` Mauro Carvalho Chehab
2025-08-15 11:50 ` [PATCH 05/11] docs: Makefile: cleanup the logic by using sphinx-build-wrapper Mauro Carvalho Chehab
2025-08-15 11:50 ` [PATCH 06/11] docs: parallel-wrapper.sh: remove script Mauro Carvalho Chehab
2025-08-15 11:50 ` [PATCH 07/11] docs: Makefile: document latex/PDF PAPER= parameter Mauro Carvalho Chehab
2025-08-15 11:50 ` [PATCH 08/11] scripts/sphinx-build-wrapper: restore SPHINXOPTS parsing Mauro Carvalho Chehab
2025-08-15 11:50 ` [PATCH 09/11] scripts: sphinx-build-wrapper: add an argument for LaTeX interactive mode Mauro Carvalho Chehab
2025-08-15 11:50 ` [PATCH 10/11] scripts: sphinx-*: prevent sphinx-build crashes Mauro Carvalho Chehab
2025-08-21 19:41   ` Jonathan Corbet
2025-08-15 11:50 ` [PATCH 11/11] docs: Makefile: cleanup the logic by using sphinx-build-wrapper Mauro Carvalho Chehab

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=87plco5tb9.fsf@trenco.lwn.net \
    --to=corbet@lwn.net \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=gary@garyguo.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab+huawei@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.