992 exit(2) |
992 exit(2) |
993 print("Qt Version: {0}".format(qVersion())) |
993 print("Qt Version: {0}".format(qVersion())) |
994 |
994 |
995 # check version of sip |
995 # check version of sip |
996 try: |
996 try: |
997 import sipconfig |
997 import sip |
998 sipVersion = sipconfig.Configuration().sip_version_str |
998 sipVersion = sip.SIP_VERSION_STR |
999 # always assume, that snapshots are new enough |
999 # always assume, that snapshots are new enough |
1000 if "snapshot" not in sipVersion: |
1000 if "snapshot" not in sipVersion: |
|
1001 while sipVersion.count('.') < 2: |
|
1002 sipVersion += '.0' |
|
1003 (maj, min, pat) = sipVersion.split('.') |
|
1004 maj = int(maj) |
|
1005 min = int(min) |
|
1006 pat = int(pat) |
|
1007 if maj < 4 or (maj == 4 and min < 14) or \ |
|
1008 (maj == 4 and min == 14 and pat < 2): |
|
1009 print('Sorry, you must have sip 4.14.2 or higher or' |
|
1010 ' a recent snapshot release.') |
|
1011 exit(3) |
1001 # check for blacklisted versions |
1012 # check for blacklisted versions |
1002 for vers in BlackLists["sip"] + PlatformBlackLists["sip"]: |
1013 for vers in BlackLists["sip"] + PlatformBlackLists["sip"]: |
1003 if vers == sipVersion: |
1014 if vers == sipVersion: |
1004 print( |
1015 print( |
1005 'Sorry, sip version {0} is not compatible with eric5.' |
1016 'Sorry, sip version {0} is not compatible with eric5.' |
1006 .format(vers)) |
1017 .format(vers)) |
1007 print('Please install another version.') |
1018 print('Please install another version.') |
1008 exit(3) |
1019 exit(3) |
1009 except ImportError: |
1020 except (ImportError, AttributeError): |
1010 pass |
1021 pass |
1011 |
1022 |
1012 # check version of PyQt |
1023 # check version of PyQt |
1013 from PyQt4.QtCore import PYQT_VERSION_STR |
1024 from PyQt4.QtCore import PYQT_VERSION_STR |
1014 pyqtVersion = PYQT_VERSION_STR |
1025 pyqtVersion = PYQT_VERSION_STR |