]> xenbits.xensource.com Git - libvirt.git/commitdiff
configure: Allow (and prefer) Python 3
authorAndrea Bolognani <abologna@redhat.com>
Mon, 19 Mar 2018 16:12:39 +0000 (17:12 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 20 Mar 2018 12:42:46 +0000 (13:42 +0100)
Our build process no longer depends on Python 2, so we can
finally allow Python 3 to satisfy our requirement for a Python
interpreter.

Since several distributions have now switched to installing
Python 3 by default and Python 2 is on its way out, prefer the
former when both are available.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
configure.ac

index 970a695ad18d250ce26844c579a81a8e3f3ce6be..56a7ad780af1166f76f1ff07a01b0779a00c6322 100644 (file)
@@ -645,9 +645,9 @@ if test "$with_linux" = "yes"; then
 fi
 
 dnl Allow perl/python overrides
-AC_PATH_PROGS([PYTHON], [python2 python])
+AC_PATH_PROGS([PYTHON], [python3 python2 python])
 if test -z "$PYTHON"; then
-         AC_MSG_ERROR(['python' or 'python2' binary is required to build libvirt])
+    AC_MSG_ERROR(['python3', 'python2' or 'python' binary is required to build libvirt])
 fi
 AC_PATH_PROG([PERL], [perl])
 if test -z "$PERL"; then