Re: [PATCH] scripts/sphinx-pre-install: make it handle Sphinx versions

From: Mauro Carvalho Chehab
Date: Wed May 22 2019 - 17:38:07 EST


Em Wed, 22 May 2019 14:35:06 -0600
Jonathan Corbet <corbet@xxxxxxx> escreveu:

> On Wed, 22 May 2019 13:28:34 -0400
> Mauro Carvalho Chehab <mchehab+samsung@xxxxxxxxxx> wrote:
>
> > As we want to switch to a newer Sphinx version in the future,
> > add some version detected logic, checking if the current
> > version meets the requirement and suggesting upgrade it the
> > version is supported but too old.
> >
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@xxxxxxxxxx>
>
> I've applied this in the branch with my other fixes (coming soon to a
> mailing list near you), thanks. I do think we eventually want to emit a
> warning during a normal docs build as well, and to raise the recommended
> version, but one step at a time...

The enclosed patch should do the work. It will probably be too verbose, but
it should be easy to add a "--silent" parameter to the script, making it
only display a message with the version warning.


Thanks,
Mauro

diff --git a/Documentation/Makefile b/Documentation/Makefile
index e889e7cb8511..9c80105995e7 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -70,6 +70,7 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
$(abspath $(BUILDDIR)/$3/$4)

htmldocs:
+ @./scripts/sphinx-pre-install
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))

linkcheckdocs: