Re: [PATCH] build: Fix problem of building Python bindings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/26/2011 09:46 PM, Osier Yang wrote:
> If one specify "--with-python=yes" but no python-devel package
> is installed, we ignore it with just a notice message, which
> doesn't give clear guide to user.
> ---
>  configure.ac |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 190bf40..758c893 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1917,15 +1917,13 @@ if test "$with_python" != "no" ; then
>                          then
>                              PYTHON_INCLUDES=-I/usr/include/python$PYTHON_VERSION
>                          else
> -                            AC_MSG_NOTICE([Could not find python$PYTHON_VERSION/Python.h, disabling bindings])
> -                            with_python=no
> +                            AC_MSG_ERROR([You must install python-devel to build Python bindings])

Hmm, this patch isn't quite right.  I tested on an Ubuntu system where I
don't have the devel package installed for python, and to my surprise,
./configure now fails, where it used to succeed without building any
python bindings:

configure: error: You must install python-devel to build Python bindings

In reality, we want the default to be --with-python=check, which
gracefully switches to --with-python=no if python is not present, and
only issue the AC_MSG_ERROR on an explicit --with-python=yes without
python bindings.  I ran out of time to look at this today, but think it
needs to be fixed before 0.9.1.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]