From a257d811d84bf2ba35c319709d0829ef9ee82659 Mon Sep 17 00:00:00 2001 From: vitaut Date: Thu, 15 Oct 2015 07:20:52 -0700 Subject: [PATCH] Check if pip has __version__ --- doc/build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/build.py b/doc/build.py index 4b741b10..41964bb7 100755 --- a/doc/build.py +++ b/doc/build.py @@ -28,8 +28,8 @@ def build_docs(): # Upgrade pip because installation of sphinx with pip 1.1 available on Travis # is broken (see #207) and it doesn't support the show command. import pip - print('pip version: {} {}'.format(pip.__version__, LooseVersion(pip.__version__) < LooseVersion('1.5.4'))) - if LooseVersion(pip.__version__) < LooseVersion('1.5.4'): + if not '__version__' in dir(pip) or \ + LooseVersion(pip.__version__) < LooseVersion('1.5.4'): print("Updating pip") check_call(['pip', 'install', '--upgrade', 'pip==1.5.4']) # Install Sphinx and Breathe.