--- a/scripts/install.py Sun May 16 11:43:59 2021 +0200 +++ b/scripts/install.py Sun May 16 20:07:24 2021 +0200 @@ -231,8 +231,8 @@ else: # determine dynamically try: - from PyQt5.QtCore import QLibraryInfo - qtDataDir = QLibraryInfo.location(QLibraryInfo.DataPath) + from PyQt6.QtCore import QLibraryInfo + qtDataDir = QLibraryInfo.path(QLibraryInfo.DataPath) except ImportError: qtDataDir = None apisDir = os.path.join(qtDataDir, "qsci", "api") if qtDataDir else None @@ -1101,8 +1101,8 @@ # determine entry for DYLD_FRAMEWORK_PATH dyldLine = "" try: - from PyQt5.QtCore import QLibraryInfo - qtLibraryDir = QLibraryInfo.location(QLibraryInfo.LibrariesPath) + from PyQt6.QtCore import QLibraryInfo + qtLibraryDir = QLibraryInfo.path(QLibraryInfo.LibrariesPath) except ImportError: qtLibraryDir = "" if qtLibraryDir: @@ -1444,7 +1444,7 @@ exit(5) try: - from PyQt5.QtCore import qVersion + from PyQt6.QtCore import qVersion except ImportError as msg: installed = not isSudo and pipInstall( "PyQt5>=5.12.1", @@ -1453,7 +1453,7 @@ if installed: # try to import it again try: - from PyQt5.QtCore import qVersion + from PyQt6.QtCore import qVersion except ImportError as msg: print('Sorry, please install PyQt5.') print('Error: {0}'.format(msg)) @@ -1466,7 +1466,7 @@ try: pyuic = "pyuic5" - from PyQt5 import uic # __IGNORE_WARNING__ + from PyQt6 import uic # __IGNORE_WARNING__ except ImportError as msg: print("Sorry, {0} is not installed.".format(pyuic)) print('Error: {0}'.format(msg)) @@ -1474,9 +1474,9 @@ print("Found {0}".format(pyuic)) try: - from PyQt5 import QtWebEngineWidgets # __IGNORE_WARNING__ + from PyQt6 import QtWebEngineWidgets # __IGNORE_WARNING__ except ImportError as msg: - from PyQt5.QtCore import PYQT_VERSION + from PyQt6.QtCore import PYQT_VERSION if PYQT_VERSION >= 0x050c00: # PyQt 5.12 separated QtWebEngine into a separate wheel if isSudo: @@ -1489,7 +1489,7 @@ ) try: - from PyQt5 import QtChart # __IGNORE_WARNING__ + from PyQt6 import QtChart # __IGNORE_WARNING__ except ImportError as msg: if isSudo: print("Optional 'PyQtChart' could not be detected.") @@ -1501,7 +1501,7 @@ ) try: - from PyQt5 import Qsci # __IGNORE_WARNING__ + from PyQt6 import Qsci # __IGNORE_WARNING__ except ImportError as msg: installed = not isSudo and pipInstall( "QScintilla", @@ -1510,7 +1510,7 @@ if installed: # try to import it again try: - from PyQt5 import Qsci # __IGNORE_WARNING__ + from PyQt6 import Qsci # __IGNORE_WARNING__ message = None except ImportError as msg: message = str(msg) @@ -1618,7 +1618,7 @@ # check version of sip with contextlib.suppress(ImportError, AttributeError): try: - from PyQt5 import sip + from PyQt6 import sip except ImportError: import sip sipVersion = sip.SIP_VERSION_STR @@ -1649,7 +1649,7 @@ exit(3) # check version of PyQt - from PyQt5.QtCore import PYQT_VERSION_STR + from PyQt6.QtCore import PYQT_VERSION_STR pyqtVersion = PYQT_VERSION_STR print("PyQt Version:", pyqtVersion.strip()) # always assume, that snapshots or dev versions are new enough @@ -1673,7 +1673,7 @@ exit(4) # check version of QScintilla - from PyQt5.Qsci import QSCINTILLA_VERSION_STR + from PyQt6.Qsci import QSCINTILLA_VERSION_STR scintillaVersion = QSCINTILLA_VERSION_STR print("QScintilla Version:", QSCINTILLA_VERSION_STR.strip()) # always assume, that snapshots or dev versions are new enough @@ -1709,7 +1709,7 @@ print("PyQtChart:", QtChart.PYQT_CHART_VERSION_STR) with contextlib.suppress(ImportError, AttributeError): - from PyQt5 import QtWebEngine + from PyQt6 import QtWebEngine print("PyQtWebEngine.", QtWebEngine.PYQT_WEBENGINE_VERSION_STR) print("All dependencies ok.") @@ -1732,7 +1732,7 @@ """ Compile the .ui files to Python sources. """ - from PyQt5.uic import compileUiDir + from PyQt6.uic import compileUiDir compileUiDir(eric7SourceDir, True, __pyName)