All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix libvirt-python build problem
@ 2013-05-02 19:18 Yao Zhao
  2013-05-02 20:37 ` Bruce Ashfield
  0 siblings, 1 reply; 5+ messages in thread
From: Yao Zhao @ 2013-05-02 19:18 UTC (permalink / raw)
  To: meta-virtualization

remove python_incdir.patch and inherit pythonnative.
use PACKAGECONFIG instead of EXTRA_OECONF.
enable python in full PACKAGECONFIG.

Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
---
 recipes-extended/libvirt/libvirt-python.inc |   21 ++++++++++++---------
 recipes-extended/libvirt/libvirt_1.0.3.bb   |    2 +-
 2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/recipes-extended/libvirt/libvirt-python.inc b/recipes-extended/libvirt/libvirt-python.inc
index 49d15fb..d4cc5f3 100644
--- a/recipes-extended/libvirt/libvirt-python.inc
+++ b/recipes-extended/libvirt/libvirt-python.inc
@@ -1,14 +1,17 @@
-inherit python-dir
+inherit pythonnative python-dir
 
-# Enable the Python tool support
-EXTRA_OECONF += "--with-python=yes --with-python-inc-dir=-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}"
+export STAGING_INCDIR
+export STAGING_LIBDIR
+export BUILD_SYS 
+export HOST_SYS
 
-SRC_URI += " file://python_incdir.patch"
-
-DEPENDS  += "python python-native"
+PACKAGECONFIG += "python"
+PACKAGECONFIG[python] = "--with-python,--without-python,python,"
 RDEPENDS_${PN}-python += "python"
 PACKAGECONFIG_${PN}-python[xen] = ",,,xen-python"
 
-PACKAGES += "${PN}-python-dbg ${PN}-python"
-FILES_${PN}-python-dbg += "${libdir}/${PYTHON_DIR}/dist-packages/.debug/"
-FILES_${PN}-python += "${libdir}/${PYTHON_DIR}/dist-packages"
+PACKAGES += "${PN}-python-staticdev ${PN}-python-dev ${PN}-python-dbg ${PN}-python"
+FILES_${PN}-python-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
+FILES_${PN}-python-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
+FILES_${PN}-python-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
+FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}"
diff --git a/recipes-extended/libvirt/libvirt_1.0.3.bb b/recipes-extended/libvirt/libvirt_1.0.3.bb
index c1c000e..33087ce 100644
--- a/recipes-extended/libvirt/libvirt_1.0.3.bb
+++ b/recipes-extended/libvirt/libvirt_1.0.3.bb
@@ -106,7 +106,7 @@ INITSCRIPT_PARAMS_${PN}-libvirtd = "defaults 72"
 
 # full config
 PACKAGECONFIG ??= "qemu yajl xen libxl xen-inotify uml openvz vmware vbox esx \
-	           polkit lxc test remote macvtap libvirtd netcf"
+	           polkit lxc test remote macvtap libvirtd netcf python"
 
 PACKAGECONFIG[qemu] = "--with-qemu,--without-qemu,qemu"
 PACKAGECONFIG[yajl] = "--with-yajl,--without-yajl,yajl,yajl"
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] fix libvirt-python build problem
  2013-05-02 19:18 [PATCH] fix libvirt-python build problem Yao Zhao
@ 2013-05-02 20:37 ` Bruce Ashfield
  2013-05-03 13:19   ` Yao Zhao
  0 siblings, 1 reply; 5+ messages in thread
From: Bruce Ashfield @ 2013-05-02 20:37 UTC (permalink / raw)
  To: Yao Zhao; +Cc: meta-virtualization@yoctoproject.org

What's the head of your meta-virtualization ? It looks like you are missing:

commit 7040db74c375ef55d1b040f53071be29590882de
Author: Mihai Prica <mihai.prica@intel.com>
Date:   Thu Apr 18 18:10:42 2013 +0300

    libvirt: Changed python bindings install location

    The libvirt-python files were installed to dist-packages and this
    is not part of sys.path in yocto so they were not available to
    python. Changed this to site-packages.

    Signed-off-by: Mihai Prica <mihai.prica@intel.com>
    Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>

After that change, the following line in your patch fails:

-FILES_${PN}-python-dbg += "${libdir}/${PYTHON_DIR}/dist-packages/.debug/"

Since the line is now:

FILES_${PN}-python-dbg += "${libdir}/${PYTHON_DIR}/site-packages/.debug/"

Can you double check and resend ?

At the same time, can you also update the log to show the "build problem" that
the patch is fixing?

Cheers,

Bruce


On Thu, May 2, 2013 at 3:18 PM, Yao Zhao <yao.zhao@windriver.com> wrote:
> remove python_incdir.patch and inherit pythonnative.
> use PACKAGECONFIG instead of EXTRA_OECONF.
> enable python in full PACKAGECONFIG.
>
> Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
> ---
>  recipes-extended/libvirt/libvirt-python.inc |   21 ++++++++++++---------
>  recipes-extended/libvirt/libvirt_1.0.3.bb   |    2 +-
>  2 files changed, 13 insertions(+), 10 deletions(-)
>
> diff --git a/recipes-extended/libvirt/libvirt-python.inc b/recipes-extended/libvirt/libvirt-python.inc
> index 49d15fb..d4cc5f3 100644
> --- a/recipes-extended/libvirt/libvirt-python.inc
> +++ b/recipes-extended/libvirt/libvirt-python.inc
> @@ -1,14 +1,17 @@
> -inherit python-dir
> +inherit pythonnative python-dir
>
> -# Enable the Python tool support
> -EXTRA_OECONF += "--with-python=yes --with-python-inc-dir=-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}"
> +export STAGING_INCDIR
> +export STAGING_LIBDIR
> +export BUILD_SYS
> +export HOST_SYS
>
> -SRC_URI += " file://python_incdir.patch"
> -
> -DEPENDS  += "python python-native"
> +PACKAGECONFIG += "python"
> +PACKAGECONFIG[python] = "--with-python,--without-python,python,"
>  RDEPENDS_${PN}-python += "python"
>  PACKAGECONFIG_${PN}-python[xen] = ",,,xen-python"
>
> -PACKAGES += "${PN}-python-dbg ${PN}-python"
> -FILES_${PN}-python-dbg += "${libdir}/${PYTHON_DIR}/dist-packages/.debug/"
> -FILES_${PN}-python += "${libdir}/${PYTHON_DIR}/dist-packages"
> +PACKAGES += "${PN}-python-staticdev ${PN}-python-dev ${PN}-python-dbg ${PN}-python"
> +FILES_${PN}-python-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
> +FILES_${PN}-python-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
> +FILES_${PN}-python-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
> +FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}"
> diff --git a/recipes-extended/libvirt/libvirt_1.0.3.bb b/recipes-extended/libvirt/libvirt_1.0.3.bb
> index c1c000e..33087ce 100644
> --- a/recipes-extended/libvirt/libvirt_1.0.3.bb
> +++ b/recipes-extended/libvirt/libvirt_1.0.3.bb
> @@ -106,7 +106,7 @@ INITSCRIPT_PARAMS_${PN}-libvirtd = "defaults 72"
>
>  # full config
>  PACKAGECONFIG ??= "qemu yajl xen libxl xen-inotify uml openvz vmware vbox esx \
> -                  polkit lxc test remote macvtap libvirtd netcf"
> +                  polkit lxc test remote macvtap libvirtd netcf python"
>
>  PACKAGECONFIG[qemu] = "--with-qemu,--without-qemu,qemu"
>  PACKAGECONFIG[yajl] = "--with-yajl,--without-yajl,yajl,yajl"
> --
> 1.7.10.4
>
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization



--
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] fix libvirt-python build problem
  2013-05-02 20:37 ` Bruce Ashfield
