[oe] [meta-python][PATCH 3/4] python3-pyudev: add a python3 recipe

Hongxu Jia hongxu.jia at windriver.com
Fri May 26 07:37:31 UTC 2017


- Split to a common python-pyudev.inc for python2 and python3

- The contextlib module is moved to python3-lang.

Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
---
 .../recipes-devtools/python/python-pyudev.inc      | 19 +++++++++++++++++++
 .../python/python-pyudev_0.21.0.bb                 | 22 ++++------------------
 .../python/python3-pyudev_0.21.0.bb                |  8 ++++++++
 3 files changed, 31 insertions(+), 18 deletions(-)
 create mode 100644 meta-python/recipes-devtools/python/python-pyudev.inc
 create mode 100644 meta-python/recipes-devtools/python/python3-pyudev_0.21.0.bb

diff --git a/meta-python/recipes-devtools/python/python-pyudev.inc b/meta-python/recipes-devtools/python/python-pyudev.inc
new file mode 100644
index 0000000..ab4c5fd
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python-pyudev.inc
@@ -0,0 +1,19 @@
+SUMMARY = "A libudev binding"
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
+
+SRC_URI[md5sum] = "cf4d9db7d772622144ca1be6b5d9353b"
+SRC_URI[sha256sum] = "094b7a100150114748aaa3b70663485dd360457a709bfaaafe5a977371033f2b"
+
+do_configure_prepend() {
+    sed -i "/import pyudev/d" ${S}/setup.py
+    sed -i "s/str(pyudev.__version__)/'${PV}'/g" ${S}/setup.py
+}
+
+RDEPENDS_${PN} = "\
+    ${PYTHON_PN}-ctypes \
+    ${PYTHON_PN}-misc \
+    ${PYTHON_PN}-six \
+    ${PYTHON_PN}-subprocess \
+    ${PYTHON_PN}-threading \
+"
diff --git a/meta-python/recipes-devtools/python/python-pyudev_0.21.0.bb b/meta-python/recipes-devtools/python/python-pyudev_0.21.0.bb
index b0a1acb..32573b7 100644
--- a/meta-python/recipes-devtools/python/python-pyudev_0.21.0.bb
+++ b/meta-python/recipes-devtools/python/python-pyudev_0.21.0.bb
@@ -1,22 +1,8 @@
-SUMMARY = "A libudev binding"
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
-
-SRC_URI[md5sum] = "cf4d9db7d772622144ca1be6b5d9353b"
-SRC_URI[sha256sum] = "094b7a100150114748aaa3b70663485dd360457a709bfaaafe5a977371033f2b"
-
-inherit pypi setuptools
-
-do_configure_prepend() {
-    sed -i "/import pyudev/d" ${S}/setup.py
-    sed -i "s/str(pyudev.__version__)/'${PV}'/g" ${S}/setup.py
-}
+require python-pyudev.inc
 
 RDEPENDS_${PN} = "\
     ${PYTHON_PN}-contextlib \
-    ${PYTHON_PN}-ctypes \
-    ${PYTHON_PN}-misc \
-    ${PYTHON_PN}-six \
-    ${PYTHON_PN}-subprocess \
-    ${PYTHON_PN}-threading \
 "
+
+inherit pypi setuptools
+
diff --git a/meta-python/recipes-devtools/python/python3-pyudev_0.21.0.bb b/meta-python/recipes-devtools/python/python3-pyudev_0.21.0.bb
new file mode 100644
index 0000000..0292555
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pyudev_0.21.0.bb
@@ -0,0 +1,8 @@
+require python-pyudev.inc
+
+RDEPENDS_${PN} = "\
+    ${PYTHON_PN}-lang \
+"
+
+inherit pypi setuptools3
+
-- 
2.8.1




More information about the Openembedded-devel mailing list