Skip to contentSkip to conversation

cpuset: drop Python2 code

PATCH New Denys Dmytriyenko 1 participant 9 messages Mar 17, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/9 cpuset: drop Python2 code

Python2 has been deprecated. If functionality is needed, python-cpuset package can be used for a while from meta-python2 layer.

---
 meta-arago-distro/recipes-core/packagegroups/ti-test.bb  |  1 -
 meta-arago-extras/recipes-support/cpuset/cpuset_1.5.7.bb | 15 ---------------
 2 files changed, 16 deletions(-)
 delete mode 100644 meta-arago-extras/recipes-support/cpuset/cpuset_1.5.7.bb
meta-arago-distro/recipes-core/packagegroups/ti-test.bb +0 -1
index 60db7de..7dc1fe4 100644
@@ -26,7 +26,6 @@ ARAGO_TEST = "\
     rwmem \
     pulseaudio-misc \
     kselftests \
-    cpuset \
     procps \
     mtd-utils-ubifs-tests \
     pcitest \
meta-arago-extras/recipes-support/cpuset/cpuset_1.5.7.bb deleted +0 -15
deleted file mode 100644
index c3690f0..0000000
@@ -1,15 +0,0 @@
-SUMMARY = "Cpuset is a Python application to make using the cpusets facilities in the Linux kernel easier"
-SECTION = "console/utils"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-SRC_URI = "https://github.com/lpechacek/cpuset/archive/v${PV}.tar.gz"
-
-SRC_URI[md5sum] = "6ad79b26ba03f559604d74513cc34392"
-SRC_URI[sha256sum] = "32334e164415ed5aec83c5ffc3dc01c418406eb02d96d881fdfd495587ff0c01"
-
-S = "${WORKDIR}/${P}"
-
-CLEANBROKEN = "1"
-
-inherit distutils
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/9 python: drop Python2 code

---
 .../python-numpy/python-numpy_1.16.3.bb            | 10 ----------
 .../python/python-appdirs_1.4.0.bb                 |  8 --------
 .../recipes-devtools/python/python-mako.inc        | 15 --------------
 .../recipes-devtools/python/python-mako_1.0.4.bb   | 17 ----------------
 .../recipes-devtools/python/python-pyelftools.inc  | 14 -------------
 .../python/python-pyelftools_0.25.bb               |  2 --
 .../python/python-pyopencl_2016.1.bb               | 23 ----------------------
 .../python/python-pytools_2016.2.1.bb              | 17 ----------------
 .../python/python3-pyelftools_0.25.bb              |  2 --
 9 files changed, 108 deletions(-)
 delete mode 100644 meta-arago-distro/recipes-devtools/python-numpy/python-numpy_1.16.3.bb
 delete mode 100644 meta-arago-extras/recipes-devtools/python/python-appdirs_1.4.0.bb
 delete mode 100644 meta-arago-extras/recipes-devtools/python/python-mako.inc
 delete mode 100644 meta-arago-extras/recipes-devtools/python/python-mako_1.0.4.bb
 delete mode 100644 meta-arago-extras/recipes-devtools/python/python-pyelftools.inc
 delete mode 100644 meta-arago-extras/recipes-devtools/python/python-pyelftools_0.25.bb
 delete mode 100644 meta-arago-extras/recipes-devtools/python/python-pyopencl_2016.1.bb
 delete mode 100644 meta-arago-extras/recipes-devtools/python/python-pytools_2016.2.1.bb
 delete mode 100644 meta-arago-extras/recipes-devtools/python/python3-pyelftools_0.25.bb
