install.py

changeset 2969
0e1af1313b8b
parent 2965
d133c7edd88a
child 2992
dbdf27746da5
equal deleted inserted replaced
2968:b109ff4678bc 2969:0e1af1313b8b
915 915
916 916
917 def compileUiFiles(): 917 def compileUiFiles():
918 """ 918 """
919 Compile the .ui files to Python sources. 919 Compile the .ui files to Python sources.
920 """ 920 """ # __IGNORE_WARNING__
921 global sourceDir 921 global sourceDir
922 try: 922 try:
923 from PyQt4.uic import compileUiDir 923 from PyQt4.uic import compileUiDir
924 except ImportError: 924 except ImportError:
925 from PyQt4.uic import compileUi 925 from PyQt4.uic import compileUi
926 926
927 def compileUiDir(dir, recurse = False, map = None, # __IGNORE_WARNING__ 927 def compileUiDir(dir, recurse=False, # __IGNORE_WARNING__
928 ** compileUi_args): 928 map=None, **compileUi_args):
929 """ 929 """
930 Creates Python modules from Qt Designer .ui files in a directory or 930 Creates Python modules from Qt Designer .ui files in a directory or
931 directory tree. 931 directory tree.
932 932
933 Note: This function is a modified version of the one found in PyQt4. 933 Note: This function is a modified version of the one found in PyQt4.
1057 doCompile = False 1057 doCompile = False
1058 elif opt == "-f": 1058 elif opt == "-f":
1059 try: 1059 try:
1060 exec(compile(open(arg).read(), arg, 'exec'), globals()) 1060 exec(compile(open(arg).read(), arg, 'exec'), globals())
1061 if len(cfg) != configLength: 1061 if len(cfg) != configLength:
1062 print("The configuration dictionary in '{0}' is incorrect. Aborting"\ 1062 print("The configuration dictionary in '{0}' is incorrect."
1063 .format(arg)) 1063 " Aborting".format(arg))
1064 exit(6) 1064 exit(6)
1065 except: 1065 except:
1066 cfg = {} 1066 cfg = {}
1067 elif opt == "-m": 1067 elif opt == "-m":
1068 macAppBundleName = arg 1068 macAppBundleName = arg
1156 try: 1156 try:
1157 main(sys.argv) 1157 main(sys.argv)
1158 except SystemExit: 1158 except SystemExit:
1159 raise 1159 raise
1160 except: 1160 except:
1161 print("""An internal error occured. Please report all the output of the program, 1161 print("""
1162 An internal error occured. Please report all the output of the program,
1162 including the following traceback, to eric5-bugs@eric-ide.python-projects.org. 1163 including the following traceback, to eric5-bugs@eric-ide.python-projects.org.
1163 """) 1164 """)
1164 raise 1165 raise

eric ide

mercurial