Run the correct python version with a node.js script.
This commit is contained in:
parent
fef0d8070c
commit
6baf5b4767
@ -15,8 +15,8 @@
|
||||
"scripts": {
|
||||
"test": "mocha test",
|
||||
"coverage": "nyc mocha test",
|
||||
"build": "py -3 tools/create_package.py",
|
||||
"update": "py -3 tools/update_includes.py",
|
||||
"svg": "py -3 tools/optimize_svg_files.py"
|
||||
"build": "node tools/run_python.js tools/create_package.py",
|
||||
"update": "node tools/run_python.js tools/update_includes.py",
|
||||
"svg": "node tools/run_python.js tools/optimize_svg_files.py"
|
||||
}
|
||||
}
|
||||
|
||||
13
tools/run_python.js
Normal file
13
tools/run_python.js
Normal file
@ -0,0 +1,13 @@
|
||||
let childProcess = require ('child_process');
|
||||
|
||||
let pythonExecutable = 'python';
|
||||
if (process.platform !== 'win32') {
|
||||
pythonExecutable = 'python3';
|
||||
}
|
||||
|
||||
let args = process.argv.slice (2);
|
||||
let result = childProcess.spawnSync (pythonExecutable, args, {
|
||||
stdio: "inherit"
|
||||
});
|
||||
|
||||
process.exit (result.status);
|
||||
Loading…
Reference in New Issue
Block a user