Skip to contentSkip to conversation

Allow git builds of Sphinx

PATCH In review Stephen Kitt 2 participants 2 messages Jan 24, 2020 – Feb 5, 2020 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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+/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.

---
 scripts/sphinx-pre-install | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/sphinx-pre-install +1 -1
index 470ccfe678aa..a8f0c002a340 100755
@@ -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;
 		}
Signature · 1 line
2.24.1
maintainer
#1 lore raw
Quoted 13 lines · On Fri, 24 Jan 2020 19:33:16 +0100 Stephen Kitt <[email protected]> wrote:

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!).

Quoted 5 lines

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

---

Seems useful. Applied, thanks.

jon