Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions download-deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ def __init__(self, workpath, config_path, version_path, remote_version_key=None)
print("==> version file doesn't exist")

def get_input_value(self, prompt):
ret = raw_input(prompt)
if sys.version_info[0] > 2:
ret = input(prompt)
else:
ret = raw_input(prompt)
ret.rstrip(" \t")
return ret

Expand Down Expand Up @@ -336,22 +339,9 @@ def run(self, workpath, folder_for_extracting, remove_downloaded, force_update,
print("==> Download (%s) finish!" % self._filename)


def _check_python_version():
major_ver = sys.version_info[0]
if major_ver > 2:
print ("The python version is %d.%d. But python 2.x is required. (Version 2.7 is well tested)\n"
"Download it here: https://www.python.org/" % (major_ver, sys.version_info[1]))
return False

return True


def main():
workpath = os.path.dirname(os.path.realpath(__file__))

if not _check_python_version():
exit()

parser = OptionParser()
parser.add_option('-r', '--remove-download',
action="store", type="string", dest='remove_downloaded', default=None,
Expand Down