-
Notifications
You must be signed in to change notification settings - Fork 0
/
compiler.py
27 lines (23 loc) · 867 Bytes
/
compiler.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import os
validation = input("In order to compile KnowledgeBase in .exe "
"you have to install Nuitka lib. Continue? Y or enter to cancel ")
working_dir = os.getcwd()
if validation == "y" or validation == "Y":
try:
import nuitka
print("Module Nuitka already installed")
except ModuleNotFoundError:
print("Installing module Nuitka")
os.system("pip install nuitka")
pass
os.system('nuitka '
'--file-version=0.0.1.0 '
'--product-name=KnowledgeBase '
'--output-filename=KnowledgeBase '
'--enable-console '
'--standalone '
'--windows-icon-from-ico=organizer_ico.ico '
f'--output-dir=\"{working_dir}\"'
' --remove-output main.py')
elif not validation:
print("compilation canceled")