[libvirt] [PATCH 1/4] configure: Allow (and prefer) Python 3

Andrea Bolognani posted 4 patches 7 years, 3 months ago
[libvirt] [PATCH 1/4] configure: Allow (and prefer) Python 3
Posted by Andrea Bolognani 7 years, 3 months ago
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>
---
 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 970a695ad1..56a7ad780a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
-- 
2.14.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 1/4] configure: Allow (and prefer) Python 3
Posted by Daniel P. Berrangé 7 years, 3 months ago
On Tue, Mar 20, 2018 at 11:53:52AM +0100, Andrea Bolognani wrote:
> 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>
> ---
>  configure.ac | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list