meta-arago-distro/recipes-devtools/python-numpy/python-numpy_1.16.3.bb deleted +0 -10
deleted file mode 100644
index a1133da..0000000
@@ -1,10 +0,0 @@
-inherit setuptools
-require python-numpy.inc
-
-RDEPENDS_${PN}_class-target_append = " \
-    ${PYTHON_PN}-subprocess \
-"
-
-do_install_append(){
-        rm ${D}/${bindir}/f2py
-}
meta-arago-extras/recipes-devtools/python/python-appdirs_1.4.0.bb deleted +0 -8
deleted file mode 100644
index fdea221..0000000
@@ -1,8 +0,0 @@
-SUMMARY = "A small Python module for determining appropriate + platform-specific dirs, e.g. a "user data dir"."
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=31625363c45eb0c67c630a2f73e438e4"
-
-SRC_URI[md5sum] = "1d17b4c9694ab84794e228f28dc3275b"
-SRC_URI[sha256sum] = "8fc245efb4387a4e3e0ac8ebcc704582df7d72ff6a42a53f5600bbb18fdaadc5"
-
-inherit pypi setuptools
meta-arago-extras/recipes-devtools/python/python-mako.inc deleted +0 -15
deleted file mode 100644
index 85ec217..0000000
@@ -1,15 +0,0 @@
-SUMMARY = "Templating library for Python"
-SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=1bb21fa2d2f7a534c884b990430a6863"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/M/Mako/Mako-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "c5fc31a323dd4990683d2f2da02d4e20"
-SRC_URI[sha256sum] = "fed99dbe4d0ddb27a33ee4910d8708aca9ef1fe854e668387a9ab9a90cbf9059"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/mako/"
-UPSTREAM_CHECK_REGEX = "/Mako/(?P<pver>(\d+[\.\-_]*)+)"
-
-S = "${WORKDIR}/Mako-${PV}"
-
meta-arago-extras/recipes-devtools/python/python-mako_1.0.4.bb deleted +0 -17
deleted file mode 100644
index 230044e..0000000
@@ -1,17 +0,0 @@
-require python-mako.inc
-
-inherit setuptools
-
-RDEPENDS_${PN} = "python-threading \
-                  python-netclient \
-                  python-html \
-"
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native nativesdk"
-
-# The same utility is packaged in python3-mako, so it would conflict
-do_install_append() {
-    rm -f ${D}${bindir}/mako-render
-    rmdir ${D}${bindir}
-}
meta-arago-extras/recipes-devtools/python/python-pyelftools.inc deleted +0 -14
deleted file mode 100644
index d53a22f..0000000
@@ -1,14 +0,0 @@
-SUMMARY = "Parsing ELF and DWARF in Python"
-DESCRIPTION = "Pure-Python library for parsing and analyzing ELF files and DWARF debugging information"
-HOMEPAGE = "https://github.com/eliben/pyelftools"
-LICENSE = "PD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=5ce2a2b07fca326bc7c146d10105ccfc"
-
-PYPI_PACKAGE = "pyelftools"
-
-inherit pypi
-
-SRC_URI[md5sum] = "c5629b9a5d19c82107a946cce52eeec2"
-SRC_URI[sha256sum] = "89c6da6f56280c37a5ff33468591ba9a124e17d71fe42de971818cbff46c1b24"
-
-BBCLASSEXTEND = "native nativesdk"
meta-arago-extras/recipes-devtools/python/python-pyelftools_0.25.bb deleted +0 -2
deleted file mode 100644
index de42025..0000000
@@ -1,2 +0,0 @@
-inherit setuptools
-require python-pyelftools.inc
meta-arago-extras/recipes-devtools/python/python-pyopencl_2016.1.bb deleted +0 -23
deleted file mode 100644
index 9917ede..0000000
@@ -1,23 +0,0 @@
-SUMMARY = "OpenCL Integration for Python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=2379446cdcffbf1c63a87311b816a656"
-
-DEPENDS = " python-cffi-native python-numpy-native opencl"
-RDEPENDS_${PN} = " opencl-runtime \
-                   python-numpy \
-                   python-pytest \
-                   python-pytools \
-                   python-decorator \
-                   python-cffi \
-                   python-appdirs \
-                   python-six \
-                   python-mako \
-"
-
-SRC_URI[md5sum] = "0c8a33b6a6b427bcd9c5966da461d9c6"
-SRC_URI[sha256sum] = "54b6e8ad02dc437807739bd53e43851efe979bd51ec87996e44b94ab67238297"
-
-inherit pypi setuptools
-
-# Standard pypi SRC_URI is not available at this time
-SRC_URI = "https://pypi.python.org/packages/cb/4e/fcb45db7d3005f5646f28a3de2a2f8e60a6e4b629f02bbb331320778f3a1/pyopencl-2016.1.tar.gz"
meta-arago-extras/recipes-devtools/python/python-pytools_2016.2.1.bb deleted +0 -17
deleted file mode 100644
index fb597d4..0000000
@@ -1,17 +0,0 @@
-SUMMARY = "A collection of tools for Python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://MANIFEST.in;md5=d41d8cd98f00b204e9800998ecf8427e"
-
-RDEPENDS_${PN} = " python-decorator \
-                   python-appdirs \
-                   python-six \
-                   python-numpy \
-"
-
-SRC_URI[md5sum] = "452dfa3023733a675cc1bee91c536cbd"
-SRC_URI[sha256sum] = "8939d4a81e17ca30968126e9614100ab38df926b251b96a0b4736234195cca19"
-
-inherit pypi setuptools
-
-# Standard pypi SRC_URI is not available at this time
-SRC_URI = "https://pypi.python.org/packages/1a/1e/ce42d53bad97ad16732c8d9ac1dd6ed22a906ea07f291df5f6f90a6c7a2a/pytools-2016.2.1.tar.gz"
meta-arago-extras/recipes-devtools/python/python3-pyelftools_0.25.bb deleted +0 -2
deleted file mode 100644
index 56eb8c4..0000000
@@ -1,2 +0,0 @@
-inherit setuptools3
-require python-pyelftools.inc
Signature · 1 line
2.7.4
#2 lore raw

