Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1f11b60

Browse files
committed
Merge remote-tracking branch 'davidia/pyqt_check'
2 parents fb4b910 + 5cbc914 commit 1f11b60

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

setupext.py

100644100755
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1865,19 +1865,20 @@ def convert_qt_version(self, version):
18651865

18661866
def check_requirements(self):
18671867
try:
1868-
from PyQt4 import pyqtconfig
1868+
from PyQt4 import QtCore
18691869
except ImportError:
18701870
raise CheckFailed("PyQt4 not found")
18711871
# Import may still be broken for our python
18721872
try:
1873-
qtconfig = pyqtconfig.Configuration()
1873+
qt_version = QtCore.QT_VERSION
1874+
pyqt_version_str = QtCore.PYQT_VERSION_STR
18741875
except AttributeError:
18751876
raise CheckFailed('PyQt4 not correctly imported')
18761877
BackendAgg.force = True
18771878
return ("Qt: %s, PyQt4: %s" %
18781879
(self.convert_qt_version(
1879-
qtconfig.qt_version),
1880-
qtconfig.pyqt_version_str))
1880+
qt_version),
1881+
pyqt_version_str))
18811882

18821883

18831884
class BackendPySide(OptionalBackendPackage):

0 commit comments

Comments
 (0)