1051 except AttributeError: |
1051 except AttributeError: |
1052 sip_version_str = "sip version not available" |
1052 sip_version_str = "sip version not available" |
1053 |
1053 |
1054 sizeStr = "64-Bit" if sys.maxsize > 2**32 else "32-Bit" |
1054 sizeStr = "64-Bit" if sys.maxsize > 2**32 else "32-Bit" |
1055 |
1055 |
1056 info = ["Version Numbers:"] |
1056 info = [ |
1057 |
1057 "Version Numbers", |
1058 info.append(" Python {0}, {1}".format(sys.version.split()[0], sizeStr)) |
1058 "===============", |
1059 info.append(" Qt {0}".format(qVersion())) |
1059 ] |
1060 info.append(" PyQt6 {0}".format(PYQT_VERSION_STR)) |
1060 |
|
1061 info.append(f" {Program} {Version}") |
|
1062 info.append("") |
|
1063 |
|
1064 info.append(f" Python {sys.version.split()[0]}, {sizeStr}") |
|
1065 info.append(f" Qt {qVersion()}") |
|
1066 info.append(f" PyQt6 {PYQT_VERSION_STR}") |
1061 try: |
1067 try: |
1062 from PyQt6 import QtCharts # noqa: I101, I102 |
1068 from PyQt6 import QtCharts # noqa: I101, I102 |
1063 |
1069 |
1064 info.append(" PyQt6-Charts {0}".format(QtCharts.PYQT_CHART_VERSION_STR)) |
1070 info.append(f" PyQt6-Charts {QtCharts.PYQT_CHART_VERSION_STR}") |
1065 except (AttributeError, ImportError): |
1071 except (AttributeError, ImportError): |
1066 info.append(" PyQt6-Charts not installed") |
1072 info.append(" PyQt6-Charts not installed") |
1067 try: |
1073 try: |
1068 from PyQt6 import QtWebEngineCore # noqa: I101, I102 |
1074 from PyQt6 import QtWebEngineCore # noqa: I101, I102 |
1069 |
1075 |
1070 info.append( |
1076 info.append( |
1071 " PyQt6-WebEngine {0}".format(QtWebEngineCore.PYQT_WEBENGINE_VERSION_STR) |
1077 f" PyQt6-WebEngine {QtWebEngineCore.PYQT_WEBENGINE_VERSION_STR}" |
1072 ) |
1078 ) |
1073 except (AttributeError, ImportError): |
1079 except (AttributeError, ImportError): |
1074 info.append(" PyQt6-WebEngine not installed") |
1080 info.append(" PyQt6-WebEngine not installed") |
1075 info.append(" PyQt6-QScintilla {0}".format(QSCINTILLA_VERSION_STR)) |
1081 info.append(f" PyQt6-QScintilla {QSCINTILLA_VERSION_STR}") |
1076 info.append(" sip {0}".format(sip_version_str)) |
1082 info.append(f" sip {sip_version_str}") |
1077 if bool(importlib.util.find_spec("PyQt6.QtWebEngineWidgets")): |
1083 if bool(importlib.util.find_spec("PyQt6.QtWebEngineWidgets")): |
1078 from eric7.WebBrowser.Tools import WebBrowserTools # noqa: I101 |
1084 from eric7.WebBrowser.Tools import WebBrowserTools # noqa: I101 |
1079 |
1085 |
1080 ( |
1086 ( |
1081 chromiumVersion, |
1087 chromiumVersion, |
1082 chromiumSecurityVersion, |
1088 chromiumSecurityVersion, |
1083 ) = WebBrowserTools.getWebEngineVersions()[0:2] |
1089 ) = WebBrowserTools.getWebEngineVersions()[0:2] |
1084 info.append(" WebEngine {0}".format(chromiumVersion)) |
1090 info.append(f" WebEngine {chromiumVersion}") |
1085 if chromiumSecurityVersion: |
1091 if chromiumSecurityVersion: |
1086 info.append(" (Security) {0}".format(chromiumSecurityVersion)) |
1092 info.append(f" (Security) {chromiumSecurityVersion}") |
1087 info.append(" {0} {1}".format(Program, Version)) |
|
1088 info.append("") |
1093 info.append("") |
1089 info.append("Platform: {0}".format(sys.platform)) |
1094 info.append("Platform") |
|
1095 info.append("========") |
|
1096 info.append(sys.platform) |
1090 if os.environ.get("SOMMELIER_VERSION", ""): |
1097 if os.environ.get("SOMMELIER_VERSION", ""): |
1091 info[-1] += ", ChromeOS" |
1098 info[-1] += ", ChromeOS" |
1092 info.append(sys.version) |
1099 info.append(f"Python {sys.version}") |
1093 desktop = DesktopUtilities.desktopName() |
1100 desktop = DesktopUtilities.desktopName() |
1094 if desktop: |
1101 if desktop: |
1095 info.append("") |
1102 info.append("") |
1096 info.append("Desktop: {0}".format(desktop)) |
1103 info.append(f"Desktop: {desktop}") |
1097 session = DesktopUtilities.sessionType() |
1104 session = DesktopUtilities.sessionType() |
1098 if session: |
1105 if session: |
1099 info.append("") |
1106 if not desktop: |
1100 info.append("Session Type: {0}".format(session)) |
1107 info.append("") |
|
1108 info.append(f"Session Type: {session}") |
1101 |
1109 |
1102 return linesep.join(info) |
1110 return linesep.join(info) |
1103 |
1111 |
1104 |
1112 |
1105 def generatePluginsVersionInfo(linesep="\n"): |
1113 def generatePluginsVersionInfo(linesep="\n"): |