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