diff options
author | Ross Burton <ross@burtonini.com> | 2022-01-17 12:58:27 +0000 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2022-01-17 13:05:06 -0500 |
commit | 34c2f32ec18f663c889aed9751711a4c6021357d (patch) | |
tree | 6cbfeb6c82e42effb74c788e2c327fc321759e52 | |
parent | 4667e968dfe9e3c2451242498a6746f7d21d6802 (diff) | |
download | meta-virtualization-34c2f32ec18f663c889aed9751711a4c6021357d.tar.gz |
python3-dtc: fix packaging by using setuptools
Inheriting setuptools3-base doesn't actually define any tasks, so commit
1ef6050 to drop distutils3 had the side-effect of not building any code.
Backport a commit from upstream to switch to setuptools, inherit
setuptool3, and change DISTUTILS_SETUP_PATH to SETUPTOOLS_SETUP_PATH.
Signed-off-by: Ross Burton <ross.burton@arm.com>
-rw-r--r-- | recipes-kernel/dtc/files/setuptools.patch | 34 | ||||
-rw-r--r-- | recipes-kernel/dtc/python3-dtc_1.6.1.bb | 7 |
2 files changed, 38 insertions, 3 deletions
diff --git a/recipes-kernel/dtc/files/setuptools.patch b/recipes-kernel/dtc/files/setuptools.patch new file mode 100644 index 00000000..3d37ebdc --- /dev/null +++ b/recipes-kernel/dtc/files/setuptools.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
3 | |||
4 | From c691776ddb26acbd3674722caafacaf7b6e3e807 Mon Sep 17 00:00:00 2001 | ||
5 | From: Rob Herring <robh@kernel.org> | ||
6 | Date: Wed, 10 Nov 2021 19:11:32 -0600 | ||
7 | Subject: [PATCH] pylibfdt: Use setuptools instead of distutils | ||
8 | |||
9 | The use of setuptools is favored over distutils. setuptools is needed to | ||
10 | support building Python 'wheels' and for pip support. | ||
11 | |||
12 | Signed-off-by: Rob Herring <robh@kernel.org> | ||
13 | Message-Id: <20211111011135.2386773-2-robh@kernel.org> | ||
14 | Signed-off-by: David Gibson <david@gibson.dropbear.id.au> | ||
15 | --- | ||
16 | pylibfdt/setup.py | 2 +- | ||
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/pylibfdt/setup.py b/pylibfdt/setup.py | ||
20 | index ef40f15..f065a59 100755 | ||
21 | --- a/pylibfdt/setup.py | ||
22 | +++ b/pylibfdt/setup.py | ||
23 | @@ -10,7 +10,7 @@ Copyright (C) 2017 Google, Inc. | ||
24 | Written by Simon Glass <sjg@chromium.org> | ||
25 | """ | ||
26 | |||
27 | -from distutils.core import setup, Extension | ||
28 | +from setuptools import setup, Extension | ||
29 | import os | ||
30 | import re | ||
31 | import sys | ||
32 | -- | ||
33 | 2.25.1 | ||
34 | |||
diff --git a/recipes-kernel/dtc/python3-dtc_1.6.1.bb b/recipes-kernel/dtc/python3-dtc_1.6.1.bb index e9b84999..6e02db64 100644 --- a/recipes-kernel/dtc/python3-dtc_1.6.1.bb +++ b/recipes-kernel/dtc/python3-dtc_1.6.1.bb | |||
@@ -7,6 +7,7 @@ LICENSE = "GPLv2 | BSD-2-Clause" | |||
7 | DEPENDS = "flex-native bison-native swig-native libyaml dtc" | 7 | DEPENDS = "flex-native bison-native swig-native libyaml dtc" |
8 | 8 | ||
9 | SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master \ | 9 | SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master \ |
10 | file://setuptools.patch \ | ||
10 | file://ssize.patch" | 11 | file://ssize.patch" |
11 | 12 | ||
12 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" | 13 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" |
@@ -17,13 +18,13 @@ SRCREV = "ecaeb97fec013973360e94888a7de645f084345c" | |||
17 | 18 | ||
18 | S = "${WORKDIR}/git" | 19 | S = "${WORKDIR}/git" |
19 | 20 | ||
20 | inherit setuptools3-base pkgconfig | 21 | inherit setuptools3 pkgconfig |
21 | 22 | ||
22 | DISTUTILS_SETUP_PATH = "${S}/pylibfdt" | 23 | SETUPTOOLS_SETUP_PATH = "${S}/pylibfdt" |
23 | 24 | ||
24 | do_configure:prepend() { | 25 | do_configure:prepend() { |
25 | oe_runmake -C "${S}" version_gen.h | 26 | oe_runmake -C "${S}" version_gen.h |
26 | mv "${S}/version_gen.h" "${DISTUTILS_SETUP_PATH}/" | 27 | mv "${S}/version_gen.h" "${SETUPTOOLS_SETUP_PATH}/" |
27 | } | 28 | } |
28 | 29 | ||
29 | BBCLASSEXTEND = "native nativesdk" | 30 | BBCLASSEXTEND = "native nativesdk" |