@@ -407,11 +407,11 @@ def install(self, package, install_options=None):
407407 if tmp_fname is not None :
408408 os .remove (tmp_fname )
409409
410- def patch_standard_packages (self , package_name = None ):
410+ def patch_standard_packages (self , package_name = '' ):
411411 """patch Winpython packages in need"""
412412 import filecmp
413413 # 'pywin32' minimal post-install (pywin32_postinstall.py do too much)
414- if package_name == "pywin32" or package_name == None :
414+ if package_name . lower () == "pywin32" or package_name == '' :
415415 origin = self .target + (r"\Lib\site-packages\pywin32_system32" )
416416 destin = self .target
417417 for name in os .listdir (origin ):
@@ -421,17 +421,32 @@ def patch_standard_packages(self, package_name=None):
421421 shutil .copyfile (here , there )
422422 # 'pip' to do movable launchers (around line 100) !!!!
423423 # rational: https://github.com/pypa/pip/issues/2328
424- if package_name == "pip" or package_name == None :
424+ if package_name . lower () == "pip" or package_name == '' :
425425 # ensure pip will create movable launchers
426426 utils .patch_sourcefile (
427427 self .target + (
428428 r"\Lib\site-packages\pip\_vendor\distlib\scripts.py" ),
429429 " executable = get_executable()" ,
430430 " executable = os.path.join(os.path.basename(get_executable()))" )
431-
432431 # create movable launchers for previous package installations
433432 self .patch_all_shebang ()
434433
434+ if package_name .lower () == "spyder" or package_name == '' :
435+ # spyder don't goes on internet without I ask
436+ utils .patch_sourcefile (
437+ self .target + (
438+ r"\Lib\site-packages\spyderlib\config\main.py" ),
439+ "'check_updates_on_startup': True," ,
440+ "'check_updates_on_startup': False," )
441+
442+ if package_name .lower () == "pyqt5" or package_name == '' :
443+ # workaround Qt5.5.0 bug
444+ utils .patch_sourcefile (
445+ self .target + (
446+ r"\Lib\site-packages\PyQt5\examples\qtdemo\demoitemanimation.py" ),
447+ "'.__init__(item, 'pos')" ,
448+ "'.__init__(item, b'pos')" )
449+
435450 def handle_specific_packages (self , package ):
436451 """Packages requiring additional configuration"""
437452 if package .name .lower () in ('pyqt4' , 'pyqt5' ):
0 commit comments