scripts/compileUiFiles.py

branch
eric7
changeset 9209
b99e7fd55fd3
parent 8881
54e42bc2437a
child 9221
bf71ee032bb4
equal deleted inserted replaced
9208:3fc8dfeb6ebe 9209:b99e7fd55fd3
6 6
7 """ 7 """
8 Script for eric to compile all .ui files to Python source. 8 Script for eric to compile all .ui files to Python source.
9 """ 9 """
10 10
11 import os
11 import sys 12 import sys
12 13
13 from PyQt6.uic import compileUiDir 14 from PyQt6.uic import compileUiDir
14 15
15 16
27 28
28 def compileUiFiles(): 29 def compileUiFiles():
29 """ 30 """
30 Compile the .ui files to Python sources. 31 Compile the .ui files to Python sources.
31 """ 32 """
32 compileUiDir("eric7", True, __pyName) 33 if os.path.exists("src"):
34 # eric7 with 'src' layout
35 compileUiDir(os.path.join("src", "eric7"), True, __pyName)
36 elif os.path.exists("eric7"):
37 # old layout or invoked from within 'src'
38 compileUiDir("eric7", True, __pyName)
39 else:
40 print("No valid 'eric7' source layout could be found. Aborting...")
33 41
34 42
35 def main(argv): 43 def main(argv):
36 """ 44 """
37 The main function of the script. 45 The main function of the script.

eric ide

mercurial