From: Vegard Nossum <vegard.nossum@oracle.com>
To: Lukas Bulwahn <lukas.bulwahn@gmail.com>,
Jonathan Corbet <corbet@lwn.net>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Akira Yokosawa <akiyks@gmail.com>,
Jani Nikula <jani.nikula@linux.intel.com>,
Randy Dunlap <rdunlap@infradead.org>,
linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] docs: drop the version constraints for sphinx and dependencies
Date: Thu, 29 Feb 2024 15:39:31 +0100 [thread overview]
Message-ID: <e6441dc1-6821-4514-b285-ebc24114aece@oracle.com> (raw)
In-Reply-To: <20240227131410.35269-1-lukas.bulwahn@gmail.com>
On 27/02/2024 14:14, Lukas Bulwahn wrote:
> As discussed (see Links), there is some inertia to move to the recent
> Sphinx versions for the doc build environment.
[...]
> diff --git a/Documentation/sphinx/requirements.txt b/Documentation/sphinx/requirements.txt
> index 5d47ed443949..1f3b98eee2c9 100644
> --- a/Documentation/sphinx/requirements.txt
> +++ b/Documentation/sphinx/requirements.txt
> @@ -1,6 +1,4 @@
> -# jinja2>=3.1 is not compatible with Sphinx<4.0
> -jinja2<3.1
> -# alabaster>=0.7.14 is not compatible with Sphinx<=3.3
> -alabaster<0.7.14
> -Sphinx==2.4.4
> +jinja2
> +alabaster
> +Sphinx
> pyyaml
I know you wrote this as well, but just for the record I tried dropping
jinja2 from this list and it still pulled it in automatically:
Collecting Jinja2>=3.0
Using cached Jinja2-3.1.3-py3-none-any.whl (133 kB)
> diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
> index de0de5dd676e..4c781617ffe6 100755
> --- a/scripts/sphinx-pre-install
> +++ b/scripts/sphinx-pre-install
> @@ -280,8 +280,6 @@ sub get_sphinx_version($)
>
> sub check_sphinx()
> {
> - my $default_version;
> -
> open IN, $conf or die "Can't open $conf";
> while (<IN>) {
> if (m/^\s*needs_sphinx\s*=\s*[\'\"]([\d\.]+)[\'\"]/) {
> @@ -293,18 +291,7 @@ sub check_sphinx()
>
> die "Can't get needs_sphinx version from $conf" if (!$min_version);
>
> - open IN, $requirement_file or die "Can't open $requirement_file";
> - while (<IN>) {
> - if (m/^\s*Sphinx\s*==\s*([\d\.]+)$/) {
> - $default_version=$1;
> - last;
> - }
> - }
> - close IN;
> -
> - die "Can't get default sphinx version from $requirement_file" if (!$default_version);
> -
> - $virtenv_dir = $virtenv_prefix . $default_version;
> + $virtenv_dir = $virtenv_prefix . "latest";
>
> my $sphinx = get_sphinx_fname();
> if ($sphinx eq "") {
> @@ -318,8 +305,8 @@ sub check_sphinx()
> die "$sphinx didn't return its version" if (!$cur_version);
>
> if ($cur_version lt $min_version) {
> - printf "ERROR: Sphinx version is %s. It should be >= %s (recommended >= %s)\n",
> - $cur_version, $min_version, $default_version;
> + printf "ERROR: Sphinx version is %s. It should be >= %s\n",
> + $cur_version, $min_version;
> $need_sphinx = 1;
> return;
> }
Tried with a few different versions:
$ (. sphinx-2.4.4/bin/activate && scripts/sphinx-pre-install)
Detected OS: Ubuntu 22.04.3 LTS.
Sphinx version: 2.4.4
You may also use the newer Sphinx version 7.2.6 with:
. /home/vegard/linux/sphinx_latest/bin/activate
[...]
$ (. sphinx-2.0/bin/activate && scripts/sphinx-pre-install)
ERROR: Sphinx version is 2.0.0. It should be >= 2.4.4
Detected OS: Ubuntu 22.04.3 LTS.
Sphinx version: 2.0.0
Need to activate Sphinx (version 7.2.6) on virtualenv with:
. /home/vegard/linux/sphinx_latest/bin/activate
[...]
$ scripts/sphinx-pre-install
Detected OS: Ubuntu 22.04.3 LTS.
Sphinx version: 4.3.2
All optional dependencies are met.
Needed package dependencies are met.
One remark I have is that it didn't encourage me to upgrade to 7.2.6 in
the last one (using the system Sphinx 4.3.2) although it did for the
2.4.4 virtualenv. Maybe that's expected. I didn't look into it. Anyway,
FWIW:
Tested-by: Vegard Nossum <vegard.nossum@oracle.com>
Vegard
next prev parent reply other threads:[~2024-02-29 14:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-27 13:14 Lukas Bulwahn
2024-02-27 13:25 ` Lukas Bulwahn
2024-02-28 22:16 ` Jonathan Corbet
2024-02-29 14:39 ` Vegard Nossum [this message]
2024-03-01 2:33 ` Akira Yokosawa
2024-03-01 14:19 ` Lukas Bulwahn
2024-03-01 14:22 ` Lukas Bulwahn
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=e6441dc1-6821-4514-b285-ebc24114aece@oracle.com \
--to=vegard.nossum@oracle.com \
--cc=akiyks@gmail.com \
--cc=corbet@lwn.net \
--cc=jani.nikula@linux.intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
--cc=mchehab@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®