Use run-python3 for python script running.

This commit is contained in:
Viktor Kovacs 2022-12-24 18:31:35 +01:00
parent e489ce5c32
commit d07514bcd5
3 changed files with 46 additions and 24 deletions

16
package-lock.json generated
View File

@ -28,6 +28,7 @@
"jsdoc": "^4.0.0",
"mocha": "^10.2.0",
"oslllo-svg-fixer": "^2.2.0",
"run-python3": "^0.0.1",
"svgo": "^3.0.2"
}
},
@ -4672,6 +4673,15 @@
"queue-microtask": "^1.2.2"
}
},
"node_modules/run-python3": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/run-python3/-/run-python3-0.0.1.tgz",
"integrity": "sha512-NI+wFuHhktuoBiCfyZxTiQWqM7GLZs967kZDhsli5HEnsYRLTDc+hPoFpQeyvy8sTCNb/Edow0f88Hgz3w6VBg==",
"dev": true,
"bin": {
"run-python3": "index.js"
}
},
"node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
@ -8968,6 +8978,12 @@
"queue-microtask": "^1.2.2"
}
},
"run-python3": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/run-python3/-/run-python3-0.0.1.tgz",
"integrity": "sha512-NI+wFuHhktuoBiCfyZxTiQWqM7GLZs967kZDhsli5HEnsYRLTDc+hPoFpQeyvy8sTCNb/Edow0f88Hgz3w6VBg==",
"dev": true
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",

View File

@ -8,9 +8,27 @@
"module": "./source/engine/main.js",
"repository": "github:kovacsv/Online3DViewer",
"keywords": [
"3d", "viewer", "cad",
"obj", "3ds", "stl", "ply", "gltf", "glb", "off", "3dm", "fbx",
"dae", "wrl", "3mf", "ifc", "brep", "step", "iges", "fcstd", "bim"
"3d",
"viewer",
"cad",
"obj",
"3ds",
"stl",
"ply",
"gltf",
"glb",
"off",
"3dm",
"fbx",
"dae",
"wrl",
"3mf",
"ifc",
"brep",
"step",
"iges",
"fcstd",
"bim"
],
"files": [
"build/o3dv.min.js",
@ -24,13 +42,13 @@
"lint": "eslint source",
"lint_fix": "eslint source --fix",
"docs": "jsdoc -c tools/jsdoc.json",
"update_libs": "npm install && node tools/run_python.js tools/update_libs.py",
"generate_icon_font": "node tools/run_python.js tools/generate_icon_font.py",
"update_engine_exports": "node tools/run_python.js tools/update_engine_exports.py",
"update_libs": "npm install && run-python3 tools/update_libs.py",
"generate_icon_font": "run-python3 tools/generate_icon_font.py",
"update_engine_exports": "run-python3 tools/update_engine_exports.py",
"create_dist": "npm run create_package && npm run lint && npm run test",
"create_dist_test": "npm run create_package_test && npm run lint && npm run test",
"create_package": "npm run build_engine_prod && npm run build_website_prod && npm run build_css_prod && node tools/run_python.js tools/create_package.py",
"create_package_test": "npm run build_engine_prod && npm run build_website_prod && npm run build_css_prod && node tools/run_python.js tools/create_package.py test",
"create_package": "npm run build_engine_prod && npm run build_website_prod && npm run build_css_prod && run-python3 tools/create_package.py",
"create_package_test": "npm run build_engine_prod && npm run build_website_prod && npm run build_css_prod && run-python3 tools/create_package.py test",
"build_css_prod": "cleancss -o build/o3dv.website.min.css website/css/*",
"build_dev": "npm run build_engine_dev && npm run build_website_dev",
"build_engine_dev": "npm run update_engine_exports && esbuild source/engine/main.js --bundle --minify --global-name=OV --sourcemap --outfile=build/o3dv.min-dev.js",
@ -49,16 +67,17 @@
"jsdoc": "^4.0.0",
"mocha": "^10.2.0",
"oslllo-svg-fixer": "^2.2.0",
"run-python3": "^0.0.1",
"svgo": "^3.0.2"
},
"dependencies": {
"@simonwep/pickr": "1.8.2",
"draco3d": "1.5.5",
"fflate": "0.7.4",
"occt-import-js": "0.0.14",
"rhino3dm": "7.15.0",
"three": "0.147.0",
"web-ifc": "0.0.35",
"occt-import-js" : "0.0.14"
"web-ifc": "0.0.35"
},
"eslintConfig": {
"env": {
@ -75,7 +94,7 @@
"DracoDecoderModule": "readonly",
"rhino3dm": "readonly",
"WebIFC": "readonly",
"occtimportjs" : "readonly"
"occtimportjs": "readonly"
},
"parserOptions": {
"ecmaVersion": 12,

View File

@ -1,13 +0,0 @@
import * as childProcess from '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);