Skip to content

Commit

Permalink
Allow git builds of Sphinx
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
skitt authored and Jonathan Corbet committed Feb 5, 2020
1 parent 599e6f8 commit d1c9038
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/sphinx-pre-install
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d1c9038

Please sign in to comment.