install.py

changeset 4889
10cec9d5aa91
parent 4830
f609a22f43bd
child 4895
3baaf8303a7f
child 4911
652cb0520e9a
equal deleted inserted replaced
4887:e10234bb547c 4889:10cec9d5aa91
1165 # check version of sip 1165 # check version of sip
1166 try: 1166 try:
1167 import sip 1167 import sip
1168 sipVersion = sip.SIP_VERSION_STR 1168 sipVersion = sip.SIP_VERSION_STR
1169 print("sip Version:", sipVersion.strip()) 1169 print("sip Version:", sipVersion.strip())
1170 # always assume, that snapshots are new enough 1170 # always assume, that snapshots or dev versions are new enough
1171 if "snapshot" not in sipVersion: 1171 if "snapshot" not in sipVersion and "dev" not in sipVersion:
1172 while sipVersion.count('.') < 2: 1172 while sipVersion.count('.') < 2:
1173 sipVersion += '.0' 1173 sipVersion += '.0'
1174 (maj, min, pat) = sipVersion.split('.') 1174 (maj, min, pat) = sipVersion.split('.')
1175 maj = int(maj) 1175 maj = int(maj)
1176 min = int(min) 1176 min = int(min)
1196 from PyQt4.QtCore import PYQT_VERSION_STR 1196 from PyQt4.QtCore import PYQT_VERSION_STR
1197 else: 1197 else:
1198 from PyQt5.QtCore import PYQT_VERSION_STR 1198 from PyQt5.QtCore import PYQT_VERSION_STR
1199 pyqtVersion = PYQT_VERSION_STR 1199 pyqtVersion = PYQT_VERSION_STR
1200 print("PyQt Version:", pyqtVersion.strip()) 1200 print("PyQt Version:", pyqtVersion.strip())
1201 # always assume, that snapshots are new enough 1201 # always assume, that snapshots or dev versions are new enough
1202 if "snapshot" not in pyqtVersion: 1202 if "snapshot" not in pyqtVersion and "dev" not in pyqtVersion:
1203 while pyqtVersion.count('.') < 2: 1203 while pyqtVersion.count('.') < 2:
1204 pyqtVersion += '.0' 1204 pyqtVersion += '.0'
1205 (maj, min, pat) = pyqtVersion.split('.') 1205 (maj, min, pat) = pyqtVersion.split('.')
1206 maj = int(maj) 1206 maj = int(maj)
1207 min = int(min) 1207 min = int(min)
1226 from PyQt4.Qsci import QSCINTILLA_VERSION_STR 1226 from PyQt4.Qsci import QSCINTILLA_VERSION_STR
1227 else: 1227 else:
1228 from PyQt5.Qsci import QSCINTILLA_VERSION_STR 1228 from PyQt5.Qsci import QSCINTILLA_VERSION_STR
1229 scintillaVersion = QSCINTILLA_VERSION_STR 1229 scintillaVersion = QSCINTILLA_VERSION_STR
1230 print("QScintilla Version:", QSCINTILLA_VERSION_STR.strip()) 1230 print("QScintilla Version:", QSCINTILLA_VERSION_STR.strip())
1231 # always assume, that snapshots are new enough 1231 # always assume, that snapshots or dev versions are new enough
1232 if "snapshot" not in scintillaVersion: 1232 if "snapshot" not in scintillaVersion and "dev" not in scintillaVersion:
1233 while scintillaVersion.count('.') < 2: 1233 while scintillaVersion.count('.') < 2:
1234 scintillaVersion += '.0' 1234 scintillaVersion += '.0'
1235 (maj, min, pat) = scintillaVersion.split('.') 1235 (maj, min, pat) = scintillaVersion.split('.')
1236 maj = int(maj) 1236 maj = int(maj)
1237 min = int(min) 1237 min = int(min)

eric ide

mercurial