PATCH 3/9 openfst: only inherit pythonnative for python PACKAGECONFIG

In reply to Denys Dmytriyenko
---
 meta-arago-extras/recipes-support/openfst/openfst_1.6.2.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-arago-extras/recipes-support/openfst/openfst_1.6.2.bb +2 -2
index 2f693d2..b2a1f66 100644
@@ -2,7 +2,7 @@ SUMMARY = "OpenFst: library for operating on finite-state transducers"
 DESCRIPTION = "OpenFst: a library for constructing, combining, optimizing, and searching weighted finite-state transducers (FSTs)"
 LICENSE = "Apache-2.0"
 HOMEPAGE = "http://www.openfst.org/twiki/bin/view/FST/WebHome"
-PR ="r0"
+PR = "r0"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=17bdccf7f927b4b2aeac950537db3369"
 SRC_URI = "http://openslr.org/resources/2/openfst-${PV}.tar.gz"
@@ -12,7 +12,7 @@ S = "${WORKDIR}/openfst-${PV}"
 SRC_URI[md5sum] = "e5b2b8c41a8320a03f3a8bbea63bb0ca"
 SRC_URI[sha256sum] = "3f72e35097fdf1c1c41e15165c16696c223295b40b7b145b5466306db7972578"
 
-inherit autotools pythonnative
+inherit autotools ${@bb.utils.contains("PACKAGECONFIG", "python", "pythonnative", "", d)}
 
 # From the OpenFST documentation:
 #
Signature · 1 line
2.7.4
#3 lore raw

PATCH 4/9 llvm: inherit python3native

In reply to Denys Dmytriyenko
---
 meta-arago-extras/recipes-core/llvm/llvm.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-arago-extras/recipes-core/llvm/llvm.inc +1 -1
index f27261f..b1a48f6 100644
@@ -27,7 +27,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=d0a3ef0d3e0e8f5cf59e5ffc273ab1f8"
 
 DEPENDS = "libffi libxml2-native llvm-common"
 
-inherit perlnative pythonnative autotools
+inherit perlnative python3native autotools
 
 LLVM_RELEASE = "${PV}"
 LLVM_DIR = "llvm${LLVM_RELEASE}"
Signature · 1 line
2.7.4
#4 lore raw

PATCH 5/9 ti-test: only include mstpd when Python2 is enabled

