summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaine2020-06-20 15:14:30 +0530
committerBlaine2020-06-20 15:14:30 +0530
commitd67b4b853ffd4677d2a96704cb0ed5581c59c444 (patch)
tree8c6047957005a1def9404d3c9ee7c7e35f2da0bb
parent3a8e328002ad4c86ec0dccef1efe18ccc2742077 (diff)
downloadChemical-PFD-d67b4b853ffd4677d2a96704cb0ed5581c59c444.tar.gz
Chemical-PFD-d67b4b853ffd4677d2a96704cb0ed5581c59c444.tar.bz2
Chemical-PFD-d67b4b853ffd4677d2a96704cb0ed5581c59c444.zip
symbol gen script
-rw-r--r--build.py7
-rw-r--r--src/main/python/utils/custom.py2
2 files changed, 6 insertions, 3 deletions
diff --git a/build.py b/build.py
index d096792..91a66fb 100644
--- a/build.py
+++ b/build.py
@@ -1,17 +1,20 @@
from fbs.cmdline import command
from os.path import dirname
import subprocess
-
+import sys
import fbs.cmdline
import fbs
+sys.path.append('src/main/python/')
+
@command
def compileResources():
subprocess.call("pyrcc5 -o src/main/python/resources/resources.py src/main/ui/resources.rcc", shell=True)
@command
def symbolGen():
- exec(open('src/main/python/utils/custom.py').read())
+ from utils import custom
+ custom.main()
@command
def build():
diff --git a/src/main/python/utils/custom.py b/src/main/python/utils/custom.py
index fedecdb..2c8ffc6 100644
--- a/src/main/python/utils/custom.py
+++ b/src/main/python/utils/custom.py
@@ -279,7 +279,7 @@ class OutputBox(QTextEdit):
self.setFontWeight(10)
self.setHtml(text)
-if __name__ == '__main__': # 1. Instantiate ApplicationContext
+def main(): # 1. Instantiate ApplicationContext
#if app is launched directly
from .app import app
import sys