@@ -371,7 +371,7 @@ def install(self, package, install_options=None):
371
371
assert package .is_compatible_with (self )
372
372
tmp_fname = None
373
373
# (tragic if pip) self.uninstall_existing(package)
374
- if package .fname .endswith (('.NOtar .gz' , '.NOzip ' )):
374
+ if package .fname .endswith (('.tar .gz' , '.zip ' )):
375
375
self ._print (package , "Building" )
376
376
try :
377
377
fname = utils .source_to_wininst (package .fname ,
@@ -385,8 +385,8 @@ def install(self, package, install_options=None):
385
385
package = Package (fname )
386
386
self ._print_done ()
387
387
# wheel addition
388
- if package .fname .endswith (('.whl' , '.tar.gz' , '.zip' )):
389
- self .install_bdist_direct (package , install_options = install_options )
388
+ if package .fname .endswith (('.whl' )):
389
+ self .install_bdist_wheel (package , install_options = install_options )
390
390
391
391
bname = osp .basename (package .fname )
392
392
if bname .endswith ('.exe' ):
@@ -397,8 +397,7 @@ def install(self, package, install_options=None):
397
397
elif bname .endswith ('.msi' ):
398
398
self .install_bdist_msi (package )
399
399
self .handle_specific_packages (package )
400
- if not package .fname .endswith (('.whl' , '.tar.gz' , '.zip' )):
401
- package .save_log (self .logdir )
400
+ package .save_log (self .logdir )
402
401
if tmp_fname is not None :
403
402
os .remove (tmp_fname )
404
403
@@ -462,11 +461,10 @@ def handle_specific_packages(self, package):
462
461
self .create_file (package , name , '.' ,
463
462
contents .replace ('.' , './Lib/site-packages/%s' % package .name ))
464
463
# pyuic script
465
- tmp_string = r'''@echo off
466
- python "%WINPYDIR%\Lib\site-packages\package.name\uic\pyuic.py" %1 %2 %3 %4 %5 %6 %7 %8 %9'''
467
-
468
464
self .create_file (package , 'pyuic%s.bat' % package .name [- 1 ],
469
- 'Scripts' , tmp_string .replace ('package.name' , package .name ))
465
+ 'Scripts' , r'''@echo off
466
+ python "%WINPYDIR%\Lib\site-packages\%s\uic\pyuic.py" %1 %2 %3 %4 %5 %6 %7 %8 %9'''
467
+ % package .name )
470
468
# Adding missing __init__.py files (fixes Issue 8)
471
469
uic_path = osp .join ('Lib' , 'site-packages' , package .name , 'uic' )
472
470
for dirname in ('Loader' , 'port_v2' , 'port_v3' ):
@@ -557,9 +555,9 @@ def install_bdist_wininst(self, package):
557
555
self .copy_files (package , targetdir , 'DATA' , '.' )
558
556
self ._print_done ()
559
557
560
- def install_bdist_direct (self , package , install_options = None ):
561
- """Install a package directly !"""
562
- self ._print (package , "Installing %s" % package . fname . split ( "." )[ - 1 ] )
558
+ def install_bdist_wheel (self , package , install_options = None ):
559
+ """Install a wheel directly !"""
560
+ self ._print (package , "Installing Wheel" )
563
561
# targetdir = utils.extract_msi(package.fname, targetdir=self.target)
564
562
try :
565
563
fname = utils .direct_pip_install (package .fname ,
0 commit comments