diff mbox series

[meta-oe,kirkstone,1/1] Nodejs: Fixed python3 DeprecationWarning

Message ID 20221220054323.509951-1-archana.polampalli@windriver.com
State Under Review
Delegated to: Armin Kuster
Headers show
Series [meta-oe,kirkstone,1/1] Nodejs: Fixed python3 DeprecationWarning | expand

Commit Message

Polampalli, Archana Dec. 20, 2022, 5:43 a.m. UTC
Distutils package and pipes are deprecated and slated for removal in Python 3.13 for Nodejs 16.18
Replaced distutils with setuptools

Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
---
 ...odejs-Fixed-pipes-DeprecationWarning.patch | 35 +++++++++++++++++++
 .../recipes-devtools/nodejs/nodejs_16.18.1.bb |  3 +-
 2 files changed, 37 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-devtools/nodejs/nodejs/0001-Nodejs-Fixed-pipes-DeprecationWarning.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-Nodejs-Fixed-pipes-DeprecationWarning.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-Nodejs-Fixed-pipes-DeprecationWarning.patch
new file mode 100644
index 000000000..1f54d444d
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-Nodejs-Fixed-pipes-DeprecationWarning.patch
@@ -0,0 +1,35 @@ 
+From 70a008c59992b0ac6a868530bc3e249b7777ab95 Mon Sep 17 00:00:00 2001
+From: Archana Polampalli <archana.polampalli@windriver.com>
+Date: Fri, 16 Dec 2022 05:19:06 +0000
+Subject: [PATCH] Nodejs: Fixed pipes DeprecationWarning
+
+DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13
+
+Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
+---
+ configure.py | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/configure.py b/configure.py
+index d3192ca04c..8d279220fd 100755
+--- a/configure.py
++++ b/configure.py
+@@ -5,7 +5,6 @@ import sys
+ import errno
+ import argparse
+ import os
+-import pipes
+ import pprint
+ import re
+ import shlex
+@@ -2041,7 +2040,7 @@ write('config.gypi', do_not_edit +
+       pprint.pformat(output, indent=2, width=1024) + '\n')
+
+ write('config.status', '#!/bin/sh\nset -x\nexec ./configure ' +
+-      ' '.join([pipes.quote(arg) for arg in original_argv]) + '\n')
++      ' '.join([shlex.quote(arg) for arg in original_argv]) + '\n')
+ os.chmod('config.status', 0o775)
+
+
+--
+2.34.1
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_16.18.1.bb b/meta-oe/recipes-devtools/nodejs/nodejs_16.18.1.bb
index a67948320..e755d0c9a 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs_16.18.1.bb
+++ b/meta-oe/recipes-devtools/nodejs/nodejs_16.18.1.bb
@@ -7,7 +7,7 @@  DEPENDS = "openssl"
 DEPENDS:append:class-target = " qemu-native"
 DEPENDS:append:class-native = " c-ares-native"
 
-inherit pkgconfig python3native qemu
+inherit pkgconfig python3native qemu setuptools3
 
 COMPATIBLE_MACHINE:armv4 = "(!.*armv4).*"
 COMPATIBLE_MACHINE:armv5 = "(!.*armv5).*"
@@ -25,6 +25,7 @@  SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
            file://system-c-ares.patch \
            file://0001-liftoff-Correct-function-signatures.patch \
            file://0001-mips-Use-32bit-cast-for-operand-on-mips32.patch \
+           file://0001-Nodejs-Fixed-pipes-DeprecationWarning.patch \
            "
 SRC_URI:append:class-target = " \
            file://0001-Using-native-binaries.patch \