From 7841ef85ca7c1e841adec7e83edba8cf48ea0046 2013-01-25 20:44:53 From: MinRK Date: 2013-01-25 20:44:53 Subject: [PATCH] use NumericalVersion utility in external.qt --- diff --git a/IPython/external/qt.py b/IPython/external/qt.py index 43acb46..a20e594 100644 --- a/IPython/external/qt.py +++ b/IPython/external/qt.py @@ -7,7 +7,7 @@ Do not use this if you need PyQt with the old QString/QVariant API. """ import os -from distutils.version import LooseVersion as V +from IPython.utils.version import NumericalVersion as V # Available APIs. QT_API_PYQT = 'pyqt' QT_API_PYSIDE = 'pyside' diff --git a/IPython/external/qt_for_kernel.py b/IPython/external/qt_for_kernel.py index 2bac0b9..2372cc3 100644 --- a/IPython/external/qt_for_kernel.py +++ b/IPython/external/qt_for_kernel.py @@ -32,9 +32,10 @@ import os import sys from IPython.utils.warn import warn +from IPython.utils.version import NumericalVersion as V matplotlib = sys.modules.get('matplotlib') -if matplotlib and matplotlib.__version__ <= '1.0.1': +if matplotlib and V(matplotlib.__version__) <= V('1.0.1'): # 1.0.1 doesn't support pyside or v2, so stick with PyQt @v1, # and ignore everything else from PyQt4 import QtCore, QtGui