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