1177 # check version of sip |
1177 # check version of sip |
1178 try: |
1178 try: |
1179 import sip |
1179 import sip |
1180 sipVersion = sip.SIP_VERSION_STR |
1180 sipVersion = sip.SIP_VERSION_STR |
1181 print("sip Version:", sipVersion.strip()) |
1181 print("sip Version:", sipVersion.strip()) |
1182 # always assume, that snapshots are new enough |
1182 # always assume, that snapshots or dev versions are new enough |
1183 if "snapshot" not in sipVersion: |
1183 if "snapshot" not in sipVersion and "dev" not in sipVersion: |
1184 while sipVersion.count('.') < 2: |
1184 while sipVersion.count('.') < 2: |
1185 sipVersion += '.0' |
1185 sipVersion += '.0' |
1186 (maj, min, pat) = sipVersion.split('.') |
1186 (maj, min, pat) = sipVersion.split('.') |
1187 maj = int(maj) |
1187 maj = int(maj) |
1188 min = int(min) |
1188 min = int(min) |
1208 from PyQt4.QtCore import PYQT_VERSION_STR |
1208 from PyQt4.QtCore import PYQT_VERSION_STR |
1209 else: |
1209 else: |
1210 from PyQt5.QtCore import PYQT_VERSION_STR |
1210 from PyQt5.QtCore import PYQT_VERSION_STR |
1211 pyqtVersion = PYQT_VERSION_STR |
1211 pyqtVersion = PYQT_VERSION_STR |
1212 print("PyQt Version:", pyqtVersion.strip()) |
1212 print("PyQt Version:", pyqtVersion.strip()) |
1213 # always assume, that snapshots are new enough |
1213 # always assume, that snapshots or dev versions are new enough |
1214 if "snapshot" not in pyqtVersion: |
1214 if "snapshot" not in pyqtVersion and "dev" not in pyqtVersion: |
1215 while pyqtVersion.count('.') < 2: |
1215 while pyqtVersion.count('.') < 2: |
1216 pyqtVersion += '.0' |
1216 pyqtVersion += '.0' |
1217 (maj, min, pat) = pyqtVersion.split('.') |
1217 (maj, min, pat) = pyqtVersion.split('.') |
1218 maj = int(maj) |
1218 maj = int(maj) |
1219 min = int(min) |
1219 min = int(min) |
1238 from PyQt4.Qsci import QSCINTILLA_VERSION_STR |
1238 from PyQt4.Qsci import QSCINTILLA_VERSION_STR |
1239 else: |
1239 else: |
1240 from PyQt5.Qsci import QSCINTILLA_VERSION_STR |
1240 from PyQt5.Qsci import QSCINTILLA_VERSION_STR |
1241 scintillaVersion = QSCINTILLA_VERSION_STR |
1241 scintillaVersion = QSCINTILLA_VERSION_STR |
1242 print("QScintilla Version:", QSCINTILLA_VERSION_STR.strip()) |
1242 print("QScintilla Version:", QSCINTILLA_VERSION_STR.strip()) |
1243 # always assume, that snapshots are new enough |
1243 # always assume, that snapshots or dev versions are new enough |
1244 if "snapshot" not in scintillaVersion: |
1244 if "snapshot" not in scintillaVersion and "dev" not in scintillaVersion: |
1245 while scintillaVersion.count('.') < 2: |
1245 while scintillaVersion.count('.') < 2: |
1246 scintillaVersion += '.0' |
1246 scintillaVersion += '.0' |
1247 (maj, min, pat) = scintillaVersion.split('.') |
1247 (maj, min, pat) = scintillaVersion.split('.') |
1248 maj = int(maj) |
1248 maj = int(maj) |
1249 min = int(min) |
1249 min = int(min) |