--- a/scripts/install.py Sun Nov 01 11:17:06 2020 +0100 +++ b/scripts/install.py Sat Dec 05 12:29:26 2020 +0100 @@ -160,7 +160,8 @@ if sys.platform.startswith(("win", "cygwin")): print(" --clean-desktop delete desktop links before installation") if sys.platform != "darwin": - print(" --no-tools don't ask for installation of pyqt5-tools") + print(" --no-tools don't ask for installation of pyqt5-tools" + "/qt5-applications") print(" -x don't perform dependency checks (use on your own" " risk)") print(" -z don't compile the installed python files") @@ -573,7 +574,7 @@ if sys.platform == "darwin": # delete the Mac app bundle cleanUpMacAppBundle() - except (IOError, OSError) as msg: + except OSError as msg: sys.stderr.write( 'Error: {0}\nTry install with admin rights.\n'.format(msg)) exit(7) @@ -670,7 +671,7 @@ if os.path.exists(linkPath): try: os.remove(linkPath) - except EnvironmentError: + except OSError: # maybe restrictions prohibited link removal print("Could not remove '{0}'.".format(linkPath)) @@ -683,7 +684,7 @@ if os.path.exists(eric6EntryPath): try: shutil.rmtree(eric6EntryPath) - except EnvironmentError: + except OSError: # maybe restrictions prohibited link removal print("Could not remove '{0}'.".format(eric6EntryPath)) @@ -825,7 +826,7 @@ # create the global plugins directory createGlobalPluginsDir() - except (IOError, OSError) as msg: + except OSError as msg: sys.stderr.write( 'Error: {0}\nTry install with admin rights.\n'.format(msg)) return(7) @@ -835,13 +836,13 @@ try: shutilCopy(os.path.join(sourceDir, "docs", name), cfg['ericDocDir']) - except EnvironmentError: + except OSError: print("Could not install '{0}'.".format( os.path.join(sourceDir, "docs", name))) for name in glob.glob(os.path.join(sourceDir, 'docs', 'README*.*')): try: shutilCopy(name, cfg['ericDocDir']) - except EnvironmentError: + except OSError: print("Could not install '{0}'.".format(name)) # copy some more stuff @@ -849,7 +850,7 @@ try: shutilCopy(os.path.join(sourceDir, "others", name), cfg['ericOthersDir']) - except EnvironmentError: + except OSError: print("Could not install '{0}'.".format( os.path.join(sourceDir, "others", name))) @@ -865,14 +866,14 @@ progLanguage, "*.api")): try: shutilCopy(apiName, apidir) - except EnvironmentError: + except OSError: print("Could not install '{0}' (no permission)." .format(apiName)) for apiName in glob.glob(os.path.join(eric6SourceDir, "APIs", progLanguage, "*.bas")): try: shutilCopy(apiName, apidir) - except EnvironmentError: + except OSError: print("Could not install '{0}' (no permission)." .format(apiName)) if progLanguage == "Python": @@ -881,7 +882,7 @@ "Python3", "*.api")): try: shutilCopy(apiName, apidir) - except EnvironmentError: + except OSError: print("Could not install '{0}' (no permission)." .format(apiName)) for apiName in glob.glob(os.path.join(eric6SourceDir, "APIs", @@ -891,7 +892,7 @@ apiName.replace(".bas", ".api")))): try: shutilCopy(apiName, apidir) - except EnvironmentError: + except OSError: print("Could not install '{0}' (no permission)." .format(apiName)) @@ -900,7 +901,7 @@ "MicroPython", "*.api")): try: shutilCopy(apiName, apidir) - except EnvironmentError: + except OSError: print("Could not install '{0}' (no permission)." .format(apiName)) for apiName in glob.glob(os.path.join(eric6SourceDir, "APIs", @@ -910,7 +911,7 @@ apiName.replace(".bas", ".api")))): try: shutilCopy(apiName, apidir) - except EnvironmentError: + except OSError: print("Could not install '{0}' (no permission)." .format(apiName)) @@ -1064,7 +1065,7 @@ if not os.path.exists(eric6EntryPath): try: os.makedirs(eric6EntryPath) - except EnvironmentError: + except OSError: # maybe restrictions prohibited link creation return @@ -1532,7 +1533,7 @@ ] optionalModulesList = {} if sys.platform != "darwin" and not ignorePyqt5Tools: - optionalModulesList["pyqt5-tools"] = "pyqt5_tools" + optionalModulesList["qt5-applications"] = "qt5_applications" # check mandatory modules modulesOK = True @@ -1736,7 +1737,7 @@ try: os.rename(fileName, fileName + ".orig") - except EnvironmentError: + except OSError: pass try: hgOut = subprocess.check_output(["hg", "identify", "-i"]) # secok @@ -1984,7 +1985,7 @@ if os.path.exists(configNameC): os.remove(configNameC) os.remove(configName) - except EnvironmentError: + except OSError: pass # cleanup old installation @@ -1995,7 +1996,7 @@ shutil.rmtree(distDir, True) else: cleanUp() - except (IOError, OSError) as msg: + except OSError as msg: sys.stderr.write('Error: {0}\nTry install as root.\n'.format(msg)) exit(7) @@ -2051,7 +2052,7 @@ if os.path.exists(configNameC): os.remove(configNameC) os.rename(configName + ".orig", configName) - except EnvironmentError: + except OSError: pass try: if installFromSource and infoName: @@ -2060,7 +2061,7 @@ if os.path.exists(infoNameC): os.remove(infoNameC) os.rename(infoName + ".orig", infoName) - except EnvironmentError: + except OSError: pass print("\nInstallation complete.")