Skip to contentSkip to conversation

python3-smbbus: use DISTUTILS_SETUP_PATH

PATCH New Ross Burton 1 participant 2 messages Jan 14, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 python3-smbbus: use DISTUTILS_SETUP_PATH

---
 meta-python/recipes-devtools/python/python3-smbus_4.3.bb | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta-python/recipes-devtools/python/python3-smbus_4.3.bb +5 -2
index e2fd20fc00..a09a108b36 100644
@@ -1,11 +1,14 @@
 SUMMARY = "Set of i2c tools for linux - Python module"
 LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://smbusmodule.c;beginline=1;endline=18;md5=46e424fb045901ab25e0f92c28c80055"
+LIC_FILES_CHKSUM = "file://py-smbus/smbusmodule.c;beginline=1;endline=18;md5=46e424fb045901ab25e0f92c28c80055"
 
 SRC_URI = "${KERNELORG_MIRROR}/software/utils/i2c-tools/i2c-tools-${PV}.tar.gz "
 SRC_URI[sha256sum] = "eec464e42301d93586cbeca3845ed61bff40f560670e5b35baec57301d438148"
 
 DEPENDS += "i2c-tools"
 
-S = "${WORKDIR}/i2c-tools-${PV}/py-smbus"
+S = "${WORKDIR}/i2c-tools-${PV}"
+
 inherit distutils3
+
+DISTUTILS_SETUP_PATH = "${S}/py-smbus"
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/2 python3-smbus: use setuptools

Port the use of distutils to setuptools, as distutils is deprecated.

---
 ...etuptools-as-distutils-is-deprecated.patch | 25 +++++++++++++++++++
 .../python/python3-smbus_4.3.bb               |  8 +++---
 2 files changed, 30 insertions(+), 3 deletions(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-smbus/0001-Use-setuptools-as-distutils-is-deprecated.patch
meta-python/recipes-devtools/python/python3-smbus/0001-Use-setuptools-as-distutils-is-deprecated.patch new file +25 -0
new file mode 100644
index 0000000000..6aafd6a952
@@ -0,0 +1,25 @@
+Upstream-Status: Submitted [https://lore.kernel.org/linux-i2c/[email protected]/T/#u]
+Signed-off-by: Ross Burton <[email protected]>
+
+From fa522a9a390b1857a58ec1f55da1465c542fd106 Mon Sep 17 00:00:00 2001
+From: Ross Burton <[email protected]>
+Date: Fri, 14 Jan 2022 13:38:34 +0000
+Subject: [PATCH] Use setuptools as distutils is deprecated
+
+Signed-off-by: Ross Burton <[email protected]>
+---
+ py-smbus/setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/py-smbus/setup.py b/py-smbus/setup.py
+index 28a4500..26db33a 100644
+--- a/py-smbus/setup.py
++++ b/py-smbus/setup.py
+@@ -1,6 +1,6 @@
+ #!/usr/bin/env python
+ 
+-from distutils.core import setup, Extension
++from setuptools import setup, Extension
+ 
+ setup(	name="smbus",
+ 	version="1.1",
meta-python/recipes-devtools/python/python3-smbus_4.3.bb +5 -3
index a09a108b36..ecdff3adad 100644
@@ -2,13 +2,15 @@ SUMMARY = "Set of i2c tools for linux - Python module"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://py-smbus/smbusmodule.c;beginline=1;endline=18;md5=46e424fb045901ab25e0f92c28c80055"
 
-SRC_URI = "${KERNELORG_MIRROR}/software/utils/i2c-tools/i2c-tools-${PV}.tar.gz "
+SRC_URI = "${KERNELORG_MIRROR}/software/utils/i2c-tools/i2c-tools-${PV}.tar.gz \
+           file://0001-Use-setuptools-as-distutils-is-deprecated.patch \
+           "
 SRC_URI[sha256sum] = "eec464e42301d93586cbeca3845ed61bff40f560670e5b35baec57301d438148"
 
 DEPENDS += "i2c-tools"
 
 S = "${WORKDIR}/i2c-tools-${PV}"
 
-inherit distutils3
+inherit setuptools3
 
-DISTUTILS_SETUP_PATH = "${S}/py-smbus"
+SETUPTOOLS_SETUP_PATH = "${S}/py-smbus"
Signature · 1 line
2.25.1