File sle12_python3_compat.patch of Package nodejs16
36
1
Index: node-v16.13.0/configure
2
===================================================================
3
--- node-v16.13.0.orig/configure
4
+++ node-v16.13.0/configure
5
6
from distutils.spawn import find_executable as which
7
8
print('Node.js configure: Found Python {}.{}.{}...'.format(*sys.version_info))
9
-acceptable_pythons = ((3, 10), (3, 9), (3, 8), (3, 7), (3, 6))
10
+acceptable_pythons = ((3, 10), (3, 9), (3, 8), (3, 7), (3, 6), (3, 4))
11
if sys.version_info[:2] in acceptable_pythons:
12
import configure
13
else:
14
Index: node-v16.13.0/deps/npm/node_modules/node-gyp/lib/find-python.js
15
===================================================================
16
--- node-v16.13.0.orig/deps/npm/node_modules/node-gyp/lib/find-python.js
17
+++ node-v16.13.0/deps/npm/node_modules/node-gyp/lib/find-python.js
18
19
const programFilesX86 = process.env['ProgramFiles(x86)'] || `${programFiles} (x86)`
20
21
const winDefaultLocationsArray = []
22
-for (const majorMinor of ['39', '38', '37', '36']) {
23
+for (const majorMinor of ['39', '38', '37', '36', '34']) {
24
if (foundLocalAppData) {
25
winDefaultLocationsArray.push(
26
`${localAppData}\\Programs\\Python\\Python${majorMinor}\\python.exe`,
27
28
log: logWithPrefix(log, 'find Python'),
29
argsExecutable: ['-c', 'import sys; print(sys.executable);'],
30
argsVersion: ['-c', 'import sys; print("%s.%s.%s" % sys.version_info[:3]);'],
31
- semverRange: '>=3.6.0',
32
+ semverRange: '>=3.4.0',
33
34
// These can be overridden for testing:
35
execFile: cp.execFile,
36