From 8ce367570f33b956ad95bf80c06edc8e0fbe41e4 Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Wed, 16 May 2018 14:28:08 +0200 Subject: [PATCH] Handle cases where no python2 interpreter is found If no python2 interpreter is found and only a python3 one is found, then use that one rather than just bailing. * configure.ac: When no python2 is found and only python3 is found, then use python3. Signed-off-by: Dodji Seketeli --- configure.ac | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/configure.ac b/configure.ac index 1fbd3bd6..c9e50f60 100644 --- a/configure.ac +++ b/configure.ac @@ -385,15 +385,27 @@ if test x$CHECK_DEPS_FOR_FEDABIPKGDIFF = xyes; then fi if test x$MINIMAL_PYTHON_VERSION_FOUND = xno; then + AC_MSG_NOTICE([no minimal version of python found]) MISSING_FEDABIPKGDIFF_DEP=yes if test x$MISSING_FEDABIPKGDIFF_DEP_FATAL = xyes; then AC_MSG_ERROR([could not find a python program of version at least $MINIMAL_PYTHON2_VERSION]) fi + if test x$PYTHON = xno; then + AC_MSG_NOTICE([python binary wasn't found]) + if test x$PYTHON3_INTERPRETER != xno; then + AC_MSG_NOTICE([using $PYTHON3_INTERPRETER instead]) + PYTHON=$PYTHON3_INTERPRETER + MINIMAL_PYTHON_VERSION_FOUND=yes + MISSING_FEDABIPKGDIFF_DEP=no + fi + fi else + AC_MSG_NOTICE([a minimal version of python was found ...]) if test x$PYTHON3_INTERPRETER != xno; then # We were instructed to use python3 and it's present on the # system. Let's update the PYTHON variable that points to the # actual python interpreter we are going to be using + AC_MSG_NOTICE([... and it was $PYTHON3_INTERPRETER]) PYTHON=$PYTHON3_INTERPRETER fi fi