From 2398d55ad4953d4a83c513a27634ea3b9c12e685 Mon Sep 17 00:00:00 2001 From: Diego Rondini Date: Wed, 29 Jan 2020 22:30:51 +0000 Subject: [PATCH] pya20: update to 0.2.12 and python3 Update pya20 to version 0.2.12: - support for Python2 has been removed in oe-core master (see commit 390f3edabfb1f68ed9766245291c5f44ea00cc38) so dependencies and classes have been changed to use Python3. Without this change recipe parsing fails on master, as distutils class doesn't exist anymore - license has been fixed to be GPLv3 as declared in pyA20/__init__.py - setup.py.patch is no longer needed - pya20som has been removed, as machine olinuxino-a20som is supported by pya20 Signed-off-by: Diego Rondini --- recipes-devtools/python/files/setup.py.patch | 51 ------------------- .../{pya20_0.2.1.bb => pya20_0.2.12.bb} | 13 +++-- recipes-devtools/python/pya20som_0.2.1.bb | 24 --------- 3 files changed, 6 insertions(+), 82 deletions(-) delete mode 100644 recipes-devtools/python/files/setup.py.patch rename recipes-devtools/python/{pya20_0.2.1.bb => pya20_0.2.12.bb} (65%) delete mode 100644 recipes-devtools/python/pya20som_0.2.1.bb diff --git a/recipes-devtools/python/files/setup.py.patch b/recipes-devtools/python/files/setup.py.patch deleted file mode 100644 index de6b8e6..0000000 --- a/recipes-devtools/python/files/setup.py.patch +++ /dev/null @@ -1,51 +0,0 @@ ---- pyA20-0.2.1/setup.py 2014-09-04 12:17:18.000000000 +0200 -+++ pyA20-0.2.1/setup.py 2014-11-24 17:44:37.000000000 +0100 -@@ -43,31 +43,31 @@ - Detect processor type - :return: - """ -- cpuinfo = open("/proc/cpuinfo", 'r') -- for line in cpuinfo: -- if "Hardware" in line: -- processor = line.split(":")[1].rstrip() -+ #cpuinfo = open("/proc/cpuinfo", 'r') -+ #for line in cpuinfo: -+ # if "Hardware" in line: -+ # processor = line.split(":")[1].rstrip() - -- if "sun4i" in processor: -- print ("Detected processor: " + print_color(processor) + " (Probably Allwinner A10)") -+ # if "sun4i" in processor: -+ # print ("Detected processor: " + print_color(processor) + " (Probably Allwinner A10)") - -- elif "sun5i" in processor: -- print ("Detected processor: " + print_color(processor) + " (Probably Allwinner A13)") -+ # elif "sun5i" in processor: -+ # print ("Detected processor: " + print_color(processor) + " (Probably Allwinner A13)") - -- elif "sun7i" in processor: -- print ("Detected processor: " + print_color(processor) + " (Probably Allwinner A20)") -+ # elif "sun7i" in processor: -+ # print ("Detected processor: " + print_color(processor) + " (Probably Allwinner A20)") - -- else: -- print ("Detected processor: " + print_color("unknown")) -+ # else: -+ # print ("Detected processor: " + print_color("unknown")) - - -- if processor_type not in processor: -- print_warning() -+ # if processor_type not in processor: -+ # print_warning() - -- return -+ return - -- print ("No processor detected") -- print_warning() -+ #print ("No processor detected") -+ #print_warning() - - - class build_ext(_build_ext): diff --git a/recipes-devtools/python/pya20_0.2.1.bb b/recipes-devtools/python/pya20_0.2.12.bb similarity index 65% rename from recipes-devtools/python/pya20_0.2.1.bb rename to recipes-devtools/python/pya20_0.2.12.bb index e1cf0a3..048c336 100644 --- a/recipes-devtools/python/pya20_0.2.1.bb +++ b/recipes-devtools/python/pya20_0.2.12.bb @@ -1,24 +1,23 @@ DESCRIPTION = "A module to control Allwinner GPIO,SPI and I2C channels" HOMEPAGE = "https://pypi.python.org/pypi/pyA20" SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://PKG-INFO;md5=bfe0261ded6cff75086193ec2f79129e" -DEPENDS = "python" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://PKG-INFO;md5=4e584373bb0f46ef1e423cb7df37847d" +DEPENDS = "python3" # No GPIO mappings for other machines yet COMPATIBLE_MACHINE = "(olinuxino-a13|olinuxino-a10|olinuxino-a20|olinuxino-a10lime|olinuxino-a20lime|olinuxino-a20lime2|olinuxino-a13som|olinuxino-a20som)" SRC_URI = "https://pypi.python.org/packages/source/p/pyA20/pyA20-${PV}.tar.gz \ - file://setup.py.patch \ file://mapping.h \ " S = "${WORKDIR}/pyA20-${PV}" -inherit distutils +inherit distutils3 do_compile_prepend() { cp ${WORKDIR}/mapping.h ${S}/pyA20/gpio/mapping.h } -SRC_URI[md5sum] = "2290066bbe274000c53693959a8005b4" -SRC_URI[sha256sum] = "b15e4ee1016b7eb52001cbccde3751868624a88d2adbb9adc5404628f7e59e7e" +SRC_URI[md5sum] = "cab03b4931199804603d1074f6d8f48f" +SRC_URI[sha256sum] = "4bef559a9c5a4d648d9834bad996cf2805b20d6063b8051029ffdf9deda2b536" diff --git a/recipes-devtools/python/pya20som_0.2.1.bb b/recipes-devtools/python/pya20som_0.2.1.bb deleted file mode 100644 index 0aa8138..0000000 --- a/recipes-devtools/python/pya20som_0.2.1.bb +++ /dev/null @@ -1,24 +0,0 @@ -DESCRIPTION = "A module to control Allwinner GPIO,SPI and I2C channels" -HOMEPAGE = "https://pypi.python.org/pypi/pyA20SOM" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://PKG-INFO;md5=cf6345f2cb2acee98b01c493d68b8322" -DEPENDS = "python" - -# No GPIO mappings for other machines yet -COMPATIBLE_MACHINE = "olinuxino-a20som" - -SRC_URI = "https://pypi.python.org/packages/source/p/pyA20SOM/pyA20SOM-${PV}.tar.gz \ - file://setup.py.patch \ - file://mapping.h \ - " -S = "${WORKDIR}/pyA20SOM-${PV}" - -inherit distutils - -do_compile_prepend() { -cp ${WORKDIR}/mapping.h ${S}/pyA20SOM/gpio/mapping.h -} - -SRC_URI[md5sum] = "a720115ef1d3dffe82f42f2157ca1c56" -SRC_URI[sha256sum] = "1ac1025596cc112964f7caac9a6a523d5da61623c248ccc178c6cbb4bc1b4549"