[RFC PATCH v3 19/20] configure: use --diagnose option with meson ensure

John Snow posted 20 patches 2 years, 9 months ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Beraldo Leal <bleal@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Ani Sinha <anisinha@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, John Snow <jsnow@redhat.com>, Cleber Rosa <crosa@redhat.com>, Warner Losh <imp@bsdimp.com>, Kyle Evans <kevans@freebsd.org>
[RFC PATCH v3 19/20] configure: use --diagnose option with meson ensure
Posted by John Snow 2 years, 9 months ago
Rely on the diagnosis information from mkvenv so it can be removed from
the configure script.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 configure | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/configure b/configure
index ae55de1408..0881fffc14 100755
--- a/configure
+++ b/configure
@@ -1096,8 +1096,6 @@ fi
 
 # Resolve PATH
 python="$(command -v "$python")"
-# This variable is intended to be used only for error messages:
-target_python=$python
 
 # Create a Python virtual environment using our configured python.
 # The stdout of this script will be the location of a symlink that
@@ -1134,16 +1132,9 @@ fi
 if ! $python "${source_path}/python/scripts/mkvenv.py" ensure \
      $mkvenv_flags \
      --dir "${source_path}/python/wheels" \
+     --diagnose "meson" \
      "meson>=0.61.5" ;
 then
-    # We're very out of luck. Try to give a good diagnostic.
-    if test -e pyvenv/bin/meson; then
-        echo "Meson is too old: $(pyvenv/bin/meson --version)"
-    elif has meson ; then
-        echo "Meson was found installed on your system," \
-             "but not for the configured Python interpreter ($target_python)."
-        echo "(Hint: check '$(which meson)' to see which interpreter its shebang uses.)"
-    fi
     exit 1
 fi
 
-- 
2.39.2