@@ -853,12 +853,15 @@ def make(self, remove_existing=True, requirements=None): #, find_links=None):
853853 self ._print_done ()
854854
855855
856- def rebuild_winpython (basedir = None , verbose = False , archis = (32 , 64 )):
856+ def rebuild_winpython (basedir = None , verbose = False , archis = (32 , 64 ), targetdir = None ):
857857 """Rebuild winpython package from source"""
858858 basedir = basedir if basedir is not None else utils .BASE_DIR
859859 for architecture in archis :
860860 suffix = '.win32' if architecture == 32 else '.win-amd64'
861- packdir = osp .join (basedir , 'packages' + suffix )
861+ if targetdir is not None :
862+ packdir = targetdir
863+ else :
864+ packdir = osp .join (basedir , 'packages' + suffix )
862865 for name in os .listdir (packdir ):
863866 if name .startswith ('winpython-' ) and name .endswith (('.exe' , '.whl' )):
864867 os .remove (osp .join (packdir , name ))
@@ -901,6 +904,10 @@ def make_winpython(build_number, release_level, architecture,
901904 if osp .isdir (wheeldir ):
902905 shutil .rmtree (wheeldir , onerror = utils .onerror )
903906 os .mkdir (wheeldir )
907+
908+ # Rebuild Winpython in this wheel dir
909+ rebuild_winpython (basedir = basedir , archis = (architecture ,), targetdir = wheeldir )
910+
904911 # Copy Every package directory to the wheel directory
905912
906913 # Optional pre-defined source_dirs
@@ -1000,7 +1007,7 @@ def make_all(build_number, release_level, pyver,
10001007 install_options = install_options .split ()
10011008 print ('install_options' , install_options )
10021009 basedir = utils .get_basedir (pyver , rootdir = rootdir )
1003- rebuild_winpython ( basedir = basedir , archis = archis )
1010+
10041011 for architecture in archis :
10051012 make_winpython (build_number , release_level , architecture , basedir ,
10061013 verbose , remove_existing , create_installer , simulation ,
0 commit comments