aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Orling <tim.orling@konsulko.com>2022-02-28 09:59:04 -0800
committerTim Orling <tim.orling@konsulko.com>2022-02-28 10:03:07 -0800
commit3bb6e0f2aebb7bb2e5d643bae607e18ce8513cbb (patch)
treeb2863e0976495d5d0740e133239b93c7ed0a4384
parent8b1abd256f13f9d3de6542bb47493fb2f2906a2f (diff)
downloadmeta-openembedded-contrib-timo/pyprojecttoml.tar.gz
python3-meh: patch to use setuptoolstimo/pyprojecttoml
* Add patch to switch from 'distutils' to 'setuptools' * Set PIP_INSTALL_PACKAGE = "python_meh" * Install files to ${datadir} as intended Signed-off-by: Tim Orling <tim.orling@konsulko.com>
-rw-r--r--meta-python/recipes-extended/python-meh/python3-meh/0001-setup.py-switch-from-distutils-to-setuptools.patch32
-rw-r--r--meta-python/recipes-extended/python-meh/python3-meh_0.50.1.bb11
2 files changed, 42 insertions, 1 deletions
diff --git a/meta-python/recipes-extended/python-meh/python3-meh/0001-setup.py-switch-from-distutils-to-setuptools.patch b/meta-python/recipes-extended/python-meh/python3-meh/0001-setup.py-switch-from-distutils-to-setuptools.patch
new file mode 100644
index 0000000000..b616b3fad3
--- /dev/null
+++ b/meta-python/recipes-extended/python-meh/python3-meh/0001-setup.py-switch-from-distutils-to-setuptools.patch
@@ -0,0 +1,32 @@
+From 034ac41561409ffc7836683331b6b94a641436e4 Mon Sep 17 00:00:00 2001
+From: Tim Orling <tim.orling@konsulko.com>
+Date: Mon, 28 Feb 2022 09:41:02 -0800
+Subject: [PATCH] setup.py: switch from distutils to setuptools
+
+In Python 3.10 'distutils' is deprecated with removal slated for Python
+3.12. Switch from 'distutils.core' to 'setuptools'.
+
+This also allows for a 'wheel' binary archive format to be built with
+'setup.py bdist_wheel'.
+
+Upstream-Status: Submitted
+[https://github.com/rhinstaller/python-meh/pull/37]
+
+Signed-off-by: Tim Orling <tim.orling@konsulko.com>
+
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 9c12180..3ba5195 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1,6 +1,6 @@
+ #!/usr/bin/python3
+
+-from distutils.core import setup
++from setuptools import setup
+
+ setup(name='python-meh', version='0.50.1',
+ description='Python module for handling exceptions',
diff --git a/meta-python/recipes-extended/python-meh/python3-meh_0.50.1.bb b/meta-python/recipes-extended/python-meh/python3-meh_0.50.1.bb
index bf0df021a4..96dba96123 100644
--- a/meta-python/recipes-extended/python-meh/python3-meh_0.50.1.bb
+++ b/meta-python/recipes-extended/python-meh/python3-meh_0.50.1.bb
@@ -9,8 +9,17 @@ inherit setuptools3
S = "${WORKDIR}/git"
-SRC_URI = "git://github.com/rhinstaller/python-meh.git;protocol=https;branch=rhel9-branch"
+SRC_URI = "git://github.com/rhinstaller/python-meh.git;protocol=https;branch=rhel9-branch \
+ file://0001-setup.py-switch-from-distutils-to-setuptools.patch \
+ "
SRCREV = "c321ce22950aff76611a3c6beffa02b5ea3adbed"
+PIP_INSTALL_PACKAGE = "python_meh"
+
+do_install:append () {
+ install -d ${D}/${datadir}/python-meh
+ mv ${D}${PYTHON_SITEPACKAGES_DIR}${datadir}/python-meh/* ${D}/${datadir}/python-meh/
+}
+
FILES:${PN} += "${datadir}/*"