From d969f5eb93dc2b33284c9f1c0d3aef0653e7725a Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Mon, 19 Sep 2022 15:01:15 +0000 Subject: [PATCH] - new_python3.patch: enable python 3.11 as valid interpreter OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs18?expand=0&rev=10 --- new_python3.patch | 21 +++++++++++++++++++++ nodejs18.changes | 1 + nodejs18.spec | 5 ++++- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 new_python3.patch diff --git a/new_python3.patch b/new_python3.patch new file mode 100644 index 0000000..90c4295 --- /dev/null +++ b/new_python3.patch @@ -0,0 +1,21 @@ +Index: node-v18.9.0/configure +=================================================================== +--- node-v18.9.0.orig/configure ++++ node-v18.9.0/configure +@@ -4,6 +4,7 @@ + # Note that the mix of single and double quotes is intentional, + # as is the fact that the ] goes on a new line. + _=[ 'exec' '/bin/sh' '-c' ''' ++command -v python3.11 >/dev/null && exec python3.11 "$0" "$@" + command -v python3.10 >/dev/null && exec python3.10 "$0" "$@" + command -v python3.9 >/dev/null && exec python3.9 "$0" "$@" + command -v python3.8 >/dev/null && exec python3.8 "$0" "$@" +@@ -22,7 +23,7 @@ except ImportError: + from distutils.spawn import find_executable as which + + print('Node.js configure: Found Python {}.{}.{}...'.format(*sys.version_info)) +-acceptable_pythons = ((3, 10), (3, 9), (3, 8), (3, 7), (3, 6), (3, 4)) ++acceptable_pythons = ((3, 11), (3, 10), (3, 9), (3, 8), (3, 7), (3, 6), (3, 4)) + if sys.version_info[:2] in acceptable_pythons: + import configure + else: diff --git a/nodejs18.changes b/nodejs18.changes index b2e078d..d050bd6 100644 --- a/nodejs18.changes +++ b/nodejs18.changes @@ -24,6 +24,7 @@ Thu Sep 15 15:00:25 UTC 2022 - Adam Majer - nodejs-libpath.patch, versioned.patch: refreshed - fix_ci_tests.patch: partially upstreamed - openssl3_fixups.patch: fix unit tests with openssl 1.1.1 +- new_python3.patch: enable python 3.11 as valid interpreter ------------------------------------------------------------------- Thu Aug 18 10:41:57 UTC 2022 - Adam Majer diff --git a/nodejs18.spec b/nodejs18.spec index 1103d95..da4f5ce 100644 --- a/nodejs18.spec +++ b/nodejs18.spec @@ -171,7 +171,7 @@ Patch133: rsa-pss-revert.patch Patch200: versioned.patch Patch303: openssl3_fixups.patch - +Patch304: new_python3.patch BuildRequires: pkg-config BuildRequires: fdupes @@ -667,6 +667,7 @@ tar Jxf %{SOURCE11} %patch200 -p1 %patch303 -p1 +%patch304 -p1 %if %{node_version_number} <= 12 # minimist security update - patch50 @@ -981,9 +982,11 @@ make test-ci %files devel %defattr(-, root, root) %{_includedir}/node%{node_version_number} +%if %{node_version_number} < 18 %dir %{_datadir}/systemtap %dir %{_datadir}/systemtap/tapset %{_datadir}/systemtap/tapset/node%{node_version_number}.stp +%endif %files docs %defattr(-,root,root)