Skip to contentSkip to conversation

python3-termcolor: Use setuptools instead of distutils

PATCH In review Khem Raj 2 participants 3 messages Feb 28, 2022

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 python3-termcolor: Use setuptools instead of distutils

Cc Justin Bronder <[email protected]>
---
 ...-Use-setuptools-instead-of-distutils.patch | 27 +++++++++++++++++++
 .../python/python3-termcolor_1.1.0.bb         |  3 ++-
 2 files changed, 29 insertions(+), 1 deletion(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-termcolor/0001-setup.py-Use-setuptools-instead-of-distutils.patch
meta-python/recipes-devtools/python/python3-termcolor/0001-setup.py-Use-setuptools-instead-of-distutils.patch new file +27 -0
new file mode 100644
index 0000000000..a55a6a914b
@@ -0,0 +1,27 @@
+From e30308284c721210e2ba50d8b3d159cedf5eada8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 28 Feb 2022 14:44:42 -0800
+Subject: [PATCH] setup.py: Use setuptools instead of distutils
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index c4fe4ed..dad1d29 100755
+--- a/setup.py
++++ b/setup.py
+@@ -23,7 +23,7 @@
+ # Author: Konstantin Lepa <[email protected]>
+ 
+ import os
+-from distutils.core import setup
++from setuptools import setup
+ 
+ prjdir = os.path.dirname(__file__)
+ 
+-- 
+2.35.1
+
meta-python/recipes-devtools/python/python3-termcolor_1.1.0.bb +2 -1
index 17df7f983d..15bab622a6 100644
@@ -6,7 +6,8 @@ LIC_FILES_CHKSUM = "file://COPYING.txt;md5=809e8749b63567978acfbd81d9f6a27d"
 
 inherit pypi setuptools3
 
-SRC_URI[md5sum] = "043e89644f8909d462fbbfa511c768df"
+SRC_URI += "file://0001-setup.py-Use-setuptools-instead-of-distutils.patch"
+
 SRC_URI[sha256sum] = "1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b"
 
 BBCLASSEXTEND = "native"
Signature · 1 line
2.35.1
#1 lore raw

So, am I right to stand corrected that patching stagnant projects to use distutils over setuptools is preferable to dropping the recipe? I had assumed from other distribution work that cleaning things out when the opportunity arose was the norm. If so, I'll stop trying to figure out if upstream is active and will fix the package along with sending patch upstream.

Regardless,

Quoted 58 lines · Khem Raj
Cc Justin Bronder <[email protected]>
---
 ...-Use-setuptools-instead-of-distutils.patch | 27 +++++++++++++++++++
 .../python/python3-termcolor_1.1.0.bb         |  3 ++-
 2 files changed, 29 insertions(+), 1 deletion(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-termcolor/0001-setup.py-Use-setuptools-instead-of-distutils.patch
meta-python/recipes-devtools/python/python3-termcolor/0001-setup.py-Use-setuptools-instead-of-distutils.patch new file +27 -0
new file mode 100644
index 0000000000..a55a6a914b
@@ -0,0 +1,27 @@
+From e30308284c721210e2ba50d8b3d159cedf5eada8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 28 Feb 2022 14:44:42 -0800
+Subject: [PATCH] setup.py: Use setuptools instead of distutils
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index c4fe4ed..dad1d29 100755
+--- a/setup.py
++++ b/setup.py
+@@ -23,7 +23,7 @@
+ # Author: Konstantin Lepa <[email protected]>
+ 
+ import os
+-from distutils.core import setup
++from setuptools import setup
+ 
+ prjdir = os.path.dirname(__file__)
+ 
+-- 
+2.35.1
+
meta-python/recipes-devtools/python/python3-termcolor_1.1.0.bb +2 -1
index 17df7f983d..15bab622a6 100644
@@ -6,7 +6,8 @@ LIC_FILES_CHKSUM = "file://COPYING.txt;md5=809e8749b63567978acfbd81d9f6a27d"
 
 inherit pypi setuptools3
 
-SRC_URI[md5sum] = "043e89644f8909d462fbbfa511c768df"
+SRC_URI += "file://0001-setup.py-Use-setuptools-instead-of-distutils.patch"
+
 SRC_URI[sha256sum] = "1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b"
 
 BBCLASSEXTEND = "native"
Signature · 1 line
2.35.1
Signature · 1 line
Justin Bronder
author
#2 lore raw
Quoted 6 lines · Justin Bronder

So, am I right to stand corrected that patching stagnant projects to use distutils over setuptools is preferable to dropping the recipe? I had assumed from other distribution work that cleaning things out when the opportunity arose was the norm. If so, I'll stop trying to figure out if upstream is active and will fix the package along with sending patch upstream.

you are doing the right thing and removal is on cards. These recipes were however added in 2019 and 2020 into OE
so I thought of giving an opportunity to original submitters to comment before we can remove them.

Quoted 76 lines

Regardless,

Quoted 56 lines · Khem Raj
Cc Justin Bronder <[email protected]>
---
 ...-Use-setuptools-instead-of-distutils.patch | 27 +++++++++++++++++++
 .../python/python3-termcolor_1.1.0.bb         |  3 ++-
 2 files changed, 29 insertions(+), 1 deletion(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-termcolor/0001-setup.py-Use-setuptools-instead-of-distutils.patch
meta-python/recipes-devtools/python/python3-termcolor/0001-setup.py-Use-setuptools-instead-of-distutils.patch new file +27 -0
new file mode 100644
index 0000000000..a55a6a914b
@@ -0,0 +1,27 @@
+From e30308284c721210e2ba50d8b3d159cedf5eada8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 28 Feb 2022 14:44:42 -0800
+Subject: [PATCH] setup.py: Use setuptools instead of distutils
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index c4fe4ed..dad1d29 100755
+--- a/setup.py
++++ b/setup.py
+@@ -23,7 +23,7 @@
+ # Author: Konstantin Lepa <[email protected]>
+
+ import os
+-from distutils.core import setup
++from setuptools import setup
+
+ prjdir = os.path.dirname(__file__)
+
+--
+2.35.1
+
meta-python/recipes-devtools/python/python3-termcolor_1.1.0.bb +2 -2
index 17df7f983d..15bab622a6 100644
@@ -6,7 +6,8 @@ LIC_FILES_CHKSUM = "file://COPYING.txt;md5=809e8749b63567978acfbd81d9f6a27d"
 
 inherit pypi setuptools3
 
-SRC_URI[md5sum] = "043e89644f8909d462fbbfa511c768df"
+SRC_URI += "file://0001-setup.py-Use-setuptools-instead-of-distutils.patch"
+
 SRC_URI[sha256sum] = "1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b"
 
 BBCLASSEXTEND = "native"
--
Quoted 2 lines

2.35.1

--
Justin Bronder

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#95607): https://lists.openembedded.org/g/openembedded-devel/message/95607
Mute This Topic: https://lists.openembedded.org/mt/89463744/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-