[ovs-dev] [PATCH] m4: Add hard requirements for python in "configure"
Timothy Redaelli
tredaelli at redhat.com
Wed Mar 29 11:49:42 UTC 2017
Since Python 2.7 and python-six are needed to build Open vSwitch,
./configure should return an error if they are missing or if they are too old
Signed-off-by: Timothy Redaelli <tredaelli at redhat.com>
---
m4/openvswitch.m4 | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4
index 0b2cc27..d41bffb 100644
--- a/m4/openvswitch.m4
+++ b/m4/openvswitch.m4
@@ -341,11 +341,13 @@ else:
fi
done
done
- if test $ovs_cv_python != no; then
- if test -x "$ovs_cv_python" && ! "$ovs_cv_python" -c 'import six' >/dev/null 2>&1; then
- ovs_cv_python=no
- AC_MSG_WARN([Missing Python six library.])
- fi
+ fi
+ if test $ovs_cv_python = no; then
+ AC_MSG_ERROR([cannot find python 2.7 or higher.])
+ else
+ if test -x "$ovs_cv_python" && ! "$ovs_cv_python" -c 'import six ; six.moves.range' >/dev/null 2>&1; then
+ ovs_cv_python=no
+ AC_MSG_ERROR([Missing Python six library or version too old.])
fi
fi])
AC_SUBST([HAVE_PYTHON])
--
2.9.3
More information about the dev
mailing list