Patchwork [meta-oe,PATCHv2,1/4] python-pyudev: Add version 0.11 (initial recipe)

login
register
mail settings
Submitter Michael Lippautz
Date July 7, 2011, 1:35 p.m.
Message ID <50751d1b7570089f6aba5072807372c7a31be373.1310045515.git.michael.lippautz@gmail.com>
Download mbox | patch
Permalink /patch/7133/
State Accepted
Commit 32626159e648e7b0b7ab9956c2fc8b91bb1e645c
Headers show

Comments

Michael Lippautz - July 7, 2011, 1:35 p.m.
Signed-off-by: Michael Lippautz <michael.lippautz@gmail.com>
---
 .../recipes-devtools/python/python-pyudev_0.11.bb  |   22 ++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)
 create mode 100644 meta-oe/recipes-devtools/python/python-pyudev_0.11.bb
Paul Menzel - July 7, 2011, 6:06 p.m.
Am Donnerstag, den 07.07.2011, 15:35 +0200 schrieb Michael Lippautz:
> Signed-off-by: Michael Lippautz <michael.lippautz@gmail.com>
> ---
>  .../recipes-devtools/python/python-pyudev_0.11.bb  |   22 ++++++++++++++++++++
>  1 files changed, 22 insertions(+), 0 deletions(-)
>  create mode 100644 meta-oe/recipes-devtools/python/python-pyudev_0.11.bb
> 
> diff --git a/meta-oe/recipes-devtools/python/python-pyudev_0.11.bb b/meta-oe/recipes-devtools/python/python-pyudev_0.11.bb
> new file mode 100644
> index 0000000..03a948a
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/python/python-pyudev_0.11.bb
> @@ -0,0 +1,22 @@
> +DESCRIPTION = "A libudev binding"
> +HOMEPAGE = "http://pypi.python.org/pypi/pyudev"
> +SECTION = "devel/python"
> +LICENSE = "GPLv2"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
> +PR = "r0"
> +
> +SRCNAME = "pyudev"
> +SRC_URI = "http://pypi.python.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
> +SRC_URI[md5sum] = "dca4e69da387f9a6683ee4b5c27ca66a"
> +SRC_URI[sha256sum] = "0acfa500219f4bcf711f35c1b2041d035b4bf5f302eca5038572ee788d9e584a"
> +
> +S = "${WORKDIR}/${SRCNAME}-${PV}"
> +
> +inherit setuptools
> +
> +RDEPENDS_${PN} = "\
> +  python-ctypes \
> +  python-subprocess \
> +  python-misc \
> +  libudev \
> +"

