Commit d1c9038a authored by Stephen Kitt's avatar Stephen Kitt Committed by Jonathan Corbet

Allow git builds of Sphinx

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+/4703d911

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: default avatarStephen Kitt <steve@sk2.org>
Link: https://lore.kernel.org/r/20200124183316.1719218-1-steve@sk2.orgSigned-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 599e6f8d
...@@ -272,7 +272,7 @@ sub check_sphinx() ...@@ -272,7 +272,7 @@ sub check_sphinx()
open IN, "$sphinx --version 2>&1 |" or die "$sphinx returned an error"; open IN, "$sphinx --version 2>&1 |" or die "$sphinx returned an error";
while (<IN>) { while (<IN>) {
if (m/^\s*sphinx-build\s+([\d\.]+)$/) { if (m/^\s*sphinx-build\s+([\d\.]+)(\+\/[\da-f]+)?$/) {
$cur_version=$1; $cur_version=$1;
last; last;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment