nodejs20/sle12_python3_compat.patch

36 lines
1.6 KiB
Diff

Index: node-v19.1.0/configure
===================================================================
--- node-v19.1.0.orig/configure
+++ node-v19.1.0/configure
@@ -23,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, 11), (3, 10), (3, 9), (3, 8), (3, 7), (3, 6))
+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:
Index: node-v19.1.0/deps/npm/node_modules/node-gyp/lib/find-python.js
===================================================================
--- node-v19.1.0.orig/deps/npm/node_modules/node-gyp/lib/find-python.js
+++ node-v19.1.0/deps/npm/node_modules/node-gyp/lib/find-python.js
@@ -15,7 +15,7 @@ const programFiles = process.env.Program
const programFilesX86 = process.env['ProgramFiles(x86)'] || `${programFiles} (x86)`
const winDefaultLocationsArray = []
-for (const majorMinor of ['39', '38', '37', '36']) {
+for (const majorMinor of ['39', '38', '37', '36', '34']) {
if (foundLocalAppData) {
winDefaultLocationsArray.push(
`${localAppData}\\Programs\\Python\\Python${majorMinor}\\python.exe`,
@@ -49,7 +49,7 @@ PythonFinder.prototype = {
log: logWithPrefix(log, 'find Python'),
argsExecutable: ['-c', 'import sys; print(sys.executable);'],
argsVersion: ['-c', 'import sys; print("%s.%s.%s" % sys.version_info[:3]);'],
- semverRange: '>=3.6.0',
+ semverRange: '>=3.4.0',
// These can be overridden for testing:
execFile: cp.execFile,