I backported your patch locally to oe-dev and it fails with the
following error message.

        + /oe/build-angstrom-next/angstrom-dev/sysroots/i686-linux/usr/bin/python setup.py build
        Traceback (most recent call last):
          File "setup.py", line 34, in <module>
            import pyudev
          File "/oe/build-angstrom-next/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/python-pyudev-0.11-r0/pyudev-0.11/pyudev/__init__.py", line 177, in <module>
            from pyudev.device import *
          File "/oe/build-angstrom-next/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/python-pyudev-0.11-r0/pyudev-0.11/pyudev/device.py", line 35, in <module>
            from pyudev._libudev import libudev
          File "/oe/build-angstrom-next/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/python-pyudev-0.11-r0/pyudev-0.11/pyudev/_libudev.py", line 35, in <module>
            from ctypes import (CDLL, Structure, POINTER, get_errno,
          File "/oe/build-angstrom-next/angstrom-dev/sysroots/i686-linux/usr/lib/python2.6/ctypes/__init__.py", line 10, in <module>
            from _ctypes import Union, Structure, Array
        ImportError: No module named _ctypes
        + oefatal 'python setup.py build_ext execution failed.'
        + echo FATAL: 'python setup.py build_ext execution failed.'
        FATAL: python setup.py build_ext execution failed.
        + exit 1

`ctype` is available though.


Thanks,

Paul
Michael Lippautz - July 8, 2011, 10:09 a.m.
2011/7/7 Paul Menzel <paulepanter@users.sourceforge.net>:
> Am Donnerstag, den 07.07.2011, 15:35 +0200 schrieb Michael Lippautz:
>> Signed-off-by: Michael Lippautz <michael.lippautz@gmail.com>
>> ---
>>  .../recipes-devtools/python/python-pyudev_0.11.bb  |   22 ++++++++++++++++++++
>>  1 files changed, 22 insertions(+), 0 deletions(-)
>>  create mode 100644 meta-oe/recipes-devtools/python/python-pyudev_0.11.bb
>>
>> diff --git a/meta-oe/recipes-devtools/python/python-pyudev_0.11.bb b/meta-oe/recipes-devtools/python/python-pyudev_0.11.bb
>> new file mode 100644
>> index 0000000..03a948a
>> --- /dev/null
>> +++ b/meta-oe/recipes-devtools/python/python-pyudev_0.11.bb
>> @@ -0,0 +1,22 @@
>> +DESCRIPTION = "A libudev binding"
>> +HOMEPAGE = "http://pypi.python.org/pypi/pyudev"
>> +SECTION = "devel/python"
>> +LICENSE = "GPLv2"
>> +LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
>> +PR = "r0"
>> +
>> +SRCNAME = "pyudev"
>> +SRC_URI = "http://pypi.python.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
>> +SRC_URI[md5sum] = "dca4e69da387f9a6683ee4b5c27ca66a"
>> +SRC_URI[sha256sum] = "0acfa500219f4bcf711f35c1b2041d035b4bf5f302eca5038572ee788d9e584a"
>> +
>> +S = "${WORKDIR}/${SRCNAME}-${PV}"
>> +
>> +inherit setuptools
>> +
>> +RDEPENDS_${PN} = "\
>> +  python-ctypes \
>> +  python-subprocess \
>> +  python-misc \
>> +  libudev \
>> +"
>
> I backported your patch locally to oe-dev and it fails with the
> following error message.
>
>        + /oe/build-angstrom-next/angstrom-dev/sysroots/i686-linux/usr/bin/python setup.py build
>        Traceback (most recent call last):
>          File "setup.py", line 34, in <module>
>            import pyudev
>          File "/oe/build-angstrom-next/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/python-pyudev-0.11-r0/pyudev-0.11/pyudev/__init__.py", line 177, in <module>
>            from pyudev.device import *
>          File "/oe/build-angstrom-next/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/python-pyudev-0.11-r0/pyudev-0.11/pyudev/device.py", line 35, in <module>
>            from pyudev._libudev import libudev
>          File "/oe/build-angstrom-next/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/python-pyudev-0.11-r0/pyudev-0.11/pyudev/_libudev.py", line 35, in <module>
>            from ctypes import (CDLL, Structure, POINTER, get_errno,
>          File "/oe/build-angstrom-next/angstrom-dev/sysroots/i686-linux/usr/lib/python2.6/ctypes/__init__.py", line 10, in <module>
>            from _ctypes import Union, Structure, Array
>        ImportError: No module named _ctypes
>        + oefatal 'python setup.py build_ext execution failed.'
>        + echo FATAL: 'python setup.py build_ext execution failed.'
>        FATAL: python setup.py build_ext execution failed.
>        + exit 1
>
> `ctype` is available though.
>
>
> Thanks,
>
> Paul
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>
>

You do not only need `ctypes' for the target, but also for the host
system. You could try to backport also [1], but I don't know whether
that's possible, since I am no longer using oe.dev (layers instead).

Regards,
Michael

[1] http://cgit.openembedded.net/cgit.cgi/openembedded-core/commit/?id=58f8eb15eea892b2694478bbc71e8c907014509b

Patch

diff --git a/meta-oe/recipes-devtools/python/python-pyudev_0.11.bb b/meta-oe/recipes-devtools/python/python-pyudev_0.11.bb
new file mode 100644
index 0000000..03a948a
--- /dev/null
+++ b/meta-oe/recipes-devtools/python/python-pyudev_0.11.bb
@@ -0,0 +1,22 @@ 
+DESCRIPTION = "A libudev binding"
+HOMEPAGE = "http://pypi.python.org/pypi/pyudev"
+SECTION = "devel/python"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
+PR = "r0"
+
+SRCNAME = "pyudev"
+SRC_URI = "http://pypi.python.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
+SRC_URI[md5sum] = "dca4e69da387f9a6683ee4b5c27ca66a"
+SRC_URI[sha256sum] = "0acfa500219f4bcf711f35c1b2041d035b4bf5f302eca5038572ee788d9e584a"
+
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit setuptools
+
+RDEPENDS_${PN} = "\
+  python-ctypes \
+  python-subprocess \
+  python-misc \
+  libudev \
+"