Utilities/__init__.py

branch
5_0_x
changeset 567
5dcea6a6c0d0
parent 177
c822ccc4d138
child 769
a7cac3e1f1e3
equal deleted inserted replaced
566:374af4e0c9d5 567:5dcea6a6c0d0
1185 infoParas.append(' ' + (linesep + ' ').join(lines)) 1185 infoParas.append(' ' + (linesep + ' ').join(lines))
1186 infoStr += (linesep + linesep).join(infoParas) 1186 infoStr += (linesep + linesep).join(infoParas)
1187 1187
1188 return infoStr 1188 return infoStr
1189 1189
1190 def checkBlacklistedVersions():
1191 """
1192 Module functions to check for blacklisted versions of the prerequisites.
1193
1194 @return flag indicating good versions were found (boolean)
1195 """
1196 from install import BlackLists
1197
1198 # check version of sip
1199 try:
1200 import sipconfig
1201 sipVersion = sipconfig.Configuration().sip_version_str
1202 # always assume, that snapshots are good
1203 if "snapshot" not in sipVersion:
1204 # check for blacklisted versions
1205 for vers in BlackLists["sip"]:
1206 if vers == sipVersion:
1207 print('Sorry, sip version {0} is not compatible with eric5.'\
1208 .format(vers))
1209 print('Please install another version.')
1210 return False
1211 except ImportError:
1212 pass
1213
1214 # check version of PyQt
1215 from PyQt4.QtCore import PYQT_VERSION_STR
1216 pyqtVersion = PYQT_VERSION_STR
1217 # always assume, that snapshots are good
1218 if "snapshot" not in pyqtVersion:
1219 # check for blacklisted versions
1220 for vers in BlackLists["PyQt4"]:
1221 if vers == pyqtVersion:
1222 print('Sorry, PyQt4 version {0} is not compatible with eric5.'\
1223 .format(vers))
1224 print('Please install another version.')
1225 return False
1226
1227 # check version of QScintilla
1228 from PyQt4.Qsci import QSCINTILLA_VERSION_STR
1229 scintillaVersion = QSCINTILLA_VERSION_STR
1230 # always assume, that snapshots are new enough
1231 if "snapshot" not in scintillaVersion:
1232 # check for blacklisted versions
1233 for vers in BlackLists["QScintilla2"]:
1234 if vers == scintillaVersion:
1235 print('Sorry, QScintilla2 version {0} is not compatible with eric5.'\
1236 .format(vers))
1237 print('Please install another version.')
1238 return False
1239
1240 return True
1241
1190 ################################################################################ 1242 ################################################################################
1191 # password handling functions below 1243 # password handling functions below
1192 ################################################################################ 1244 ################################################################################
1193 1245
1194 def pwEncode(pw): 1246 def pwEncode(pw):

eric ide

mercurial