In reply to Denys Dmytriyenko
---
 meta-arago-distro/recipes-core/packagegroups/ti-test.bb | 2 +-
 meta-arago-extras/recipes-support/mstpctl/mstpd_git.bb  | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)
meta-arago-distro/recipes-core/packagegroups/ti-test.bb +1 -1
index 7dc1fe4..a266e26 100644
@@ -29,7 +29,7 @@ ARAGO_TEST = "\
     procps \
     mtd-utils-ubifs-tests \
     pcitest \
-    mstpd \
+    ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "mstpd", "", d)} \
     fio \
     git \
 "
meta-arago-extras/recipes-support/mstpctl/mstpd_git.bb +5 -0
index eeeeb82..db8f08c 100644
@@ -18,3 +18,8 @@ RDEPENDS_${PN} = "python-core"
 inherit autotools
 
 EXTRA_OECONF = "--sbindir=/sbin"
+
+python() {
+    if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split():
+        raise bb.parse.SkipRecipe('Requires meta-python2 to be present.')
+}
Signature · 1 line
2.7.4
#5 lore raw

PATCH 6/9 ti-world: qtwebengine and qtbrowser depend on Python2

In reply to Denys Dmytriyenko
---
 meta-arago-distro/recipes-core/packagegroups/ti-world.bb    |  6 +++++-
 .../packagegroup-arago-qte-toolchain-target.bb              | 13 +------------
 2 files changed, 6 insertions(+), 13 deletions(-)
meta-arago-distro/recipes-core/packagegroups/ti-world.bb +5 -1
index 9244d49..e104df8 100644
@@ -21,6 +21,10 @@ EXTRABROWSERS = " \
     qtwebengine-examples \
 "
 
+PYTHON2APPS = " \
+    ${@bb.utils.contains('MACHINE_FEATURES','gpu',"${EXTRABROWSERS}",'',d)} \
+"
+
 DEVTOOLS = " \
     linux-libc-headers-dev \
     build-essential \
@@ -48,7 +52,7 @@ RDEPENDS_${PN} = "\
     packagegroup-arago-tisdk-addons-extra \
     ${@bb.utils.contains('MACHINE_FEATURES','gpu','packagegroup-arago-tisdk-hmi','packagegroup-arago-base-tisdk-server-extra',d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', "${CHROMIUM}", '', d)} \
-    ${@bb.utils.contains('MACHINE_FEATURES','gpu',"${EXTRABROWSERS}",'',d)} \
+    ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "${PYTHON2APPS}", "", d)} \
     ${@bb.utils.contains('MACHINE_FEATURES', 'gpu dsp', 'qt-opencv-opencl-opengl-multithreaded-dev', '', d)} \
     ${DEVTOOLS} \
     ${@bb.utils.contains('TUNE_FEATURES', 'armv7a', 'valgrind', '', d)} \
meta-arago-extras/recipes-core/packagegroups/packagegroup-arago-qte-toolchain-target.bb +1 -12
index ac3c6b1..c40b453 100644
@@ -63,24 +63,13 @@ QT5_DEV = " \
         qtxmlpatterns-dev \
         qtwebkit-mkspecs \
         qtwebkit-dev \
-        qtwebengine-mkspecs \
-        qtwebengine-dev \
+        ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "qtwebengine-mkspecs qtwebengine-dev", "", d)} \
         qtserialport-mkspecs \
         qtserialport-dev  \
         qtcharts-mkspecs \
         qtcharts-dev \
 "
 
-#QT5_DEV_append_k3 = " \
-#        qtwebkit-mkspecs \
-#        qtwebkit-dev \
-#"
-#
-#QT5_DEV_remove_k3 = " \
-#        qtwebengine-mkspecs \
-#        qtwebengine-dev \
-#"
-
 RDEPENDS_${PN} += " \
         ${@oe.utils.conditional('QT_PROVIDER', 'qt5', "${QT5_DEV}", "${QT4_DEV}", d)} \
 "
Signature · 1 line
2.7.4
#6 lore raw

PATCH 7/9 voxelsdk: only build when Python2 is enabled

In reply to Denys Dmytriyenko
---
 meta-arago-extras/recipes-apps/voxelsdk/voxelsdk_git.bb | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
meta-arago-extras/recipes-apps/voxelsdk/voxelsdk_git.bb +7 -1
index 00dd860..30c4fbf 100644
@@ -31,7 +31,8 @@ OPCLK_ti43x = "RESET_OPCLK"
 CXXFLAGS_append = " -I${STAGING_INCDIR}/libusb-1.0 -D${OPCLK}"
 EXTRA_OECMAKE += "-DDISTROFEATURE=ExcludePCL -DCMAKE_BUILD_TYPE=Debug -DPYTHON_INCLUDE_DIRS=${STAGING_INCDIR}/include/python2.7"
 
-inherit pkgconfig cmake pythonnative python-dir
+inherit pkgconfig cmake
+inherit ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "pythonnative python-dir", "", d)}
 
 DEPENDS = "libusb1 udev opencv boost python swig swig-native"
 
