@@ -60,7 +60,7 @@ def report_progress(count, blockSize, totalSize):
60
60
61
61
def unpack (filename , destination ):
62
62
dirname = ''
63
- print ('Extracting {0}' .format (os .path .basename (filename )))
63
+ print ('Extracting {0} ... ' .format (os .path .basename (filename )))
64
64
sys .stdout .flush ()
65
65
if filename .endswith ('tar.gz' ):
66
66
tfile = tarfile .open (filename , 'r:gz' )
@@ -76,7 +76,7 @@ def unpack(filename, destination):
76
76
# a little trick to rename tool directories so they don't contain version number
77
77
rename_to = re .match (r'^([a-z][^\-]*\-*)+' , dirname ).group (0 ).strip ('-' )
78
78
if rename_to != dirname :
79
- print ('Renaming {0} to {1}' .format (dirname , rename_to ))
79
+ print ('Renaming {0} to {1} ... ' .format (dirname , rename_to ))
80
80
if os .path .isdir (rename_to ):
81
81
shutil .rmtree (rename_to )
82
82
shutil .move (dirname , rename_to )
@@ -106,9 +106,8 @@ def get_tool(tool):
106
106
archive_name = tool ['archiveFileName' ]
107
107
local_path = dist_dir + archive_name
108
108
url = tool ['url' ]
109
- #real_hash = tool['checksum'].split(':')[1]
110
109
if not os .path .isfile (local_path ):
111
- print ('Downloading ' + archive_name )
110
+ print ('Downloading ' + archive_name + ' ...' )
112
111
sys .stdout .flush ()
113
112
if 'CYGWIN_NT' in sys_name :
114
113
import ssl
@@ -127,15 +126,11 @@ def get_tool(tool):
127
126
download_file (url , local_path )
128
127
else :
129
128
urlretrieve (url , local_path , report_progress )
130
- sys .stdout .write ("\r Done\n " )
131
- sys .stdout .flush ()
129
+ sys .stdout .write ("\r Done\n " )
130
+ sys .stdout .flush ()
132
131
else :
133
132
print ('Tool {0} already downloaded' .format (archive_name ))
134
133
sys .stdout .flush ()
135
- #local_hash = sha256sum(local_path)
136
- #if local_hash != real_hash:
137
- # print('Hash mismatch for {0}, delete the file and try again'.format(local_path))
138
- # raise RuntimeError()
139
134
unpack (local_path , '.' )
140
135
141
136
def load_tools_list (filename , platform ):
0 commit comments