@@ -449,22 +449,24 @@ def install(self, package, install_options=None):
449449
450450 def handle_specific_packages (self , package ):
451451 """Packages requiring additional configuration"""
452- if package .name in ('PyQt ' , 'PyQt4 ' ):
452+ if package .name . lower () in ('pyqt4 ' , 'pyqt5 ' ):
453453 # Qt configuration file (where to find Qt)
454454 name = 'qt.conf'
455455 contents = """[Paths]
456456Prefix = .
457457Binaries = ."""
458458 self .create_file (package , name ,
459- osp .join ('Lib' , 'site-packages' , 'PyQt4' ),
459+ osp .join ('Lib' , 'site-packages' , package . name ),
460460 contents )
461461 self .create_file (package , name , '.' ,
462- contents .replace ('.' , './Lib/site-packages/PyQt4' ))
462+ contents .replace ('.' , './Lib/site-packages/%s' % package . name ))
463463 # pyuic script
464- self .create_file (package , 'pyuic4.bat' , 'Scripts' , r'''@echo off
465- python "%WINPYDIR%\Lib\site-packages\PyQt4\uic\pyuic.py" %1 %2 %3 %4 %5 %6 %7 %8 %9''' )
464+ 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 )
466468 # Adding missing __init__.py files (fixes Issue 8)
467- uic_path = osp .join ('Lib' , 'site-packages' , 'PyQt4' , 'uic' )
469+ uic_path = osp .join ('Lib' , 'site-packages' , package . name , 'uic' )
468470 for dirname in ('Loader' , 'port_v2' , 'port_v3' ):
469471 self .create_file (package , '__init__.py' ,
470472 osp .join (uic_path , dirname ), '' )
0 commit comments