@ 2013-05-03 13:19   ` Yao Zhao
  0 siblings, 0 replies; 5+ messages in thread
From: Yao Zhao @ 2013-05-03 13:19 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: meta-virtualization@yoctoproject.org

On 13-05-02 04:37 PM, Bruce Ashfield wrote:
> What's the head of your meta-virtualization ? It looks like you are missing:
>
> commit 7040db74c375ef55d1b040f53071be29590882de
> Author: Mihai Prica <mihai.prica@intel.com>
> Date:   Thu Apr 18 18:10:42 2013 +0300
>
>      libvirt: Changed python bindings install location
>
>      The libvirt-python files were installed to dist-packages and this
>      is not part of sys.path in yocto so they were not available to
>      python. Changed this to site-packages.
>
>      Signed-off-by: Mihai Prica <mihai.prica@intel.com>
>      Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
>
> After that change, the following line in your patch fails:
>
> -FILES_${PN}-python-dbg += "${libdir}/${PYTHON_DIR}/dist-packages/.debug/"
>
> Since the line is now:
>
> FILES_${PN}-python-dbg += "${libdir}/${PYTHON_DIR}/site-packages/.debug/"
>
> Can you double check and resend ?
Sorry, I was confused by so many branches.
I will update accordingly.
> At the same time, can you also update the log to show the "build problem" that
> the patch is fixing?
ok.

yao
> Cheers,
>
> Bruce
>
>
> On Thu, May 2, 2013 at 3:18 PM, Yao Zhao <yao.zhao@windriver.com> wrote:
>> remove python_incdir.patch and inherit pythonnative.
>> use PACKAGECONFIG instead of EXTRA_OECONF.
>> enable python in full PACKAGECONFIG.
>>
>> Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
>> ---
>>   recipes-extended/libvirt/libvirt-python.inc |   21 ++++++++++++---------
>>   recipes-extended/libvirt/libvirt_1.0.3.bb   |    2 +-
>>   2 files changed, 13 insertions(+), 10 deletions(-)
>>
>> diff --git a/recipes-extended/libvirt/libvirt-python.inc b/recipes-extended/libvirt/libvirt-python.inc
>> index 49d15fb..d4cc5f3 100644
>> --- a/recipes-extended/libvirt/libvirt-python.inc
>> +++ b/recipes-extended/libvirt/libvirt-python.inc
>> @@ -1,14 +1,17 @@
>> -inherit python-dir
>> +inherit pythonnative python-dir
>>
>> -# Enable the Python tool support
>> -EXTRA_OECONF += "--with-python=yes --with-python-inc-dir=-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}"
>> +export STAGING_INCDIR
>> +export STAGING_LIBDIR
>> +export BUILD_SYS
>> +export HOST_SYS
>>
>> -SRC_URI += " file://python_incdir.patch"
>> -
>> -DEPENDS  += "python python-native"
>> +PACKAGECONFIG += "python"
>> +PACKAGECONFIG[python] = "--with-python,--without-python,python,"
>>   RDEPENDS_${PN}-python += "python"
>>   PACKAGECONFIG_${PN}-python[xen] = ",,,xen-python"
>>
>> -PACKAGES += "${PN}-python-dbg ${PN}-python"
>> -FILES_${PN}-python-dbg += "${libdir}/${PYTHON_DIR}/dist-packages/.debug/"
>> -FILES_${PN}-python += "${libdir}/${PYTHON_DIR}/dist-packages"
>> +PACKAGES += "${PN}-python-staticdev ${PN}-python-dev ${PN}-python-dbg ${PN}-python"
>> +FILES_${PN}-python-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
>> +FILES_${PN}-python-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
>> +FILES_${PN}-python-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
>> +FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}"
>> diff --git a/recipes-extended/libvirt/libvirt_1.0.3.bb b/recipes-extended/libvirt/libvirt_1.0.3.bb
>> index c1c000e..33087ce 100644
>> --- a/recipes-extended/libvirt/libvirt_1.0.3.bb
>> +++ b/recipes-extended/libvirt/libvirt_1.0.3.bb
>> @@ -106,7 +106,7 @@ INITSCRIPT_PARAMS_${PN}-libvirtd = "defaults 72"
>>
>>   # full config
>>   PACKAGECONFIG ??= "qemu yajl xen libxl xen-inotify uml openvz vmware vbox esx \
>> -                  polkit lxc test remote macvtap libvirtd netcf"
>> +                  polkit lxc test remote macvtap libvirtd netcf python"
>>
>>   PACKAGECONFIG[qemu] = "--with-qemu,--without-qemu,qemu"
>>   PACKAGECONFIG[yajl] = "--with-yajl,--without-yajl,yajl,yajl"
>> --
>> 1.7.10.4
>>
>> _______________________________________________
>> meta-virtualization mailing list
>> meta-virtualization@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-virtualization
>
>
> --
> "Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end"



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] fix libvirt-python build problem
@ 2013-05-03 18:28 Yao Zhao
  2013-05-03 19:23 ` Bruce Ashfield
  0 siblings, 1 reply; 5+ messages in thread
