From db5534e5316697dda0529d58c1531b8201622bc1 Mon Sep 17 00:00:00 2001 From: wangmy Date: Sat, 2 Apr 2022 20:32:47 +0800 Subject: python3-pyparted: upgrade 3.11.7 -> 3.12.0 setuptools.patch removed since it's included in 3.12.0 Signed-off-by: Wang Mingyu Signed-off-by: Khem Raj Signed-off-by: Trevor Gamblin --- .../python-pyparted/files/setuptools.patch | 82 ---------------------- .../python-pyparted/python3-pyparted_3.11.7.bb | 27 ------- .../python-pyparted/python3-pyparted_3.12.0.bb | 24 +++++++ 3 files changed, 24 insertions(+), 109 deletions(-) delete mode 100644 meta-python/recipes-extended/python-pyparted/files/setuptools.patch delete mode 100644 meta-python/recipes-extended/python-pyparted/python3-pyparted_3.11.7.bb create mode 100644 meta-python/recipes-extended/python-pyparted/python3-pyparted_3.12.0.bb (limited to 'meta-python/recipes-extended') diff --git a/meta-python/recipes-extended/python-pyparted/files/setuptools.patch b/meta-python/recipes-extended/python-pyparted/files/setuptools.patch deleted file mode 100644 index 51fe8c7c56..0000000000 --- a/meta-python/recipes-extended/python-pyparted/files/setuptools.patch +++ /dev/null @@ -1,82 +0,0 @@ -Upstream-Status: Submitted [https://github.com/dcantrell/pyparted/pull/85] -Signed-off-by: Ross Burton - -From 3f5ca7eb6f57d8bcaa3b333497aba6e53d847450 Mon Sep 17 00:00:00 2001 -From: Ross Burton -Date: Fri, 14 Jan 2022 16:06:31 +0000 -Subject: [PATCH] setup.py: port to setuptools - -Python 3.10 has deprecated distutils[1], and it will be removed entirely -in Python 3.12. - -As the setuptools API is identical, moving to setuptools is trivial by -changing the import. - -Remove check_mod_version, a version specifier can be passed directly -to pkg-config. - -Remove unused imports. - -[1] https://docs.python.org/3/whatsnew/3.10.html#distutils-deprecated - -Signed-off-by: Ross Burton ---- - setup.py | 29 +++++++++-------------------- - 1 file changed, 9 insertions(+), 20 deletions(-) - -diff --git a/setup.py b/setup.py -index da71d9c..1e9e367 100644 ---- a/setup.py -+++ b/setup.py -@@ -25,12 +25,7 @@ import glob - import os - import platform - import sys --from distutils.ccompiler import new_compiler --from distutils.errors import CompileError --from distutils.errors import LinkError --from distutils.core import setup --from distutils.core import Extension --from distutils.version import LooseVersion -+from setuptools import setup, Extension - - pyparted_version = '3.11.7' - python_version = sys.version_info -@@ -45,19 +40,13 @@ if python_version < need_python_version: - # http://code.activestate.com/recipes/502261-python-distutils-pkg-config/ - def pkgconfig(*packages, **kwargs): - flag_map = {'-I': 'include_dirs', '-L': 'library_dirs', '-l': 'libraries'} -- for token in subprocess.check_output(["pkg-config", "--libs", "--cflags"] + list(packages)).decode('utf-8').split(): -- -- kwargs.setdefault(flag_map.get(token[:2]), []).append(token[2:]) -- return kwargs -- --def check_mod_version(module, version): -- modversion = subprocess.check_output(["pkg-config", "--modversion", module]).decode('utf-8').split()[0] -- if not LooseVersion(modversion) >= LooseVersion(version): -- sys.stderr.write("*** Minimum required %s version: %s, found: %s\n" % (module, version, modversion,)) -- sys.exit(1) -- return -- --check_mod_version('libparted', need_libparted_version) -+ try: -+ for token in subprocess.check_output(["pkg-config", "--libs", "--cflags"] + list(packages), -+ universal_newlines=True).split(): -+ kwargs.setdefault(flag_map.get(token[:2]), []).append(token[2:]) -+ return kwargs -+ except subprocess.CalledProcessError as e: -+ sys.exit("Cannot find pkg-config dependencies:\n" + e.output) - - # This list is in the format necessary for the define_macros parameter - # for an Extension() module definition. See: -@@ -77,6 +66,6 @@ setup(name='pyparted', - ext_modules=[Extension('_ped', - sorted(glob.glob(os.path.join('src', '*.c'))), - define_macros=features, -- **pkgconfig('libparted', -+ **pkgconfig('libparted >= %s' % need_libparted_version, - include_dirs=['include'])) - ]) --- -2.25.1 - diff --git a/meta-python/recipes-extended/python-pyparted/python3-pyparted_3.11.7.bb b/meta-python/recipes-extended/python-pyparted/python3-pyparted_3.11.7.bb deleted file mode 100644 index 2cdf82365a..0000000000 --- a/meta-python/recipes-extended/python-pyparted/python3-pyparted_3.11.7.bb +++ /dev/null @@ -1,27 +0,0 @@ -DESCRIPTION = "pyparted is a set of Python modules that provide Python programmers \ -an interface to libparted, the GNU parted library for disk partitioning and \ -filesystem manipulation." -SUMMARY = "Python bindings for libparted" -HOMEPAGE = "https://github.com/rhinstaller/pyparted" -LICENSE = "GPL-2.0-or-later" -LIC_FILES_CHKSUM = "\ - file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ - file://src/_pedmodule.c;beginline=10;endline=22;md5=9e53304db812b80d0939e11bb69dcab2 \ -" - -SRC_URI += "file://setuptools.patch" - -SRC_URI[md5sum] = "69284f943982f54ded76960c92098a02" -SRC_URI[sha256sum] = "61cde7b096bccd69ddc75c85b17f8baed45c3687d404706d91403a319453b903" - -inherit pkgconfig pypi setuptools3 - -DEPENDS += "parted" - -RDEPENDS:${PN}:class-target += " \ - parted (>= 2.3) \ - python3-stringold python3-codecs python3-math \ -" -RDEPENDS:${PN}:class-native = "" - -BBCLASSEXTEND = "native" diff --git a/meta-python/recipes-extended/python-pyparted/python3-pyparted_3.12.0.bb b/meta-python/recipes-extended/python-pyparted/python3-pyparted_3.12.0.bb new file mode 100644 index 0000000000..9dd362766d --- /dev/null +++ b/meta-python/recipes-extended/python-pyparted/python3-pyparted_3.12.0.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "pyparted is a set of Python modules that provide Python programmers \ +an interface to libparted, the GNU parted library for disk partitioning and \ +filesystem manipulation." +SUMMARY = "Python bindings for libparted" +HOMEPAGE = "https://github.com/rhinstaller/pyparted" +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "\ + file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ + file://src/_pedmodule.c;beginline=10;endline=22;md5=9e53304db812b80d0939e11bb69dcab2 \ +" + +SRC_URI[sha256sum] = "da985e116beb733371feb605b174db9eec8bd0eedffc8f739f8e603f51b521e7" + +inherit pkgconfig pypi setuptools3 + +DEPENDS += "parted" + +RDEPENDS:${PN}:class-target += " \ + parted (>= 2.3) \ + python3-stringold python3-codecs python3-math \ +" +RDEPENDS:${PN}:class-native = "" + +BBCLASSEXTEND = "native" -- cgit v1.2.3-54-g00ecf