1031 Perform some dependency checks. |
1031 Perform some dependency checks. |
1032 """ |
1032 """ |
1033 print('Checking dependencies') |
1033 print('Checking dependencies') |
1034 |
1034 |
1035 # perform dependency checks |
1035 # perform dependency checks |
|
1036 print("Python Version: {0:d}.{1:d}.{2:d}".format(*sys.version_info[:3])) |
1036 if sys.version_info < (2, 7, 0): |
1037 if sys.version_info < (2, 7, 0): |
1037 print('Sorry, you must have Python 2.7.0 or higher or ' |
1038 print('Sorry, you must have Python 2.7.0 or higher or ' |
1038 'Python 3.1.0 or higher.') |
1039 'Python 3.1.0 or higher.') |
1039 exit(5) |
1040 exit(5) |
1040 elif sys.version_info < (3, 1, 0) and sys.version_info[0] == 3: |
1041 elif sys.version_info < (3, 1, 0) and sys.version_info[0] == 3: |
1041 print('Sorry, you must have Python 3.1.0 or higher.') |
1042 print('Sorry, you must have Python 3.1.0 or higher.') |
1042 exit(5) |
1043 exit(5) |
1043 if sys.version_info > (3, 9, 9): |
1044 if sys.version_info > (3, 9, 9): |
1044 print('Sorry, eric6 requires Python 3 or Python 2 for running.') |
1045 print('Sorry, eric6 requires Python 3 or Python 2 for running.') |
1045 exit(5) |
1046 exit(5) |
1046 print("Python Version: {0:d}.{1:d}.{2:d}".format(*sys.version_info[:3])) |
|
1047 |
1047 |
1048 try: |
1048 try: |
1049 import xml.etree # __IGNORE_WARNING__ |
1049 import xml.etree # __IGNORE_WARNING__ |
1050 except ImportError as msg: |
1050 except ImportError as msg: |
1051 print('Your Python installation is missing the XML module.') |
1051 print('Your Python installation is missing the XML module.') |
1114 PlatformBlackLists = PlatformsBlackLists["mac"] |
1114 PlatformBlackLists = PlatformsBlackLists["mac"] |
1115 |
1115 |
1116 # check version of Qt |
1116 # check version of Qt |
1117 qtMajor = int(qVersion().split('.')[0]) |
1117 qtMajor = int(qVersion().split('.')[0]) |
1118 qtMinor = int(qVersion().split('.')[1]) |
1118 qtMinor = int(qVersion().split('.')[1]) |
|
1119 print("Qt Version: {0}".format(qVersion().strip())) |
1119 if qtMajor < 4 or \ |
1120 if qtMajor < 4 or \ |
1120 (qtMajor == 4 and qtMinor < 8) or \ |
1121 (qtMajor == 4 and qtMinor < 8) or \ |
1121 (qtMajor == 5 and qtMinor < 3): |
1122 (qtMajor == 5 and qtMinor < 3): |
1122 print('Sorry, you must have Qt version 4.8.0 or better or') |
1123 print('Sorry, you must have Qt version 4.8.0 or better or') |
1123 print('5.3.0 or better.') |
1124 print('5.3.0 or better.') |
1124 exit(2) |
1125 exit(2) |
1125 print("Qt Version: {0}".format(qVersion())) |
|
1126 |
1126 |
1127 # check version of sip |
1127 # check version of sip |
1128 try: |
1128 try: |
1129 import sip |
1129 import sip |
1130 sipVersion = sip.SIP_VERSION_STR |
1130 sipVersion = sip.SIP_VERSION_STR |
|
1131 print("sip Version: ", sipVersion.strip()) |
1131 # always assume, that snapshots are new enough |
1132 # always assume, that snapshots are new enough |
1132 if "snapshot" not in sipVersion: |
1133 if "snapshot" not in sipVersion: |
1133 while sipVersion.count('.') < 2: |
1134 while sipVersion.count('.') < 2: |
1134 sipVersion += '.0' |
1135 sipVersion += '.0' |
1135 (maj, min, pat) = sipVersion.split('.') |
1136 (maj, min, pat) = sipVersion.split('.') |
1156 if pyqtVariant == "PyQt4": |
1157 if pyqtVariant == "PyQt4": |
1157 from PyQt4.QtCore import PYQT_VERSION_STR |
1158 from PyQt4.QtCore import PYQT_VERSION_STR |
1158 else: |
1159 else: |
1159 from PyQt5.QtCore import PYQT_VERSION_STR |
1160 from PyQt5.QtCore import PYQT_VERSION_STR |
1160 pyqtVersion = PYQT_VERSION_STR |
1161 pyqtVersion = PYQT_VERSION_STR |
|
1162 print("PyQt Version: ", pyqtVersion.strip()) |
1161 # always assume, that snapshots are new enough |
1163 # always assume, that snapshots are new enough |
1162 if "snapshot" not in pyqtVersion: |
1164 if "snapshot" not in pyqtVersion: |
1163 while pyqtVersion.count('.') < 2: |
1165 while pyqtVersion.count('.') < 2: |
1164 pyqtVersion += '.0' |
1166 pyqtVersion += '.0' |
1165 (maj, min, pat) = pyqtVersion.split('.') |
1167 (maj, min, pat) = pyqtVersion.split('.') |
1178 if vers == pyqtVersion: |
1180 if vers == pyqtVersion: |
1179 print('Sorry, PyQt version {0} is not compatible with eric6.' |
1181 print('Sorry, PyQt version {0} is not compatible with eric6.' |
1180 .format(vers)) |
1182 .format(vers)) |
1181 print('Please install another version.') |
1183 print('Please install another version.') |
1182 exit(4) |
1184 exit(4) |
1183 print("PyQt Version: ", pyqtVersion) |
|
1184 |
1185 |
1185 # check version of QScintilla |
1186 # check version of QScintilla |
1186 if pyqtVariant == "PyQt4": |
1187 if pyqtVariant == "PyQt4": |
1187 from PyQt4.Qsci import QSCINTILLA_VERSION_STR |
1188 from PyQt4.Qsci import QSCINTILLA_VERSION_STR |
1188 else: |
1189 else: |
1189 from PyQt5.Qsci import QSCINTILLA_VERSION_STR |
1190 from PyQt5.Qsci import QSCINTILLA_VERSION_STR |
1190 scintillaVersion = QSCINTILLA_VERSION_STR |
1191 scintillaVersion = QSCINTILLA_VERSION_STR |
|
1192 print("QScintilla Version: ", QSCINTILLA_VERSION_STR.strip()) |
1191 # always assume, that snapshots are new enough |
1193 # always assume, that snapshots are new enough |
1192 if "snapshot" not in scintillaVersion: |
1194 if "snapshot" not in scintillaVersion: |
1193 while scintillaVersion.count('.') < 2: |
1195 while scintillaVersion.count('.') < 2: |
1194 scintillaVersion += '.0' |
1196 scintillaVersion += '.0' |
1195 (maj, min, pat) = scintillaVersion.split('.') |
1197 (maj, min, pat) = scintillaVersion.split('.') |
1207 print( |
1209 print( |
1208 'Sorry, QScintilla2 version {0} is not compatible with' |
1210 'Sorry, QScintilla2 version {0} is not compatible with' |
1209 ' eric6.'.format(vers)) |
1211 ' eric6.'.format(vers)) |
1210 print('Please install another version.') |
1212 print('Please install another version.') |
1211 exit(5) |
1213 exit(5) |
1212 print("QScintilla Version: ", QSCINTILLA_VERSION_STR) |
1214 |
1213 print("All dependencies ok.") |
1215 print("All dependencies ok.") |
1214 print() |
1216 print() |
1215 |
1217 |
1216 |
1218 |
1217 def compileUiFiles(): |
1219 def compileUiFiles(): |