44 unicode_literals , with_statement )
55
66import os
7- import platform
87import subprocess
98import sys
109
@@ -18,10 +17,6 @@ def fail(message):
1817
1918
2019PY2 = sys .version_info [0 ] == 2
21- if PY2 :
22- from urllib import urlretrieve
23- else :
24- from urllib .request import urlretrieve
2520
2621
2722def has_module (module_name ):
@@ -79,11 +74,13 @@ def which(exe=None, throw=True):
7974python_bin = os .path .join (env_dir , 'bin' , 'python' )
8075virtualenv_bin = which ('virtualenv' , throw = False )
8176virtualenv_exists = os .path .exists (env_dir ) and os .path .isfile (python_bin )
82- sphinx_requirements_filepath = os .path .join (project_dir , 'requirements' , 'doc.txt' )
77+ sphinx_requirements_filepath = os .path .join (
78+ project_dir , 'requirements' , 'doc.txt'
79+ )
8380
8481
8582try :
86- import virtualenv
83+ import virtualenv # noqa
8784except ImportError :
8885 message = (
8986 'Virtualenv is required for this bootstrap to run.\n '
@@ -94,12 +91,12 @@ def which(exe=None, throw=True):
9491
9592
9693try :
97- import pip
94+ import pip # noqa
9895except ImportError :
9996 message = (
10097 'pip is required for this bootstrap to run.\n '
10198 'Find instructions on how to install at: %s' %
102- 'http://pip.readthedocs.org /en/latest/installing.html'
99+ 'http://pip.readthedocs.io /en/latest/installing.html'
103100 )
104101 fail (message )
105102
0 commit comments