]> git.droids-corp.org - dpdk.git/commitdiff
doc: fix build when sphinx reports version to stderr
authorBruce Richardson <bruce.richardson@intel.com>
Mon, 22 Jun 2020 14:00:02 +0000 (15:00 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 30 Jul 2020 23:09:26 +0000 (01:09 +0200)
When sphinx-build reports its version information to stderr rather
than stdout, the wrapper script misses it, and then fails to run.
We can fix this by redirecting stderr to stdout for the version
query call.

Fixes: f5ab2074cfba ("doc: rebuild with meson whenever a file changes")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Ciara Power <ciara.power@intel.com>
Tested-by: David Marchand <david.marchand@redhat.com>
buildtools/call-sphinx-build.py

index b9a3994e1799e8df2a28ecd092a9d8f3f80e464c..85c9e01563e2bbe771b461c47f3528540624f3c5 100755 (executable)
@@ -6,13 +6,14 @@
 import sys
 import os
 from os.path import join
-from subprocess import run, PIPE
+from subprocess import run, PIPE, STDOUT
 from distutils.version import StrictVersion
 
 (sphinx, src, dst) = sys.argv[1:]  # assign parameters to variables
 
 # for sphinx version >= 1.7 add parallelism using "-j auto"
-ver = run([sphinx, '--version'], stdout=PIPE).stdout.decode().split()[-1]
+ver = run([sphinx, '--version'], stdout=PIPE,
+          stderr=STDOUT).stdout.decode().split()[-1]
 sphinx_cmd = [sphinx]
 if StrictVersion(ver) >= StrictVersion('1.7'):
     sphinx_cmd += ['-j', 'auto']