Skip to content

Commit

Permalink
postbeta
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Mar 9, 2024
1 parent 3e3e650 commit 1cb9985
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions server/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ scrypted.db.bak
.exit
.update
.venv
py
3 changes: 2 additions & 1 deletion server/bin/postinstall
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env node

const path = require('path');
const child_process = require('child_process');
const { PortablePython } = require('@bjia56/portable-python')
const { once } = require('events');
Expand All @@ -13,7 +14,7 @@ async function pipInstall(pkg) {
}

async function installScryptedServerRequirements() {
const py = new PortablePython("3.9");
const py = new PortablePython("3.9", path.join(path.dirname(__dirname), 'py'));
await py.install();
python = py.executablePath;

Expand Down
4 changes: 2 additions & 2 deletions server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scrypted/server",
"version": "0.94.20",
"version": "0.94.21",
"description": "",
"dependencies": {
"@bjia56/portable-python": "^0.1.3",
Expand Down
2 changes: 1 addition & 1 deletion server/src/plugin/runtime/python-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class PythonRuntimeWorker extends ChildProcessWorker {
static {
try {
const PortablePython = require('@bjia56/portable-python').PortablePython as typeof PortablePythonType;
const py = new PortablePython("3.9");
const py = new PortablePython("3.9", path.join(path.dirname(__dirname), '..', '..', 'py'));
const portablePython = py.executablePath;
if (fs.existsSync(portablePython))
process.env.SCRYPTED_PYTHON_PATH = portablePython;
Expand Down

0 comments on commit 1cb9985

Please sign in to comment.