From: Yao Zhao @ 2013-05-03 18:28 UTC (permalink / raw)
  To: meta-virtualization

The current libvirt's config.log:
configure:65065: checking for python
configure:65083: found /usr/bin/python
configure:65095: result: /usr/bin/python
configure:65116: checking for python version
configure:65123: result: 2.7
configure:65137: checking for python platform
configure:65144: result: linux2
configure:65170: checking for python script directory
configure:65206: result: ${prefix}/lib/python2.7/dist-packages
configure:65215: checking for python extension module directory
configure:65251: result: ${exec_prefix}/lib/python2.7/dist-packages

so it will use host python which may quite different with target python.

remove python_incdir.patch and inherit pythonnative.
use PACKAGECONFIG instead of EXTRA_OECONF.
enable python in full PACKAGECONFIG.

Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
---
 recipes-extended/libvirt/libvirt-python.inc        |   21 +++---
 .../libvirt/libvirt/python_incdir.patch            |   71 --------------------
 recipes-extended/libvirt/libvirt_1.0.3.bb          |    2 +-
 3 files changed, 13 insertions(+), 81 deletions(-)
 delete mode 100644 recipes-extended/libvirt/libvirt/python_incdir.patch

diff --git a/recipes-extended/libvirt/libvirt-python.inc b/recipes-extended/libvirt/libvirt-python.inc
index 297e90c..d4cc5f3 100644
--- a/recipes-extended/libvirt/libvirt-python.inc
+++ b/recipes-extended/libvirt/libvirt-python.inc
@@ -1,14 +1,17 @@
-inherit python-dir
+inherit pythonnative python-dir
 
