@@ -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 (('.tar .gz' , '.zip ' )):
374
+ if package .fname .endswith (('.NOtar .gz' , '.NOzip ' )):
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' )):
389
- self .install_bdist_wheel (package , install_options = install_options )
388
+ if package .fname .endswith (('.whl' , '.tar.gz' , '.zip' )):
389
+ self .install_bdist_direct (package , install_options = install_options )
390
390
391
391
bname = osp .basename (package .fname )
392
392
if bname .endswith ('.exe' ):
@@ -397,7 +397,8 @@ 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
- package .save_log (self .logdir )
400
+ if not package .fname .endswith (('.whl' , '.tar.gz' , '.zip' )):
401
+ package .save_log (self .logdir )
401
402
if tmp_fname is not None :
402
403
os .remove (tmp_fname )
403
404
@@ -461,10 +462,11 @@ def handle_specific_packages(self, package):
461
462
self .create_file (package , name , '.' ,
462
463
contents .replace ('.' , './Lib/site-packages/%s' % package .name ))
463
464
# 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
+
464
468
self .create_file (package , 'pyuic%s.bat' % package .name [- 1 ],
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 )
469
+ 'Scripts' , tmp_string .replace ('package.name' , package .name ))
468
470
# Adding missing __init__.py files (fixes Issue 8)
469
471
uic_path = osp .join ('Lib' , 'site-packages' , package .name , 'uic' )
470
472
for dirname in ('Loader' , 'port_v2' , 'port_v3' ):
@@ -555,9 +557,9 @@ def install_bdist_wininst(self, package):
555
557
self .copy_files (package , targetdir , 'DATA' , '.' )
556
558
self ._print_done ()
557
559
558
- def install_bdist_wheel (self , package , install_options = None ):
559
- """Install a wheel directly !"""
560
- self ._print (package , "Installing Wheel" )
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 ] )
561
563
# targetdir = utils.extract_msi(package.fname, targetdir=self.target)
562
564
try :
563
565
fname = utils .direct_pip_install (package .fname ,
0 commit comments