--- a/Utilities/__init__.py Sun Sep 05 13:38:42 2010 +0200 +++ b/Utilities/__init__.py Sun Sep 05 13:38:59 2010 +0200 @@ -1187,6 +1187,58 @@ return infoStr +def checkBlacklistedVersions(): + """ + Module functions to check for blacklisted versions of the prerequisites. + + @return flag indicating good versions were found (boolean) + """ + from install import BlackLists + + # check version of sip + try: + import sipconfig + sipVersion = sipconfig.Configuration().sip_version_str + # always assume, that snapshots are good + if "snapshot" not in sipVersion: + # check for blacklisted versions + for vers in BlackLists["sip"]: + if vers == sipVersion: + print('Sorry, sip version {0} is not compatible with eric5.'\ + .format(vers)) + print('Please install another version.') + return False + except ImportError: + pass + + # check version of PyQt + from PyQt4.QtCore import PYQT_VERSION_STR + pyqtVersion = PYQT_VERSION_STR + # always assume, that snapshots are good + if "snapshot" not in pyqtVersion: + # check for blacklisted versions + for vers in BlackLists["PyQt4"]: + if vers == pyqtVersion: + print('Sorry, PyQt4 version {0} is not compatible with eric5.'\ + .format(vers)) + print('Please install another version.') + return False + + # check version of QScintilla + from PyQt4.Qsci import QSCINTILLA_VERSION_STR + scintillaVersion = QSCINTILLA_VERSION_STR + # always assume, that snapshots are new enough + if "snapshot" not in scintillaVersion: + # check for blacklisted versions + for vers in BlackLists["QScintilla2"]: + if vers == scintillaVersion: + print('Sorry, QScintilla2 version {0} is not compatible with eric5.'\ + .format(vers)) + print('Please install another version.') + return False + + return True + ################################################################################ # password handling functions below ################################################################################