can install to multiple projects

master
BrOakes 2018-11-20 19:28:11 -05:00
parent bcd56daebd
commit a0572460ca
5 changed files with 7 additions and 9 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "portapy", "name": "portapy",
"version": "0.0.7", "version": "0.0.11",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,12 +1,12 @@
{ {
"name": "portapy", "name": "portapy",
"version": "0.0.7", "version": "0.0.11",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"postinstall": "node postinstall.js", "postinstall": "node scripts/postinstall.js",
"preuninstall": "node uninstall.js", "preuninstall": "node scripts/uninstall.js",
"clean": "node clean.js" "clean": "node clean.js"
}, },
"bin": { "bin": {

View File

@ -3,7 +3,6 @@ let {execSync} = require('child_process');
let pythonDownloader = require('../util/downloadpython.js') let pythonDownloader = require('../util/downloadpython.js')
pythonDownloader.download(); pythonDownloader.download();
// execSync('"Python/Scripts/pip.exe" install --target=worldengine/lib numpy six pypng pyplatec', { // execSync('"Python/Scripts/pip.exe" install --target=worldengine/lib numpy six pypng pyplatec', {
// stdio: 'inherit' // stdio: 'inherit'

View File

@ -5,9 +5,9 @@ let installerFilename = fs.readFileSync('.installerLocation').toString();
let pythonInstallerPath = path.resolve(__dirname, 'Python-Installer', installerFilename); let pythonInstallerPath = path.resolve(__dirname, 'Python-Installer', installerFilename);
let pythonPath = path.resolve(__dirname, 'Python'); // let pythonPath = path.resolve(__dirname, 'Python');
fs.rmdirSync(pythonPath); // fs.rmdirSync(pythonPath);
// require('child_process').execSync(`${pythonInstallerPath} /passive /uninstall`, { // require('child_process').execSync(`${pythonInstallerPath} /passive /uninstall`, {

View File

@ -14,7 +14,6 @@ async function download() {
let url = await getPythonDownloadLink(); let url = await getPythonDownloadLink();
let filename = path.parse(url).base; let filename = path.parse(url).base;
try { try {
fs.mkdirSync('Python-Installer'); fs.mkdirSync('Python-Installer');
} catch(e) {'';} } catch(e) {'';}
@ -31,7 +30,6 @@ async function download() {
let out_file = `Python-Installer/${filename}` let out_file = `Python-Installer/${filename}`
await new Promise(resolve => { await new Promise(resolve => {
request({ request({
uri: url, uri: url,
@ -65,6 +63,7 @@ async function download() {
execSync(`${installerPath} /passive /uninstall`, { execSync(`${installerPath} /passive /uninstall`, {
stdio: 'inherit' stdio: 'inherit'
}); });
fs.rmdirSync(tempPath); fs.rmdirSync(tempPath);
console.log("PordaPy Installed!"); console.log("PordaPy Installed!");