@@ -448,6 +448,30 @@ def patch_standard_packages(self, package_name=''):
448448 "'.__init__(item, 'pos')" ,
449449 "'.__init__(item, b'pos')" )
450450
451+ # workaround bad installers
452+ if package_name .lower () == "theano" or package_name == '' :
453+ self .create_pybat (['theano-cache' , 'theano-nose' , 'theano-test' ])
454+ if package_name .lower () == "numba" or package_name == '' :
455+ self .create_pybat (['numba' , 'pycc' ])
456+ for checklist in ("odo" , "vitables" , "cxfreeze" ):
457+ if package_name .lower () == checklist or package_name == '' :
458+ self .create_pybat (checklist )
459+
460+
461+ def create_pybat (self , names , contents = """@echo off
462+ python "%~dpn0" %*""" ):
463+ """Create launcher batch script when missing"""
464+
465+ scriptpy = osp .join (self .target , 'Scripts' ) # std Scripts of python
466+ my_list = names if list (names ) == names else [names ]
467+ for name in my_list :
468+ if osp .isdir (scriptpy ) and osp .isfile (osp .join (scriptpy , name )):
469+ if (not osp .isfile (osp .join (scriptpy , name + '.exe' )) and
470+ not osp .isfile (osp .join (scriptpy , name + '.bat' ))):
471+ fd = open (osp .join (scriptpy , name + '.bat' ), 'w' )
472+ fd .write (contents )
473+ fd .close ()
474+
451475 def handle_specific_packages (self , package ):
452476 """Packages requiring additional configuration"""
453477 if package .name .lower () in ('pyqt4' , 'pyqt5' ):
0 commit comments