Skip to contentSkip to conversation

python3-robotframework-seriallibrary: Backport a patch to fix py3 build

PATCH New Khem Raj 1 participant 7 messages Jan 22, 2020

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/7 python3-robotframework-seriallibrary: Backport a patch to fix py3 build

---
 ...5fdf2ea00ac6349e64580a20816783064dd4.patch | 45 +++++++++++++++++++
 ...hon3-robotframework-seriallibrary_0.3.1.bb | 20 ++++++++-
 2 files changed, 64 insertions(+), 1 deletion(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-robotframework-seriallibrary/e31d5fdf2ea00ac6349e64580a20816783064dd4.patch
meta-python/recipes-devtools/python/python3-robotframework-seriallibrary/e31d5fdf2ea00ac6349e64580a20816783064dd4.patch new file +45 -0
new file mode 100644
index 0000000000..21e97fd93a
@@ -0,0 +1,45 @@
+From e31d5fdf2ea00ac6349e64580a20816783064dd4 Mon Sep 17 00:00:00 2001
+From: Hideki Takeoka <[email protected]>
+Date: Sun, 25 Aug 2019 19:25:00 +0200
+Subject: [PATCH] Update setup.py for python3.7+ support
+
+---
+ setup.py                     | 9 +++++----
+ src/SerialLibrary/version.py | 3 +++
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 4c34705..70bb1af 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1,6 +1,5 @@
+ #!/usr/bin/env python
+ 
+-from imp import load_source
+ from os.path import abspath, dirname, join
+ from sys import platform
+ 
+@@ -18,9 +17,11 @@
+ 
+ 
+ CURDIR = dirname(abspath(__file__))
+-VERSION = load_source(
+-    'version', 'version',
+-    open(join(CURDIR, 'src', 'SerialLibrary', 'version.py'))).VERSION
++
++with open(join(CURDIR, 'src', 'SerialLibrary', 'version.py')) as f:
++    exec(f.read())
++    VERSION = get_version()
++
+ README = open(join(CURDIR, 'README.rst')).read()
+ CLASSIFIERS = '\n'.join(
+     map(' :: '.join, [
+diff --git a/src/SerialLibrary/version.py b/src/SerialLibrary/version.py
+index 6ce65c4..19831bc 100644
+--- a/src/SerialLibrary/version.py
++++ b/src/SerialLibrary/version.py
+@@ -1 +1,4 @@
+ VERSION = (0, 3, 1)
++
++def get_version():
++    return VERSION;
meta-python/recipes-devtools/python/python3-robotframework-seriallibrary_0.3.1.bb +19 -1
index d82b7b96ae..b6de42f7c1 100644
@@ -1,2 +1,20 @@
+SUMMARY = "Robot Framework test library for serial connection"
+HOMEPAGE = "https://github.com/whosaysni/robotframework-seriallibrary"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=7145f7cdd263359b62d342a02f005515"
+
+SRC_URI[md5sum] = "b7c9565d54c30df7cd3f3c0e29adffa3"
+SRC_URI[sha256sum] = "256ad60fc0b7df4be44d82c302f5ed8fad4935cda99e4b45942e3c88179d1e19"
+
+PYPI_PACKAGE = "robotframework-seriallibrary"
+
 inherit pypi setuptools3
-require python-robotframework-seriallibrary.inc
+
+SRC_URI += "file://e31d5fdf2ea00ac6349e64580a20816783064dd4.patch"
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-pyserial \
+    ${PYTHON_PN}-robotframework \
+"
+
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.25.0
author
#1 lore raw

PATCH 2/7 telepathy-python: Rename to telepathy-python3

This avoid recipe conflict with py2 version and adjust to delete __pycache__ files which are py3 specific

---
 .../parallel_make.patch                              |  0
 .../remove_duplicate_install.patch                   |  0
 .../telepathy-python_fix_for_automake_1.12.patch     |  0
 ...ython_0.15.19.bb => telepathy-python3_0.15.19.bb} | 12 +++++++-----
 4 files changed, 7 insertions(+), 5 deletions(-)
 rename meta-python/recipes-connectivity/telepathy/{telepathy-python-0.15.19 => telepathy-python3-0.15.19}/parallel_make.patch (100%)
 rename meta-python/recipes-connectivity/telepathy/{telepathy-python-0.15.19 => telepathy-python3-0.15.19}/remove_duplicate_install.patch (100%)
 rename meta-python/recipes-connectivity/telepathy/{telepathy-python-0.15.19 => telepathy-python3-0.15.19}/telepathy-python_fix_for_automake_1.12.patch (100%)
 rename meta-python/recipes-connectivity/telepathy/{telepathy-python_0.15.19.bb => telepathy-python3_0.15.19.bb} (66%)
meta-python/recipes-connectivity/telepathy/telepathy-python3-0.15.19/parallel_make.patch renamed from meta-python/recipes-connectivity/telepathy/telepathy-python-0.15.19/parallel_make.patch +0 -0
similarity index 100%
rename from meta-python/recipes-connectivity/telepathy/telepathy-python-0.15.19/parallel_make.patch
rename to meta-python/recipes-connectivity/telepathy/telepathy-python3-0.15.19/parallel_make.patch
meta-python/recipes-connectivity/telepathy/telepathy-python3-0.15.19/remove_duplicate_install.patch renamed from meta-python/recipes-connectivity/telepathy/telepathy-python-0.15.19/remove_duplicate_install.patch +0 -0
similarity index 100%
rename from meta-python/recipes-connectivity/telepathy/telepathy-python-0.15.19/remove_duplicate_install.patch
rename to meta-python/recipes-connectivity/telepathy/telepathy-python3-0.15.19/remove_duplicate_install.patch
meta-python/recipes-connectivity/telepathy/telepathy-python3-0.15.19/telepathy-python_fix_for_automake_1.12.patch renamed from meta-python/recipes-connectivity/telepathy/telepathy-python-0.15.19/telepathy-python_fix_for_automake_1.12.patch +0 -0
similarity index 100%
rename from meta-python/recipes-connectivity/telepathy/telepathy-python-0.15.19/telepathy-python_fix_for_automake_1.12.patch
rename to meta-python/recipes-connectivity/telepathy/telepathy-python3-0.15.19/telepathy-python_fix_for_automake_1.12.patch
meta-python/recipes-connectivity/telepathy/telepathy-python3_0.15.19.bb renamed from meta-python/recipes-connectivity/telepathy/telepathy-python_0.15.19.bb +7 -5
similarity index 66%
rename from meta-python/recipes-connectivity/telepathy/telepathy-python_0.15.19.bb
rename to meta-python/recipes-connectivity/telepathy/telepathy-python3_0.15.19.bb
index 2e8da0805d..11ac0d93a1 100644
@@ -7,13 +7,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1 \
 DEPENDS = "libxslt-native"
 RDEPENDS_${PN} += "python-dbus"
 
-SRC_URI = "http://telepathy.freedesktop.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
+SRC_URI = "http://telepathy.freedesktop.org/releases/telepathy-python/telepathy-python-${PV}.tar.gz \
            file://parallel_make.patch \
            file://remove_duplicate_install.patch \
            file://telepathy-python_fix_for_automake_1.12.patch"
 
 PR = "r6"
 
+S = "${WORKDIR}/telepathy-python-${PV}"
+
 inherit autotools python3native
 
 SRC_URI[md5sum] = "f7ca25ab3c88874015b7e9728f7f3017"
@@ -25,8 +27,8 @@ FILES_${PN} += "\
 "
 
 do_install_append () {
-    rm -f ${D}${libdir}/python*/site-packages/telepathy/*.pyc
-    rm -f ${D}${libdir}/python*/site-packages/telepathy/*.pyo
-    rm -f ${D}${libdir}/python*/site-packages/telepathy/*/*.pyc
-    rm -f ${D}${libdir}/python*/site-packages/telepathy/*/*.pyo
+    rm -fr ${D}${libdir}/python*/site-packages/telepathy/__pycache__
+    rm -fr ${D}${libdir}/python*/site-packages/telepathy/__pycache__
+    rm -fr ${D}${libdir}/python*/site-packages/telepathy/*/__pycache__
+    rm -fr ${D}${libdir}/python*/site-packages/telepathy/*/__pycache__
 }
Signature · 1 line
2.25.0
author
#2 lore raw

PATCH 3/7 python3-pyatspi: Upgrade to 2.34.0

In reply to Khem Raj
---
 ...{python3-pyatspi_2.32.1.bb => python3-pyatspi_2.34.0.bb} | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 rename meta-python/recipes-devtools/python/{python3-pyatspi_2.32.1.bb => python3-pyatspi_2.34.0.bb} (83%)
meta-python/recipes-devtools/python/python3-pyatspi_2.34.0.bb renamed from meta-python/recipes-devtools/python/python3-pyatspi_2.32.1.bb +3 -3
similarity index 83%
rename from meta-python/recipes-devtools/python/python3-pyatspi_2.32.1.bb
rename to meta-python/recipes-devtools/python/python3-pyatspi_2.34.0.bb
index 4f52ac70d0..3bdb86b453 100644
@@ -3,12 +3,12 @@ DESCRIPTION = "AT-SPI2 is a protocol over DBus, toolkit widgets use to provide c
 SECTION = "devel/python"
 HOMEPAGE = "https://www.freedesktop.org/wiki/Accessibility/AT-SPI2/"
 LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886 \
+LIC_FILES_CHKSUM = "file://COPYING;md5=db29218e6ba3794c56df7d4987dc7e4d \
                     file://COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe"
 DEPENDS = "python3-dbus-native glib-2.0 dbus-glib libxml2 atk gtk+ python3-pygobject"
 
-SRC_URI = "git://github.com/GNOME/pyatspi2.git;protocol=https;branch=gnome-3-32"
-SRCREV = "dc4565208fca00da06b972915a080ad3c63f640d"
+SRC_URI = "git://github.com/GNOME/pyatspi2.git;protocol=https;branch=mainline"
+SRCREV = "cc99d68db66174f4499b9b325bc788393b972edd"
 S = "${WORKDIR}/git" 
 
 # Same restriction as gtk+
Signature · 1 line
2.25.0
author
#3 lore raw

PATCH 4/7 python3-txws: Fix deps to py3 modules

In reply to Khem Raj
---
 .../recipes-connectivity/python-txws/python3-txws_0.9.1.bb      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-python/recipes-connectivity/python-txws/python3-txws_0.9.1.bb +1 -1
index 6d1327ac42..e235682cf4 100644
@@ -4,7 +4,7 @@ HOMEPAGE = "https://github.com/MostAwesomeDude/txWS"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=76699830db7fa9e897f6a1ad05f98ec8"
 
-DEPENDS = "python-twisted python-six python-vcversioner python-six-native python-vcversioner-native"
+DEPENDS = "python3-twisted python3-six python3-vcversioner python3-six-native python3-vcversioner-native"
 
 SRC_URI = "git://github.com/MostAwesomeDude/txWS.git"
 SRCREV= "88cf6d9b9b685ffa1720644bd53c742afb10a414"
Signature · 1 line
2.25.0
author
#4 lore raw

PATCH 5/7 openlmi-tools: Use S to access setup.py

In reply to Khem Raj
---
 meta-oe/recipes-extended/openlmi/openlmi-tools_0.10.5.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-extended/openlmi/openlmi-tools_0.10.5.bb +1 -1
index 754476d67b..513bd11acf 100644
@@ -17,7 +17,7 @@ SRC_URI[sha256sum] = "292b8f5f2250655a4add8183c529b73358bc980bd4f23cfa484a940953
 S = "${WORKDIR}/${BP}/cli"
 
 do_configure_prepend() {
-    sed 's/@@VERSION@@/$(VERSION)/g' setup.py.skel >setup.py
+    sed 's/@@VERSION@@/$(VERSION)/g' ${S}/setup.py.skel > ${S}/setup.py
 }
 
 python() {
Signature · 1 line
2.25.0
author
#5 lore raw

PATCH 6/7 python3-pygobject: Install pkgconfig files

In reply to Khem Raj

py2 version is gone

---
 meta-oe/recipes-devtools/python/python3-pygobject_3.34.0.bb | 5 -----
 1 file changed, 5 deletions(-)
meta-oe/recipes-devtools/python/python3-pygobject_3.34.0.bb +0 -5
index b016df7198..f1c46c9319 100644
@@ -31,8 +31,3 @@ EXTRA_OEMESON_append = " -Dpython=python3"
 BBCLASSEXTEND = "native"
 RDEPENDS_${PN} = "python-pkgutil"
 RDEPENDS_${PN}_class-native = ""
-
-do_install_append() {
-    # Remove files that clash with python3-pygobject; their content is same
-    rm -r ${D}${includedir}/pygobject-3.0/pygobject.h ${D}${libdir}/pkgconfig
-}
Signature · 1 line
2.25.0
author
#6 lore raw

PATCH 7/7 python3-ldap: Fix build dependencies to use python3

In reply to Khem Raj

Address files via ${S}

---
 .../recipes-devtools/python/python3-ldap_3.2.0.bb           | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta-networking/recipes-devtools/python/python3-ldap_3.2.0.bb +3 -3
index 2ad70ace4a..f46ddbf449 100644
@@ -9,7 +9,7 @@ OpenLDAP 2.x libraries. Errors will appear as exceptions."
 
 LICENSE = "PSF"
 HOMEPAGE = "http://www.python-ldap.org/"
-DEPENDS = "python openldap cyrus-sasl"
+DEPENDS = "python3 openldap cyrus-sasl"
 
 PYPI_PACKAGE = "python-ldap"
 inherit pypi setuptools3
@@ -19,8 +19,8 @@ SRC_URI[md5sum] = "fe22522208dc9b06d16eb70f8553eaab"
 SRC_URI[sha256sum] = "7d1c4b15375a533564aad3d3deade789221e450052b21ebb9720fb822eccdb8e"
 
 do_configure_prepend() {
-    sed -i -e 's:^library_dirs =.*::' setup.cfg
-    sed -i -e 's:^include_dirs =.*:include_dirs = =/usr/include/sasl/:' setup.cfg
+    sed -i -e 's:^library_dirs =.*::' ${S}/setup.cfg
+    sed -i -e 's:^include_dirs =.*:include_dirs = =/usr/include/sasl/:' ${S}/setup.cfg
 }
 
 RDEPENDS_${PN} = " \
Signature · 1 line
2.25.0