##// END OF EJS Templates
use NumericalVersion utility in external.qt
MinRK -
Show More
@@ -7,7 +7,7 b' Do not use this if you need PyQt with the old QString/QVariant API.'
7 """
7 """
8
8
9 import os
9 import os
10 from distutils.version import LooseVersion as V
10 from IPython.utils.version import NumericalVersion as V
11 # Available APIs.
11 # Available APIs.
12 QT_API_PYQT = 'pyqt'
12 QT_API_PYQT = 'pyqt'
13 QT_API_PYSIDE = 'pyside'
13 QT_API_PYSIDE = 'pyside'
@@ -32,9 +32,10 b' import os'
32 import sys
32 import sys
33
33
34 from IPython.utils.warn import warn
34 from IPython.utils.warn import warn
35 from IPython.utils.version import NumericalVersion as V
35
36
36 matplotlib = sys.modules.get('matplotlib')
37 matplotlib = sys.modules.get('matplotlib')
37 if matplotlib and matplotlib.__version__ <= '1.0.1':
38 if matplotlib and V(matplotlib.__version__) <= V('1.0.1'):
38 # 1.0.1 doesn't support pyside or v2, so stick with PyQt @v1,
39 # 1.0.1 doesn't support pyside or v2, so stick with PyQt @v1,
39 # and ignore everything else
40 # and ignore everything else
40 from PyQt4 import QtCore, QtGui
41 from PyQt4 import QtCore, QtGui
General Comments 0
You need to be logged in to leave comments. Login now