-# Enable the Python tool support
-EXTRA_OECONF += "--with-python=yes --with-python-inc-dir=-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}"
+export STAGING_INCDIR
+export STAGING_LIBDIR
+export BUILD_SYS 
+export HOST_SYS
 
-SRC_URI += " file://python_incdir.patch"
-
-DEPENDS  += "python python-native"
+PACKAGECONFIG += "python"
+PACKAGECONFIG[python] = "--with-python,--without-python,python,"
 RDEPENDS_${PN}-python += "python"
 PACKAGECONFIG_${PN}-python[xen] = ",,,xen-python"
 
-PACKAGES += "${PN}-python-dbg ${PN}-python"
-FILES_${PN}-python-dbg += "${libdir}/${PYTHON_DIR}/site-packages/.debug/"
-FILES_${PN}-python += "${libdir}/${PYTHON_DIR}/site-packages"
+PACKAGES += "${PN}-python-staticdev ${PN}-python-dev ${PN}-python-dbg ${PN}-python"
+FILES_${PN}-python-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
+FILES_${PN}-python-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
+FILES_${PN}-python-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
+FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}"
diff --git a/recipes-extended/libvirt/libvirt/python_incdir.patch b/recipes-extended/libvirt/libvirt/python_incdir.patch
deleted file mode 100644
index 5b78c13..0000000
--- a/recipes-extended/libvirt/libvirt/python_incdir.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-Index: libvirt-1.0.3/configure.ac
-===================================================================
---- libvirt-1.0.3.orig/configure.ac
-+++ libvirt-1.0.3/configure.ac
-@@ -1878,6 +1878,11 @@ fi
- 
- PYTHON_VERSION=
- PYTHON_INCLUDES=
-+
-+AC_ARG_WITH(python-inc-dir,
-+  AS_HELP_STRING([--with-python-inc-dir=DIR], [directory with Python include files]),
-+   [PYTHON_INCLUDES="${withval}"], [])
-+   
- if test "$with_python" != "no" ; then
-     if test -x "$with_python/bin/python"
-     then
-@@ -1901,31 +1906,32 @@ if test "$with_python" != "no" ; then
- 
-     if test "$with_python" = "yes" ; then
-         AM_PATH_PYTHON(,, [:])
--
-+        pyexecdir=$prefix/lib/python$PYTHON_VERSION/site-packages
-         if test "$PYTHON" != : ; then
--            PYTHON_CONFIG="$PYTHON-config"
--
--            if test -x "$PYTHON_CONFIG"
--            then
--                PYTHON_INCLUDES=`$PYTHON_CONFIG --includes`
--            else
--                if test -r $PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION/Python.h
--                then
--                    PYTHON_INCLUDES=-I$PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION
--                else
--                    if test -r $prefix/include/python$PYTHON_VERSION/Python.h
--                    then
--                        PYTHON_INCLUDES=-I$prefix/include/python$PYTHON_VERSION
--                    else
--                        if test -r /usr/include/python$PYTHON_VERSION/Python.h
--                        then
--                            PYTHON_INCLUDES=-I/usr/include/python$PYTHON_VERSION
--                        else
--                            AC_MSG_ERROR([You must install python-devel to build Python bindings])
--                        fi
-+            if ! test -n "$PYTHON_INCLUDES"; then
-+              PYTHON_CONFIG="$PYTHON-config"
-+              if test -x "$PYTHON_CONFIG"
-+              then
-+                  PYTHON_INCLUDES=`$PYTHON_CONFIG --includes`
-+              else
-+                  if test -r $PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION/Python.h
-+                  then
-+                      PYTHON_INCLUDES=-I$PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION
-+                  else
-+                      if test -r $prefix/include/python$PYTHON_VERSION/Python.h
-+                      then
-+                          PYTHON_INCLUDES=-I$prefix/include/python$PYTHON_VERSION
-+                      else
-+                          if test -r /usr/include/python$PYTHON_VERSION/Python.h
-+                          then
-+                              PYTHON_INCLUDES=-I/usr/include/python$PYTHON_VERSION
-+                          else
-+                              AC_MSG_ERROR([You must install python-devel to build Python bindings])
-+                          fi
-+                       fi
-                     fi
-                 fi
--            fi
-+             fi
-         else
-             AC_MSG_ERROR([You must install python to build Python bindings])
-         fi
diff --git a/recipes-extended/libvirt/libvirt_1.0.3.bb b/recipes-extended/libvirt/libvirt_1.0.3.bb
index f341924..88cb018 100644
--- a/recipes-extended/libvirt/libvirt_1.0.3.bb
+++ b/recipes-extended/libvirt/libvirt_1.0.3.bb
@@ -106,7 +106,7 @@ INITSCRIPT_PARAMS_${PN}-libvirtd = "defaults 72"
 
 # full config
 PACKAGECONFIG ??= "qemu yajl xen libxl xen-inotify uml openvz vmware vbox esx \
-	           polkit lxc test remote macvtap libvirtd netcf udev"
+	           polkit lxc test remote macvtap libvirtd netcf udev python"
 
 PACKAGECONFIG[qemu] = "--with-qemu,--without-qemu,qemu"
 PACKAGECONFIG[yajl] = "--with-yajl,--without-yajl,yajl,yajl"
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] fix libvirt-python build problem
  2013-05-03 18:28 Yao Zhao
