@@ -449,22 +449,24 @@ def install(self, package, install_options=None):
449
449
450
450
def handle_specific_packages (self , package ):
451
451
"""Packages requiring additional configuration"""
452
- if package .name in ('PyQt ' , 'PyQt4 ' ):
452
+ if package .name . lower () in ('pyqt4 ' , 'pyqt5 ' ):
453
453
# Qt configuration file (where to find Qt)
454
454
name = 'qt.conf'
455
455
contents = """[Paths]
456
456
Prefix = .
457
457
Binaries = ."""
458
458
self .create_file (package , name ,
459
- osp .join ('Lib' , 'site-packages' , 'PyQt4' ),
459
+ osp .join ('Lib' , 'site-packages' , package . name ),
460
460
contents )
461
461
self .create_file (package , name , '.' ,
462
- contents .replace ('.' , './Lib/site-packages/PyQt4' ))
462
+ contents .replace ('.' , './Lib/site-packages/%s' % package . name ))
463
463
# 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 )
466
468
# 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' )
468
470
for dirname in ('Loader' , 'port_v2' , 'port_v3' ):
469
471
self .create_file (package , '__init__.py' ,
470
472
osp .join (uic_path , dirname ), '' )
0 commit comments