]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
configure: allow PyPI access for python 'tooling' dependencies
authorJohn Snow <jsnow@redhat.com>
Wed, 25 Feb 2026 19:12:55 +0000 (14:12 -0500)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 26 Feb 2026 15:59:07 +0000 (15:59 +0000)
We actually do not allow our meson requirements to be fetched online
because we strictly prefer the vendored version. Move the tooling group
installation to a different invocation that does allow PyPI to be
accessed when configure is run without explicitly disabling PyPI access.

This will allow QEMU to download and install python3-wheel for you if
you don't have it in your host environment.

Reported-by: Kevin Wolf <kwolf@redhat.com>
Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Message-id: 20260225191255.955585-1-jsnow@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
configure

index c4837eba2b1f61ff0769c5005088c8ed8cb1d024..090579bf2368f27f52f5d2bdf60b524f39004589 100755 (executable)
--- a/configure
+++ b/configure
@@ -963,10 +963,12 @@ fi
 python="$python -B"
 mkvenv="$python ${source_path}/python/scripts/mkvenv.py"
 
-# Finish preparing the virtual environment using vendored .whl files
+# Finish preparing the virtual environment using vendored .whl files.
+# Even if PyPI is allowed, we disallow it here to force installation
+# from our preferred vendored versions.
 
 $mkvenv ensuregroup --dir "${source_path}/python/wheels" \
-     ${source_path}/pythondeps.toml meson tooling || exit 1
+     ${source_path}/pythondeps.toml meson || exit 1
 
 # At this point, we expect Meson to be installed and available.
 # We expect mkvenv or pip to have created pyvenv/bin/meson for us.
@@ -993,13 +995,19 @@ if test "$host_os" = "haiku" && test ! -e "$meson" ; then
     meson="$(cd pyvenv/non-packaged/bin; get_pwd)/meson"
 fi
 
-# Conditionally ensure Sphinx is installed.
-
 mkvenv_online_flag=""
 if test "$download" = "enabled" ; then
     mkvenv_online_flag=" --online"
 fi
 
+# Unconditionally install our tooling group. PyPI is allowed if enabled here.
+
+$mkvenv ensuregroup $mkvenv_online_flag \
+        --dir "${source_path}/python/wheels" \
+        ${source_path}/pythondeps.toml tooling || exit 1
+
+# Conditionally ensure Sphinx is installed.
+
 if test "$docs" != "disabled" ; then
     if ! $mkvenv ensuregroup \
          $(test "$docs" = "enabled" && echo "$mkvenv_online_flag") \