mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-30 05:40:06 +00:00
Check if pip has __version__
This commit is contained in:
parent
238d6dc506
commit
a257d811d8
@ -28,8 +28,8 @@ def build_docs():
|
|||||||
# Upgrade pip because installation of sphinx with pip 1.1 available on Travis
|
# 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.
|
# is broken (see #207) and it doesn't support the show command.
|
||||||
import pip
|
import pip
|
||||||
print('pip version: {} {}'.format(pip.__version__, LooseVersion(pip.__version__) < LooseVersion('1.5.4')))
|
if not '__version__' in dir(pip) or \
|
||||||
if LooseVersion(pip.__version__) < LooseVersion('1.5.4'):
|
LooseVersion(pip.__version__) < LooseVersion('1.5.4'):
|
||||||
print("Updating pip")
|
print("Updating pip")
|
||||||
check_call(['pip', 'install', '--upgrade', 'pip==1.5.4'])
|
check_call(['pip', 'install', '--upgrade', 'pip==1.5.4'])
|
||||||
# Install Sphinx and Breathe.
|
# Install Sphinx and Breathe.
|
||||||
|
Loading…
Reference in New Issue
Block a user