@@ -54,3 +55,8 @@ FILES_${PN}-dev += "${libdir}/cmake ${libdir}/cmake/Voxel ${libdir}/cmake/TI3DTo
 FILES_${PN}-dev += "${libdir}/cmake/Voxel/*.cmake"
 FILES_${PN}-dev += "${libdir}/cmake/TI3DToF/*.cmake"
 FILES_${PN}-dev += "${libdir}/voxel/*.so"
+
+python() {
+    if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split():
+        raise bb.parse.SkipRecipe('Requires meta-python2 to be present.')
+}
Signature · 1 line
2.7.4
#7 lore raw

PATCH 8/9 ltp-ddt: depend on python3-core

In reply to Denys Dmytriyenko
---
 meta-arago-extras/recipes-devtools/ltp-ddt/ltp-ddt_20200217.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-arago-extras/recipes-devtools/ltp-ddt/ltp-ddt_20200217.bb +1 -1
index 539213a..c423b4f 100644
@@ -28,7 +28,7 @@ RDEPENDS_${PN} = "\
     logrotate \
     perl \
     pm-qa \
-    python-core \
+    python3-core \
     serialcheck \
     unzip \
     util-linux \
Signature · 1 line
2.7.4
#8 lore raw

PATCH 9/9 toolchain-arm: update component versions

In reply to Denys Dmytriyenko
---
 meta-arago-distro/conf/distro/include/toolchain-arm.inc | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
meta-arago-distro/conf/distro/include/toolchain-arm.inc +6 -6
index 3ce56e3..c5520ed 100644
@@ -48,9 +48,9 @@ PREFERRED_PROVIDER_gcc-runtime = "external-arm-toolchain"
 
 # Set Cross and SDK toolchain preferences
 SDKGCCVERSION ?= "arm-9.2%"
-SDKGDBVERSION ?= "8.3%"
-SDKBINUVERSION ?= "2.32%"
-SDKGLIBCVERSION ?= "2.30%"
+SDKGDBVERSION ?= "9.1%"
+SDKBINUVERSION ?= "2.34%"
+SDKGLIBCVERSION ?= "2.31%"
 SDKLINUXLIBCVERSION ?= "5.4%"
 
 PREFERRED_VERSION_gcc-crosssdk-${SDK_SYS} ?= "${SDKGCCVERSION}"
@@ -70,9 +70,9 @@ PREFERRED_VERSION_nativesdk-glibc-initial ?= "${SDKGLIBCVERSION}"
 # Set target toolchain preferences to match Cross/SDK by default
 # Can be overwritten globally, if needed
 GCCVERSION ?= "arm-9.2%"
-GDBVERSION ?= "8.3%"
-BINUVERSION ?= "2.32%"
-GLIBCVERSION ?= "2.30%"
+GDBVERSION ?= "9.1%"
+BINUVERSION ?= "2.34%"
+GLIBCVERSION ?= "2.31%"
 
 PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
 PREFERRED_VERSION_gdb ?= "${GDBVERSION}"
Signature · 1 line
2.7.4