new file mode 100644
@@ -0,0 +1,27 @@
+From 04d9a4cea699d64b464daef7760de594b1c7f9bf Mon Sep 17 00:00:00 2001
+From: Justin Bronder <jsbronder@cold-front.org>
+Date: Tue, 1 Mar 2022 17:34:34 -0500
+Subject: [PATCH] setup.py: use setuptools instead of distutils
+
+With python 3.10, distutils is deprecated in favor of setuptools and will
+be removed in python 3.12.
+
+Upstream-Status: Submitted [sent to maintainer at russell-lrparsing@stuart.id.au]
+Signed-off-by: Justin Bronder <jsbronder@cold-front.org>
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 89ea344..2848b4f 100644
+--- a/setup.py
++++ b/setup.py
+@@ -3,7 +3,7 @@
+ # Copyright (c) 2013,2014,2015,2016,2017,2018,2021 Russell Stuart.
+ # Licensed under GPLv2, or any later version.
+ #
+-from distutils.core import setup
++from setuptools import setup
+ import re
+
+ def get_long_description():
@@ -7,7 +7,9 @@ HOMEPAGE = "http://lrparsing.sourceforge.net/"
BUGTRACKER = "https://sourceforge.net/p/lrparsing/tickets/"
UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/lrparsing/files/"
UPSTREAM_CHECK_REGEX = "lrparsing-(?P<pver>\d+(\.\d+)+)"
-SRC_URI = "${SOURCEFORGE_MIRROR}/lrparsing/lrparsing-${PV}.tar.gz"
+SRC_URI = "${SOURCEFORGE_MIRROR}/lrparsing/lrparsing-${PV}.tar.gz \
+ file://0001-setup.py-use-setuptools-instead-of-distutils.patch \
+ "
SRC_URI[sha256sum] = "7c060d9f03cf582fdbc0ae0fef0ea2ff6fd56251047ba7e425af97e23f46f582"
RDEPENDS:${PN} = " \
@@ -15,6 +17,7 @@ RDEPENDS:${PN} = " \
"
inherit setuptools3
+PIP_INSTALL_PACKAGE = "lrparsing"
S = "${WORKDIR}/lrparsing-${PV}"
Recipe also does not inherit pypi nor would PN be a good guess at the name of the wheel. Set PIP_INSTALL_PACKAGE appropriately. Signed-off-by: Justin Bronder <jsbronder@cold-front.org> --- ...-use-setuptools-instead-of-distutils.patch | 27 +++++++++++++++++++ .../python/python3-lrparsing_1.0.17.bb | 5 +++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 meta-python/recipes-devtools/python/python3-lrparsing/0001-setup.py-use-setuptools-instead-of-distutils.patch