Run backend in separate env

This commit is contained in:
Core447 2024-01-14 13:56:10 +01:00
parent 5898fae1e9
commit 9f5ca70e10
No known key found for this signature in database
GPG Key ID: 5B97C0BD62F98516
3 changed files with 13 additions and 4 deletions

6
__install__.py Normal file
View File

@ -0,0 +1,6 @@
from streamcontroller_plugin_tools.installation_helpers import create_venv
from os.path import join, abspath, dirname
print("installing")
toplevel = dirname(abspath(__file__))
create_venv(join(toplevel, ".venv"), join(toplevel, "requirements.txt"))

View File

@ -1,4 +1,3 @@
from plugins.dev_core447_OBSPlugin.backend.OBSController import OBSController
from src.backend.PluginManager.ActionBase import ActionBase
from src.backend.PluginManager.PluginBase import PluginBase
@ -13,7 +12,6 @@ import os
import threading
from datetime import timedelta
from loguru import logger as log
from obswebsocket import events
# Add plugin to sys.paths
sys.path.append(os.path.dirname(__file__))
@ -30,7 +28,7 @@ class OBS(PluginBase):
super().__init__()
# Launch backend
self.launch_backend(os.path.join(self.PATH, "backend", "backend.py"))
self.launch_backend(os.path.join(self.PATH, "backend", "backend.py"), os.path.join(self.PATH, ".venv"))
self.add_action(ToggleRecord)
self.add_action(RecPlayPause)

View File

@ -1 +1,6 @@
obs-websocket-py>=1.0
loguru==0.7.2
obs-websocket-py==1.0
Pyro5==5.15
serpent==1.41
streamcontroller-plugin-tools>=0.0.4
websocket-client==1.7.0