@@ -36,15 +36,24 @@ def fix_registry(python_ver):
36
36
fix_registry ('35' )
37
37
fix_registry ('27' )
38
38
caption = os .environ ['INSTALL_QT' ]
39
- url = downloads [caption ]
40
- print ("Downloading %s..." % caption )
41
- installer = r'C:\install-%s.exe' % caption
42
- urllib .urlretrieve (base_url + url , installer )
39
+ installers_dir = r'C:\Installers'
40
+ if not os .path .isdir (installers_dir ):
41
+ os .makedirs (installers_dir )
42
+ installer = os .path .join (installers_dir , 'install-%s.exe' % caption )
43
+ if not os .path .isfile (installer ):
44
+ # download all files because the cache is for all builds
45
+ for cap , url in sorted (downloads .items ()):
46
+ print ("Downloading %s..." % cap )
47
+ filename = os .path .join (installers_dir , 'install-%s.exe' % cap )
48
+ urllib .urlretrieve (base_url + url , filename )
49
+ else :
50
+ print ('Using cached installers' )
43
51
print ('Installing %s...' % caption )
44
52
subprocess .check_call ([installer , '/S' ])
45
53
python = caption .split ('-' )[0 ]
46
54
assert python [:2 ] == 'py'
47
55
executable = r'C:\Python%s\python.exe' % python [2 :]
56
+ url = downloads [caption ]
48
57
module = url .split ('/' )[0 ]
49
58
cmdline = [executable , '-c' , 'import %s;print(%s)' % (module , module )]
50
59
print ('Checking: %r' % cmdline )
0 commit comments