--- a/scripts/install.py Mon Feb 01 10:38:43 2021 +0100 +++ b/scripts/install.py Tue Mar 02 17:12:08 2021 +0100 @@ -776,7 +776,7 @@ copyTree( os.path.join(eric6SourceDir, "Styles"), cfg['ericStylesDir'], - ['*.qss', '*.e4h', '*.e6h']) + ['*.qss', '*.e4h', '*.e6h', '*.ehj']) copyTree( os.path.join(eric6SourceDir, "i18n"), cfg['ericTranslationsDir'], @@ -849,7 +849,8 @@ print("Could not install '{0}'.".format(name)) # copy some more stuff - for name in ['default.e4k', 'default_Mac.e4k']: + for name in ('default.ekj', 'default_Mac.ekj', + 'default.e4k', 'default_Mac.e4k'): try: shutilCopy(os.path.join(sourceDir, "others", name), cfg['ericOthersDir']) @@ -1450,7 +1451,7 @@ from PyQt5.QtCore import qVersion except ImportError as msg: installed = not isSudo and pipInstall( - "PyQt5", + "PyQt5>=5.12.1,<5.15.2", "'PyQt5' could not be detected.\nError: {0}".format(msg) ) if installed: @@ -1486,7 +1487,7 @@ print("Optional 'PyQtWebEngine' could not be detected.") else: pipInstall( - "PyQtWebEngine", + "PyQtWebEngine>=5.12.1,<5.15.2", "Optional 'PyQtWebEngine' could not be detected.\n" "Error: {0}".format(msg) ) @@ -1498,7 +1499,7 @@ print("Optional 'PyQtChart' could not be detected.") else: pipInstall( - "PyQtChart", + "PyQtChart>=5.12.1,<5.15.2", "Optional 'PyQtChart' could not be detected.\n" "Error: {0}".format(msg) ) @@ -1535,9 +1536,16 @@ # available (e.g. for 32-Bit Windows) (("PyQt5.QtWebEngineWidgets", ), sys.maxsize <= 2**32), ] - optionalModulesList = {} + optionalModulesList = { + # key is pip project name + # value is tuple of package name, pip install constraint + "PyYAML": ("yaml", ""), + "toml": ("toml", ""), + } + # dict with tuples of package name and install constraint if sys.platform != "darwin" and not ignorePyqt5Tools: - optionalModulesList["qt5-applications"] = "qt5_applications" + optionalModulesList["qt5-applications"] = ("qt5_applications", + "<5.15.2") # check mandatory modules modulesOK = True @@ -1575,7 +1583,7 @@ # check optional modules for optPackage in optionalModulesList: try: - __import__(optionalModulesList[optPackage]) + __import__(optionalModulesList[optPackage][0]) print("Found", optPackage) except ImportError as msg: if isSudo: @@ -1583,7 +1591,7 @@ .format(optPackage)) else: pipInstall( - optPackage, + optPackage + optionalModulesList[optPackage][1], "Optional '{0}' could not be detected.\n" "Error: {1}".format(optPackage, msg) )