aboutsummaryrefslogtreecommitdiff
path: root/src/core.py
diff options
context:
space:
mode:
authortassaron2022-04-22 17:09:50 -0400
committertassaron2022-04-22 17:09:50 -0400
commit05d2ebc3c69f5a876d602004f69202c5ba8b09f7 (patch)
treeea3eeb6f356ed2cb06b536878134dace39b38eb4 /src/core.py
parent2a66c3b77bb8c438a3f278da2d4d90a7ee476feb (diff)
make pip-installable as a package
Diffstat (limited to 'src/core.py')
-rw-r--r--src/core.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core.py b/src/core.py
index d7445c9..bc6f9b4 100644
--- a/src/core.py
+++ b/src/core.py
@@ -9,12 +9,12 @@ import json
from importlib import import_module
import logging
-import toolkit
+from . import toolkit
log = logging.getLogger('AVP.Core')
STDOUT_LOGLVL = logging.WARNING
-FILE_LOGLVL = None
+FILE_LOGLVL = logging.ERROR
class Core:
@@ -47,7 +47,7 @@ class Core:
yield name
log.debug('Importing component modules')
self.modules = [
- import_module('components.%s' % name)
+ import_module('.components.%s' % name, __package__)
for name in findComponents()
]
# store canonical module names and indexes
@@ -426,7 +426,7 @@ class Core:
def newVideoWorker(self, loader, audioFile, outputPath):
'''loader is MainWindow or Command object which must own the thread'''
- import video_thread
+ from . import video_thread
self.videoThread = QtCore.QThread(loader)
videoWorker = video_thread.Worker(
loader, audioFile, outputPath, self.selectedComponents
@@ -450,8 +450,8 @@ class Core:
@classmethod
def storeSettings(cls):
'''Store settings/paths to directories as class variables'''
- from __init__ import wd
- from toolkit.ffmpeg import findFfmpeg
+ from .__init__ import wd
+ from .toolkit.ffmpeg import findFfmpeg
cls.wd = wd
dataDir = QtCore.QStandardPaths.writableLocation(