@ 2013-05-03 19:23 ` Bruce Ashfield
  0 siblings, 0 replies; 5+ messages in thread
From: Bruce Ashfield @ 2013-05-03 19:23 UTC (permalink / raw)
  To: Yao Zhao; +Cc: meta-virtualization@yoctoproject.org

On Fri, May 3, 2013 at 2:28 PM, Yao Zhao <yao.zhao@windriver.com> wrote:
> The current libvirt's config.log:
> configure:65065: checking for python
> configure:65083: found /usr/bin/python
> configure:65095: result: /usr/bin/python
> configure:65116: checking for python version
> configure:65123: result: 2.7
> configure:65137: checking for python platform
> configure:65144: result: linux2
> configure:65170: checking for python script directory
> configure:65206: result: ${prefix}/lib/python2.7/dist-packages
> configure:65215: checking for python extension module directory
> configure:65251: result: ${exec_prefix}/lib/python2.7/dist-packages

Great! Thanks Yao,

I'll stage this change and push it out shortly.

Bruce

>
> so it will use host python which may quite different with target python.
>
> remove python_incdir.patch and inherit pythonnative.
> use PACKAGECONFIG instead of EXTRA_OECONF.
> enable python in full PACKAGECONFIG.
>
> Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
> ---
>  recipes-extended/libvirt/libvirt-python.inc        |   21 +++---
>  .../libvirt/libvirt/python_incdir.patch            |   71 --------------------
>  recipes-extended/libvirt/libvirt_1.0.3.bb          |    2 +-
>  3 files changed, 13 insertions(+), 81 deletions(-)
>  delete mode 100644 recipes-extended/libvirt/libvirt/python_incdir.patch
>
> diff --git a/recipes-extended/libvirt/libvirt-python.inc b/recipes-extended/libvirt/libvirt-python.inc
> index 297e90c..d4cc5f3 100644
> --- a/recipes-extended/libvirt/libvirt-python.inc
> +++ b/recipes-extended/libvirt/libvirt-python.inc
> @@ -1,14 +1,17 @@
> -inherit python-dir
> +inherit pythonnative python-dir
>
> -# Enable the Python tool support
> -EXTRA_OECONF += "--with-python=yes --with-python-inc-dir=-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}"
> +export STAGING_INCDIR
> +export STAGING_LIBDIR
> +export BUILD_SYS
> +export HOST_SYS
>
> -SRC_URI += " file://python_incdir.patch"
> -
> -DEPENDS  += "python python-native"
> +PACKAGECONFIG += "python"
> +PACKAGECONFIG[python] = "--with-python,--without-python,python,"
>  RDEPENDS_${PN}-python += "python"
>  PACKAGECONFIG_${PN}-python[xen] = ",,,xen-python"
>
> -PACKAGES += "${PN}-python-dbg ${PN}-python"
> -FILES_${PN}-python-dbg += "${libdir}/${PYTHON_DIR}/site-packages/.debug/"
> -FILES_${PN}-python += "${libdir}/${PYTHON_DIR}/site-packages"
> +PACKAGES += "${PN}-python-staticdev ${PN}-python-dev ${PN}-python-dbg ${PN}-python"
> +FILES_${PN}-python-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
> +FILES_${PN}-python-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
> +FILES_${PN}-python-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
> +FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}"
> diff --git a/recipes-extended/libvirt/libvirt/python_incdir.patch b/recipes-extended/libvirt/libvirt/python_incdir.patch
> deleted file mode 100644
> index 5b78c13..0000000
> --- a/recipes-extended/libvirt/libvirt/python_incdir.patch
> +++ /dev/null
> @@ -1,71 +0,0 @@
> -Index: libvirt-1.0.3/configure.ac
> -===================================================================
> ---- libvirt-1.0.3.orig/configure.ac
> -+++ libvirt-1.0.3/configure.ac
> -@@ -1878,6 +1878,11 @@ fi
> -
> - PYTHON_VERSION=
> - PYTHON_INCLUDES=
> -+
> -+AC_ARG_WITH(python-inc-dir,
> -+  AS_HELP_STRING([--with-python-inc-dir=DIR], [directory with Python include files]),
> -+   [PYTHON_INCLUDES="${withval}"], [])
> -+
> - if test "$with_python" != "no" ; then
> -     if test -x "$with_python/bin/python"
> -     then
> -@@ -1901,31 +1906,32 @@ if test "$with_python" != "no" ; then
> -
> -     if test "$with_python" = "yes" ; then
> -         AM_PATH_PYTHON(,, [:])
> --
> -+        pyexecdir=$prefix/lib/python$PYTHON_VERSION/site-packages
> -         if test "$PYTHON" != : ; then
> --            PYTHON_CONFIG="$PYTHON-config"
> --
> --            if test -x "$PYTHON_CONFIG"
> --            then
> --                PYTHON_INCLUDES=`$PYTHON_CONFIG --includes`
> --            else
> --                if test -r $PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION/Python.h
> --                then
> --                    PYTHON_INCLUDES=-I$PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION
> --                else
> --                    if test -r $prefix/include/python$PYTHON_VERSION/Python.h
> --                    then
> --                        PYTHON_INCLUDES=-I$prefix/include/python$PYTHON_VERSION
> --                    else
> --                        if test -r /usr/include/python$PYTHON_VERSION/Python.h
> --                        then
> --                            PYTHON_INCLUDES=-I/usr/include/python$PYTHON_VERSION
> --                        else
> --                            AC_MSG_ERROR([You must install python-devel to build Python bindings])
> --                        fi
> -+            if ! test -n "$PYTHON_INCLUDES"; then
> -+              PYTHON_CONFIG="$PYTHON-config"
> -+              if test -x "$PYTHON_CONFIG"
> -+              then
> -+                  PYTHON_INCLUDES=`$PYTHON_CONFIG --includes`
> -+              else
> -+                  if test -r $PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION/Python.h
> -+                  then
> -+                      PYTHON_INCLUDES=-I$PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION
> -+                  else
> -+                      if test -r $prefix/include/python$PYTHON_VERSION/Python.h
> -+                      then
> -+                          PYTHON_INCLUDES=-I$prefix/include/python$PYTHON_VERSION
> -+                      else
> -+                          if test -r /usr/include/python$PYTHON_VERSION/Python.h
> -+                          then
> -+                              PYTHON_INCLUDES=-I/usr/include/python$PYTHON_VERSION
> -+                          else
> -+                              AC_MSG_ERROR([You must install python-devel to build Python bindings])
> -+                          fi
> -+                       fi
> -                     fi
> -                 fi
> --            fi
> -+             fi
> -         else
> -             AC_MSG_ERROR([You must install python to build Python bindings])
> -         fi
> diff --git a/recipes-extended/libvirt/libvirt_1.0.3.bb b/recipes-extended/libvirt/libvirt_1.0.3.bb
> index f341924..88cb018 100644
> --- a/recipes-extended/libvirt/libvirt_1.0.3.bb
> +++ b/recipes-extended/libvirt/libvirt_1.0.3.bb
> @@ -106,7 +106,7 @@ INITSCRIPT_PARAMS_${PN}-libvirtd = "defaults 72"
>
>  # full config
>  PACKAGECONFIG ??= "qemu yajl xen libxl xen-inotify uml openvz vmware vbox esx \
> -                  polkit lxc test remote macvtap libvirtd netcf udev"
> +                  polkit lxc test remote macvtap libvirtd netcf udev python"
>
>  PACKAGECONFIG[qemu] = "--with-qemu,--without-qemu,qemu"
>  PACKAGECONFIG[yajl] = "--with-yajl,--without-yajl,yajl,yajl"
> --
> 1.7.10.4
>
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization



--
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-05-03 19:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-02 19:18 [PATCH] fix libvirt-python build problem Yao Zhao
2013-05-02 20:37 ` Bruce Ashfield
2013-05-03 13:19   ` Yao Zhao
  -- strict thread matches above, loose matches on Subject: below --
2013-05-03 18:28 Yao Zhao
2013-05-03 19:23 ` Bruce Ashfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.