This commit is contained in:
Koushik Dutta
2023-06-08 09:12:21 -07:00
parent be16bf7858
commit a31d6482af
3 changed files with 16 additions and 5 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/server",
"version": "0.36.0",
"version": "0.37.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@scrypted/server",
"version": "0.36.0",
"version": "0.37.0",
"license": "ISC",
"dependencies": {
"@mapbox/node-pre-gyp": "^1.0.10",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/server",
"version": "0.37.0",
"version": "0.38.0",
"description": "",
"dependencies": {
"@mapbox/node-pre-gyp": "^1.0.10",

View File

@@ -603,12 +603,23 @@ class PluginRemote:
f.write(requirements)
f.close()
p = subprocess.Popen([
try:
pythonVersion = packageJson['scrypted']['pythonVersion']
except:
pythonVersion = None
pipArgs = [
sys.executable,
'-m', 'pip', 'install', '-r', requirementstxt,
# preevent uninstalling system packages
'--ignore-installed',
'--prefix', python_prefix
], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
]
if pythonVersion:
print('Specific Python verison requested. Forcing reinstall.')
pipArgs.append('--force-reinstall')
p = subprocess.Popen(pipArgs, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
while True:
line = p.stdout.readline()