1103 except (IOError, OSError) as msg: |
1104 except (IOError, OSError) as msg: |
1104 sys.stderr.write('Error: {0}\nTry install as root.\n'.format(msg)) |
1105 sys.stderr.write('Error: {0}\nTry install as root.\n'.format(msg)) |
1105 exit(7) |
1106 exit(7) |
1106 |
1107 |
1107 # Create a config file and delete the default one |
1108 # Create a config file and delete the default one |
|
1109 print("\nCreating configuration file ...") |
1108 createConfig() |
1110 createConfig() |
1109 |
1111 |
1110 # Compile .ui files |
1112 # Compile .ui files |
1111 print("Compiling user interface files...") |
1113 print("\nCompiling user interface files ...") |
1112 # step 1: remove old Ui_*.py files |
1114 # step 1: remove old Ui_*.py files |
1113 for root, _, files in os.walk(sourceDir): |
1115 for root, _, files in os.walk(sourceDir): |
1114 for file in [f for f in files if fnmatch.fnmatch(f, 'Ui_*.py')]: |
1116 for file in [f for f in files if fnmatch.fnmatch(f, 'Ui_*.py')]: |
1115 os.remove(os.path.join(root, file)) |
1117 os.remove(os.path.join(root, file)) |
1116 # step 2: compile the forms |
1118 # step 2: compile the forms |
1117 compileUiFiles() |
1119 compileUiFiles() |
1118 |
1120 |
1119 if doCompile: |
1121 if doCompile: |
1120 print("\nCompiling source files...") |
1122 print("\nCompiling source files ...") |
1121 if distDir: |
1123 if distDir: |
1122 compileall.compile_dir(sourceDir, |
1124 compileall.compile_dir(sourceDir, |
1123 ddir=os.path.join(distDir, modDir, cfg['ericDir']), |
1125 ddir=os.path.join(distDir, modDir, cfg['ericDir']), |
1124 rx=re.compile(r"DebugClients[\\/]Python[\\/]|UtilitiesPython2[\\/]"), |
1126 rx=re.compile(r"DebugClients[\\/]Python[\\/]|UtilitiesPython2[\\/]"), |
1125 quiet=True) |
1127 quiet=True) |