@samitouri / QOSamiQemu / commits / b7872ccbb9

configure: allow PyPI access for python 'tooling' dependencies

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>

John Snow committed Feb 25, 2026 at 14:12 UTC b7872ccbb9835d5ab940ad309e8dfe68e4d8edae
1 file changed +12 -4
configure
+12 -4
@@ -963,10 +963,12 @@ fi
963 python="$python -B"
964 mkvenv="$python ${source_path}/python/scripts/mkvenv.py"
965
966 -# Finish preparing the virtual environment using vendored .whl files
966 +# Finish preparing the virtual environment using vendored .whl files.
967 +# Even if PyPI is allowed, we disallow it here to force installation
968 +# from our preferred vendored versions.
969
970 $mkvenv ensuregroup --dir "${source_path}/python/wheels" \
969 - ${source_path}/pythondeps.toml meson tooling || exit 1
971 + ${source_path}/pythondeps.toml meson || exit 1
972
973 # At this point, we expect Meson to be installed and available.
974 # 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
995 meson="$(cd pyvenv/non-packaged/bin; get_pwd)/meson"
996 fi
997
996 -# Conditionally ensure Sphinx is installed.
997 -
998 mkvenv_online_flag=""
999 if test "$download" = "enabled" ; then
1000 mkvenv_online_flag=" --online"
1001 fi
1002
1003 +# Unconditionally install our tooling group. PyPI is allowed if enabled here.
1004 +
1005 +$mkvenv ensuregroup $mkvenv_online_flag \
1006 + --dir "${source_path}/python/wheels" \
1007 + ${source_path}/pythondeps.toml tooling || exit 1
1008 +
1009 +# Conditionally ensure Sphinx is installed.
1010 +
1011 if test "$docs" != "disabled" ; then
1012 if ! $mkvenv ensuregroup \
1013 $(test "$docs" = "enabled" && echo "$mkvenv_online_flag") \