aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2023-05-10 23:54:29 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2023-05-18 08:53:51 +0200
commit6f6652ebc2717b28c5788e6364c6dab09bb0ac44 (patch)
tree4f9ff0d7c22e8ba1639bac84504fedbe42e603ac /configure
parent6b0cedcdc7c52feda1a6b5d6c6f30356290af0ec (diff)
configure: bootstrap sphinx with mkvenv
When docs are explicitly requested, require Sphinx>=1.6.0. When docs are explicitly disabled, don't bother to check for Sphinx at all. If docs are set to "auto", attempt to locate Sphinx, but continue onward if it wasn't located. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20230511035435.734312-22-jsnow@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure21
1 files changed, 19 insertions, 2 deletions
diff --git a/configure b/configure
index f8308926bb..e0832f13ff 100755
--- a/configure
+++ b/configure
@@ -1115,9 +1115,9 @@ fi
# Suppress writing compiled files
python="$python -B"
+mkvenv="$python ${source_path}/python/scripts/mkvenv.py"
-
-if ! $python "${source_path}/python/scripts/mkvenv.py" ensure \
+if ! $mkvenv ensure \
--dir "${source_path}/python/wheels" \
--diagnose "meson" \
"meson>=0.61.5" ;
@@ -1132,6 +1132,23 @@ fi
meson="$(cd pyvenv/bin; pwd)/meson"
+# Conditionally ensure Sphinx is installed.
+
+if test "$docs" != "disabled" ; then
+ if ! $mkvenv ensure \
+ --diagnose "sphinx-build" \
+ "sphinx>=1.6.0" "sphinx-rtd-theme>=0.5.0";
+ then
+ if test "$docs" = "enabled" ; then
+ exit 1
+ fi
+ echo "Sphinx not found/usable, disabling docs."
+ docs=disabled
+ else
+ docs=enabled
+ fi
+fi
+
# Probe for ninja
if test -z "$ninja"; then