Globals/__init__.py

changeset 3778
0c5bc18da740
parent 3670
f0cb7579c0b4
child 3807
91fc2089c401
equal deleted inserted replaced
3777:0c47cbb5b199 3778:0c5bc18da740
92 from PyQt5.QtCore import PYQT_VERSION_STR 92 from PyQt5.QtCore import PYQT_VERSION_STR
93 pyqtVersion = PYQT_VERSION_STR 93 pyqtVersion = PYQT_VERSION_STR
94 # always assume, that snapshots are good 94 # always assume, that snapshots are good
95 if "snapshot" not in pyqtVersion: 95 if "snapshot" not in pyqtVersion:
96 # check for blacklisted versions 96 # check for blacklisted versions
97 for vers in BlackLists["PyQt5"] + PlatformBlackLists["PyQt5"]: 97 pyqtVariant = "PyQt{0}".format(pyqtVersion[0])
98 for vers in BlackLists[pyqtVariant] + PlatformBlackLists[pyqtVariant]:
98 if vers == pyqtVersion: 99 if vers == pyqtVersion:
99 print('Sorry, PyQt5 version {0} is not compatible with eric6.' 100 print('Sorry, PyQt version {0} is not compatible with eric6.'
100 .format(vers)) 101 .format(vers))
101 print('Please install another version.') 102 print('Please install another version.')
102 return False 103 return False
103 104
104 # check version of QScintilla 105 # check version of QScintilla
158 """ 159 """
159 import distutils.sysconfig 160 import distutils.sysconfig
160 return distutils.sysconfig.get_python_lib(True) 161 return distutils.sysconfig.get_python_lib(True)
161 162
162 163
164 # TODO: modify to also work with PyQt4
163 def getPyQt5ModulesDirectory(): 165 def getPyQt5ModulesDirectory():
164 """ 166 """
165 Function to determine the path to PyQt5's modules directory. 167 Function to determine the path to PyQt5's modules directory.
166 168
167 @return path to the PyQt5 modules directory (string) 169 @return path to the PyQt5 modules directory (string)

eric ide

mercurial