diff options
-rw-r--r-- | recipes-kernel/dtc/files/setuptools.patch | 34 | ||||
-rw-r--r-- | recipes-kernel/dtc/files/ssize.patch | 35 | ||||
-rw-r--r-- | recipes-kernel/dtc/python3-dtc_1.6.1.bb | 14 |
3 files changed, 3 insertions, 80 deletions
diff --git a/recipes-kernel/dtc/files/setuptools.patch b/recipes-kernel/dtc/files/setuptools.patch deleted file mode 100644 index 3d37ebdc..00000000 --- a/recipes-kernel/dtc/files/setuptools.patch +++ /dev/null @@ -1,34 +0,0 @@ -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@arm.com> - -From c691776ddb26acbd3674722caafacaf7b6e3e807 Mon Sep 17 00:00:00 2001 -From: Rob Herring <robh@kernel.org> -Date: Wed, 10 Nov 2021 19:11:32 -0600 -Subject: [PATCH] pylibfdt: Use setuptools instead of distutils - -The use of setuptools is favored over distutils. setuptools is needed to -support building Python 'wheels' and for pip support. - -Signed-off-by: Rob Herring <robh@kernel.org> -Message-Id: <20211111011135.2386773-2-robh@kernel.org> -Signed-off-by: David Gibson <david@gibson.dropbear.id.au> ---- - pylibfdt/setup.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/pylibfdt/setup.py b/pylibfdt/setup.py -index ef40f15..f065a59 100755 ---- a/pylibfdt/setup.py -+++ b/pylibfdt/setup.py -@@ -10,7 +10,7 @@ Copyright (C) 2017 Google, Inc. - Written by Simon Glass <sjg@chromium.org> - """ - --from distutils.core import setup, Extension -+from setuptools import setup, Extension - import os - import re - import sys --- -2.25.1 - diff --git a/recipes-kernel/dtc/files/ssize.patch b/recipes-kernel/dtc/files/ssize.patch deleted file mode 100644 index 3156896c..00000000 --- a/recipes-kernel/dtc/files/ssize.patch +++ /dev/null @@ -1,35 +0,0 @@ -Python 3.10 has made it mandatory that the 'string+length` formats use ssize_t -instead of int, so define the magic symbol and upcast the ints from the libfdt -API to ssize_t. - -Upstream-Status: Pending -Signed-off-by: Ross Burton <ross.burton@arm.com> - -diff --git a/pylibfdt/libfdt.i b/pylibfdt/libfdt.i -index 51ee801..075ef70 100644 ---- a/pylibfdt/libfdt.i -+++ b/pylibfdt/libfdt.i -@@ -1044,9 +1044,9 @@ typedef uint32_t fdt32_t; - $result = Py_None; - else - %#if PY_VERSION_HEX >= 0x03000000 -- $result = Py_BuildValue("y#", $1, *arg4); -+ $result = Py_BuildValue("y#", $1, (Py_ssize_t)*arg4); - %#else -- $result = Py_BuildValue("s#", $1, *arg4); -+ $result = Py_BuildValue("s#", $1, (Py_ssize_t)*arg4); - %#endif - } - -diff --git a/pylibfdt/setup.py b/pylibfdt/setup.py -index ef40f15..88ff7d1 100755 ---- a/pylibfdt/setup.py -+++ b/pylibfdt/setup.py -@@ -42,6 +42,7 @@ def get_version(): - libfdt_module = Extension( - '_libfdt', - sources=[os.path.join(srcdir, 'libfdt.i')], -+ define_macros=[('PY_SSIZE_T_CLEAN', None)], - include_dirs=[os.path.join(srcdir, '../libfdt')], - libraries=['fdt'], - library_dirs=[os.path.join(top_builddir, 'libfdt')], diff --git a/recipes-kernel/dtc/python3-dtc_1.6.1.bb b/recipes-kernel/dtc/python3-dtc_1.6.1.bb index 6e02db64..dd2c6e6e 100644 --- a/recipes-kernel/dtc/python3-dtc_1.6.1.bb +++ b/recipes-kernel/dtc/python3-dtc_1.6.1.bb @@ -4,27 +4,19 @@ DESCRIPTION = "A python library for the Device Tree Compiler, a tool used to man SECTION = "bootloader" LICENSE = "GPLv2 | BSD-2-Clause" -DEPENDS = "flex-native bison-native swig-native libyaml dtc" +DEPENDS = "flex-native bison-native swig-native python3-setuptools-scm-native libyaml dtc" SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master \ - file://setuptools.patch \ - file://ssize.patch" + " UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" LIC_FILES_CHKSUM = "file://pylibfdt/libfdt.i;beginline=1;endline=6;md5=afda088c974174a29108c8d80b5dce90" -SRCREV = "ecaeb97fec013973360e94888a7de645f084345c" +SRCREV = "4048aed12b81c5a0154b9af438edc99ec7d2b6a1" S = "${WORKDIR}/git" inherit setuptools3 pkgconfig -SETUPTOOLS_SETUP_PATH = "${S}/pylibfdt" - -do_configure:prepend() { - oe_runmake -C "${S}" version_gen.h - mv "${S}/version_gen.h" "${SETUPTOOLS_SETUP_PATH}/" -} - BBCLASSEXTEND = "native nativesdk" |