From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: Johannes Berg <johannes@sipsolutions.net>,
Jonathan Corbet <corbet@lwn.net>,
Randy Dunlap <rdunlap@infradead.org>,
Jani Nikula <jani.nikula@intel.com>,
Vegard Nossum <vegard.nossum@oracle.com>,
ksummit@lists.linux.dev,
Linux Documentation <linux-doc@vger.kernel.org>,
Akira Yokosawa <akiyks@gmail.com>,
Bagas Sanjaya <bagasdotme@gmail.com>,
Matthew Wilcox <willy@infradead.org>
Subject: Re: [TECH TOPIC] Kernel documentation - update and future directions
Date: Wed, 3 Sep 2025 17:07:29 +0200 [thread overview]
Message-ID: <20250903150729.GP3648@pendragon.ideasonboard.com> (raw)
In-Reply-To: <xxlm3ozmpel5iadhtambkzfx273oysjraffcizdmgexzhuqtwf@qxkwdvqmbadw>
On Wed, Sep 03, 2025 at 04:57:15PM +0200, Mauro Carvalho Chehab wrote:
> On Wed, Sep 03, 2025 at 12:54:04PM +0200, Johannes Berg wrote:
> > On Wed, 2025-09-03 at 12:45 +0200, Johannes Berg wrote:
> > >
> > > I don't follow. If this setup breaks the build then that's good, I'll
> > > fix the env. If the build does magic inside and sort of ignores $PATH,
> > > that's bad.
> >
> > Or maybe it's not ignoring $PATH, but rather picking the "best"
> > python3.xy binary from $PATH - still that's annoying because you'd have
> > to control which ones are there and/or know which ones it might pick.
> >
> > Far more predictable and usable to just use "python3" and print a
> > message saying you might want to use a better version if you think it's
> > too slow.
>
> There are actually 3 different issues that depend on python version:
>
> 1. sphinx-pre-install:
>
> This used to be a Perl script. The goal is to check if sphinx-build
> is installed and works, and identify missing dependencies.
>
> The problem is: if one installs python3xx-Sphinx, instead of
> python3-Sphinx, the script will fail, except if it first switches
> to python3.xx;
>
> 2. sphinx-build logic inside makefile, required for doc-specific targets:
>
> - If python < 3.7, doc builds fail;
> - If python3xx-Sphinx is installed, build only works if started using
> the right python3.xx exec
>
> 3. kernel-doc via command line. Python >=3.6 and <= 3.11 works. It is
> just 60% slower.
>
> For (3), I agree with you: let it run at the slow way, printing a warning;
> eventually suggesting a newer version and, as Jon suggested, added a
> command line like --newest-python that could optionally pick the fastest
> version.
>
> Now, for (1) and (2), it should be possible to allow building docs even
> if the distro requires Python < 3.7, providing extra packages for newer
> Python, as almost all distros do. See, several distros require python
> on their minimal install images, because it can be using during package
> install. Removing the default python replacing by a new version may break
> the system, as the newer version may not be backward-compatible.
>
> So, what distros do, instead, to ensure backward-compatibility is to
> provide multpile Python versions (together with python libraries).
>
> The htmldocs/pdfdocs/... targets must support it somehow.
>
> The best alternative seems to check if:
>
> - python version is bellow the minimal supported version;
> - there is a newer python binary at PATH;
> - check if sphinx-build runs with the newest version.
>
> If all those 3 conditions are met, build docs with a version that works,
> printing a message to tell the user what Python binary was used.
This should fail. If you really insist you could print a message telling
the user there's another Python version on their system that may work,
but selecting it automatically isn't a good idea.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2025-09-03 15:07 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87plcndkzs.fsf@trenco.lwn.net>
[not found] ` <20250828230104.GB26612@pendragon.ideasonboard.com>
[not found] ` <87wm6l0w2y.fsf@trenco.lwn.net>
2025-08-30 16:00 ` [TECH TOPIC] Kernel documentation - update and future directions Vegard Nossum
2025-08-30 22:23 ` Laurent Pinchart
2025-08-30 23:08 ` Jonathan Corbet
2025-08-31 14:03 ` Mauro Carvalho Chehab
2025-08-31 20:16 ` Jonathan Corbet
2025-09-01 6:17 ` Randy Dunlap
2025-09-01 19:27 ` Mauro Carvalho Chehab
2025-09-01 10:09 ` Jani Nikula
2025-09-01 16:51 ` Randy Dunlap
2025-09-01 17:52 ` Mark Brown
2025-09-01 18:15 ` Randy Dunlap
2025-09-01 18:20 ` Mark Brown
2025-09-01 18:25 ` Jonathan Corbet
2025-09-01 18:40 ` Mark Brown
2025-09-01 19:51 ` Jonathan Corbet
2025-09-01 22:52 ` Mauro Carvalho Chehab
2025-09-01 18:46 ` Mauro Carvalho Chehab
2025-09-01 18:52 ` Mark Brown
2025-09-01 22:56 ` Mauro Carvalho Chehab
2025-09-02 11:15 ` Mark Brown
2025-09-02 11:59 ` Mauro Carvalho Chehab
2025-09-02 12:14 ` Mauro Carvalho Chehab
2025-09-02 13:00 ` Mark Brown
2025-09-02 14:42 ` Mauro Carvalho Chehab
2025-09-02 15:15 ` Jonathan Corbet
2025-09-02 17:19 ` Mauro Carvalho Chehab
2025-09-02 18:52 ` Laurent Pinchart
2025-09-03 7:47 ` Jani Nikula
2025-09-03 10:04 ` Mauro Carvalho Chehab
2025-09-03 10:25 ` Jani Nikula
2025-09-02 18:58 ` Jonathan Corbet
2025-09-02 22:35 ` Mauro Carvalho Chehab
2025-09-03 6:29 ` Johannes Berg
2025-09-03 10:42 ` Mauro Carvalho Chehab
2025-09-03 10:45 ` Johannes Berg
2025-09-03 10:54 ` Johannes Berg
2025-09-03 14:57 ` Mauro Carvalho Chehab
2025-09-03 15:07 ` Laurent Pinchart [this message]
2025-09-03 15:17 ` Konstantin Ryabitsev
2025-09-03 15:22 ` Miguel Ojeda
2025-09-03 15:11 ` Johannes Berg
2025-09-03 15:25 ` Mauro Carvalho Chehab
2025-09-03 15:37 ` Jonathan Corbet
2025-09-03 15:52 ` Mauro Carvalho Chehab
2025-09-03 13:39 ` Mauro Carvalho Chehab
2025-09-03 13:51 ` Laurent Pinchart
2025-09-01 19:53 ` Jonathan Corbet
2025-09-01 23:15 ` Mauro Carvalho Chehab
2025-09-01 18:37 ` Mauro Carvalho Chehab
2025-09-01 19:05 ` Andrew Lunn
2025-09-01 19:17 ` Mark Brown
2025-09-02 10:42 ` Jani Nikula
2025-09-02 11:55 ` Mauro Carvalho Chehab
2025-09-02 12:07 ` Jani Nikula
2025-09-02 15:07 ` Mauro Carvalho Chehab
2025-09-01 18:26 ` Mauro Carvalho Chehab
2025-09-02 10:55 ` Jani Nikula
2025-09-02 12:04 ` Andrew Lunn
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=20250903150729.GP3648@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=akiyks@gmail.com \
--cc=bagasdotme@gmail.com \
--cc=corbet@lwn.net \
--cc=jani.nikula@intel.com \
--cc=johannes@sipsolutions.net \
--cc=ksummit@lists.linux.dev \
--cc=linux-doc@vger.kernel.org \
--cc=mchehab+huawei@kernel.org \
--cc=rdunlap@infradead.org \
--cc=vegard.nossum@oracle.com \
--cc=willy@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;
as well as URLs for NNTP newsgroup(s).