]> Git Repo - linux.git/commitdiff
Allow git builds of Sphinx
authorStephen Kitt <[email protected]>
Fri, 24 Jan 2020 18:33:16 +0000 (19:33 +0100)
committerJonathan Corbet <[email protected]>
Wed, 5 Feb 2020 17:33:44 +0000 (10:33 -0700)
When using a non-release version of Sphinx, from a local build (with
improvements for kernel doc handling, why not),

sphinx-build --version

reports versions of the form

sphinx-build 3.0.0+/4703d9119972

i.e. base version, a plus symbol, slash, and the start of the git hash
of whatever repository the command is run in (no, not the hash that
was used to build Sphinx!).

This patch fixes the installation check in sphinx-pre-install to
recognise such version output.

Signed-off-by: Stephen Kitt <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jonathan Corbet <[email protected]>
scripts/sphinx-pre-install

index 470ccfe678aa7ced5ab97639c87c5d3914946229..a8f0c002a34058f99de455f045f61fa5a6b28b4b 100755 (executable)
@@ -272,7 +272,7 @@ sub check_sphinx()
 
        open IN, "$sphinx --version 2>&1 |" or die "$sphinx returned an error";
        while (<IN>) {
-               if (m/^\s*sphinx-build\s+([\d\.]+)$/) {
+               if (m/^\s*sphinx-build\s+([\d\.]+)(\+\/[\da-f]+)?$/) {
                        $cur_version=$1;
                        last;
                }
This page took 0.058427 seconds and 4 git commands to generate.