diff mbox series

[meta-spdxscanner] python3-patch: fix an error in kirkstone

Message ID 20240203-fix-build-error-in-kirkstone-v1-1-fc36c4870de5@belden.com
State New
Headers show
Series [meta-spdxscanner] python3-patch: fix an error in kirkstone | expand

Commit Message

Patrick Vogelaar via B4 Relay Feb. 3, 2024, 10:33 p.m. UTC
From: Patrick Vogelaar <patrick.vogelaar@belden.com>

Patch python3-patch to use setuptools instead of distutils.
This fixes a build error.

Signed-off-by: Patrick Vogelaar <patrick.vogelaar@belden.com>
---
 .../0001-PATCH-setup.py-switch-to-setuptools.patch | 24 ++++++++++++++++++++++
 recipes-devtools/python/python3-patch_1.16.bb      |  4 +++-
 2 files changed, 27 insertions(+), 1 deletion(-)


---
base-commit: 8b07df1535fe1203b07fc87f8c6a1e34311e2a1d
change-id: 20240203-fix-build-error-in-kirkstone-c9141e94731e

Best regards,

Comments

Maohui Lei (Fujitsu) March 6, 2024, 3:05 a.m. UTC | #1
Hi,

Thank you for your patch. Merged.

Lei

> -----Original Message-----
> From: yocto@lists.yoctoproject.org <yocto@lists.yoctoproject.org> On Behalf
> Of Patrick Vogelaar via B4 Relay via lists.yoctoproject.org
> Sent: Sunday, February 4, 2024 6:34 AM
> To: yocto@lists.yoctoproject.org; Lei, Maohui
> <leimaohui@fujitsu.com>
> Cc: Patrick Vogelaar <patrick.vogelaar@belden.com>
> Subject: [yocto] [PATCH ][meta-spdxscanner] python3-patch: fix an error in
> kirkstone
> 
> From: Patrick Vogelaar <patrick.vogelaar@belden.com>
> 
> Patch python3-patch to use setuptools instead of distutils.
> This fixes a build error.
> 
> Signed-off-by: Patrick Vogelaar <patrick.vogelaar@belden.com>
> ---
>  .../0001-PATCH-setup.py-switch-to-setuptools.patch | 24
> ++++++++++++++++++++++
>  recipes-devtools/python/python3-patch_1.16.bb      |  4 +++-
>  2 files changed, 27 insertions(+), 1 deletion(-)
> 
> diff --git
> a/recipes-devtools/python/python3-patch/0001-PATCH-setup.py-switch-to-setu
> ptools.patch
> b/recipes-devtools/python/python3-patch/0001-PATCH-setup.py-switch-to-setu
> ptools.patch
> new file mode 100644
> index 0000000..9f9963f
> --- /dev/null
> +++ b/recipes-devtools/python/python3-patch/0001-PATCH-setup.py-switch-t
> +++ o-setuptools.patch
> @@ -0,0 +1,24 @@
> +From 314be675a933ed262687b25ea70f23d3454e3651 Mon Sep 17 00:00:00
> 2001
> +From: Patrick Vogelaar <patrick.vogelaar@belden.com>
> +Date: Thu, 1 Feb 2024 10:59:45 +0100
> +Subject: [PATCH] setup.py: switch to setuptools
> +
> +In Python 3.10, 'distutils' has been deprecated and is slated for
> +removal in Python 3.12.
> +
> +Switch from 'distutils.core' to 'setuptools'. This also allows for the
> +'wheel' binary archive format to be built with 'setup.py bdist_wheel'.
> +---
> + setup.py | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/setup.py b/setup.py
> +index 0307afd..1289f25 100644
> +--- a/setup.py
> ++++ b/setup.py
> +@@ -1,4 +1,4 @@
> +-from distutils.core import setup
> ++from setuptools import setup
> +
> + setup(
> +     name='patch',
> diff --git a/recipes-devtools/python/python3-patch_1.16.bb
> b/recipes-devtools/python/python3-patch_1.16.bb
> index 6627a2b..6e7ff15 100755
> --- a/recipes-devtools/python/python3-patch_1.16.bb
> +++ b/recipes-devtools/python/python3-patch_1.16.bb
> @@ -12,7 +12,9 @@ SRC_URI[sha256sum] =
> "c62073f356cff054c8ac24496f1a3d7cfa137835c31e9af39a9f5292fd
> 
>  inherit pypi
> 
> -SRC_URI = "${PYPI_SRC_URI};subdir=${PYPI_PACKAGE}-${PV}"
> +SRC_URI = "${PYPI_SRC_URI};subdir=${PYPI_PACKAGE}-${PV} \
> +           file://0001-PATCH-setup.py-switch-to-setuptools.patch \
> +           "
> 
>  inherit setuptools3
> 
> 
> ---
> base-commit: 8b07df1535fe1203b07fc87f8c6a1e34311e2a1d
> change-id: 20240203-fix-build-error-in-kirkstone-c9141e94731e
> 
> Best regards,
> --
> Patrick Vogelaar <patrick.vogelaar@belden.com>
diff mbox series

Patch

diff --git a/recipes-devtools/python/python3-patch/0001-PATCH-setup.py-switch-to-setuptools.patch b/recipes-devtools/python/python3-patch/0001-PATCH-setup.py-switch-to-setuptools.patch
new file mode 100644
index 0000000..9f9963f
--- /dev/null
+++ b/recipes-devtools/python/python3-patch/0001-PATCH-setup.py-switch-to-setuptools.patch
@@ -0,0 +1,24 @@ 
+From 314be675a933ed262687b25ea70f23d3454e3651 Mon Sep 17 00:00:00 2001
+From: Patrick Vogelaar <patrick.vogelaar@belden.com>
+Date: Thu, 1 Feb 2024 10:59:45 +0100
+Subject: [PATCH] setup.py: switch to setuptools
+
+In Python 3.10, 'distutils' has been deprecated and is slated for
+removal in Python 3.12.
+
+Switch from 'distutils.core' to 'setuptools'. This also allows for the
+'wheel' binary archive format to be built with 'setup.py bdist_wheel'.
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 0307afd..1289f25 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1,4 +1,4 @@
+-from distutils.core import setup
++from setuptools import setup
+ 
+ setup(
+     name='patch',
diff --git a/recipes-devtools/python/python3-patch_1.16.bb b/recipes-devtools/python/python3-patch_1.16.bb
index 6627a2b..6e7ff15 100755
--- a/recipes-devtools/python/python3-patch_1.16.bb
+++ b/recipes-devtools/python/python3-patch_1.16.bb
@@ -12,7 +12,9 @@  SRC_URI[sha256sum] = "c62073f356cff054c8ac24496f1a3d7cfa137835c31e9af39a9f5292fd
 
 inherit pypi
 
-SRC_URI = "${PYPI_SRC_URI};subdir=${PYPI_PACKAGE}-${PV}"
+SRC_URI = "${PYPI_SRC_URI};subdir=${PYPI_PACKAGE}-${PV} \
+           file://0001-PATCH-setup.py-switch-to-setuptools.patch \
+           "
 
 inherit setuptools3