- sle12_python3_compat.patch: Adds Python 3.4 to compatible

python versions allowing us to build with python3 on SLE-12

OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs13?expand=0&rev=12
This commit is contained in:
2020-01-03 15:07:35 +00:00
committed by Git OBS Bridge
parent 25ae34fa2e
commit 96e2982ae4
3 changed files with 35 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jan 3 15:03:17 UTC 2020 - Adam Majer <adam.majer@suse.de>
- sle12_python3_compat.patch: Adds Python 3.4 to compatible
python versions allowing us to build with python3 on SLE-12
-------------------------------------------------------------------
Thu Dec 19 14:05:11 UTC 2019 - Adam Majer <adam.majer@suse.de>

View File

@@ -121,6 +121,7 @@ Source20: bash_output_helper.bash
## Patches not distribution specific
Patch2: python3.patch
Patch3: fix_ci_tests.patch
Patch5: sle12_python3_compat.patch
Patch7: manual_configure.patch
@@ -318,6 +319,12 @@ echo "`grep node-v%{version}.tar.xz %{S:1} | head -n1 | cut -c1-64` %{S:0}" | s
%setup -q -n node-%{version}
%endif
%if %{node_version_number} == 6
# Update NPM
rm -r deps/npm
tar Jxvf %{SOURCE10}
%endif
%if %{node_version_number} >= 10
tar Jxvf %{SOURCE11}
%endif # node_version_number
@@ -326,6 +333,7 @@ tar Jxvf %{SOURCE11}
%patch3 -p1
%if ! 0%{with intree_openssl}
%endif
%patch5 -p1
%patch7 -p1
%if 0%{with valgrind_tests}
%endif

View File

@@ -0,0 +1,21 @@
Index: node-v13.5.0/configure
===================================================================
--- node-v13.5.0.orig/configure
+++ node-v13.5.0/configure
@@ -11,6 +11,7 @@ which python3.8 >/dev/null && exec pytho
which python3.7 >/dev/null && exec python3.7 "$0" "$@"
which python3.6 >/dev/null && exec python3.6 "$0" "$@"
which python3.5 >/dev/null && exec python3.5 "$0" "$@"
+which python3.4 >/dev/null && exec python3.4 "$0" "$@"
which python2.7 >/dev/null && exec python2.7 "$0" "$@"
exec python "$0" "$@"
''' "$0" "$@"
@@ -21,7 +22,7 @@ import sys
from distutils.spawn import find_executable
print('Node.js configure: Found Python {0}.{1}.{2}...'.format(*sys.version_info))
-acceptable_pythons = ((3, 8), (3, 7), (3, 6), (3, 5), (2, 7))
+acceptable_pythons = ((3, 8), (3, 7), (3, 6), (3, 5), (3, 4), (2, 7))
if sys.version_info[:2] in acceptable_pythons:
import configure
else: