def hook(mod): pth = str(mod.__path__[0]) if os.path.isdir(pth): # If the user imported setuparg1, this is detected # by the hook-wx.lib.pubsub.setuparg1.py hook. That # hook sets PyInstaller.hooks.hookutils.wxpubsub # to "arg1", and we set the appropriate path here. protocol = getattr(PyInstaller.hooks.hookutils, 'wxpubsub', 'kwargs') logger.info('wx.lib.pubsub: Adding %s protocol path' % protocol) mod.__path__.append(os.path.normpath(os.path.join(pth, protocol))) return mod
def hook(mod): # If not supported platform, skip TCL/TK detection. if not (is_win or is_darwin or is_unix): logger.info("... skipping TCL/TK detection on this platform (%s)", sys.platform) return mod # Get the Tcl/Tk data files for bundling with executable. # try: tk_files = _collect_tkfiles(mod) mod.datas.extend(tk_files) # except: # logger.error("could not find TCL/TK") return mod
def hook(mod): # If not supported platform, skip TCL/TK detection. if not (is_win or is_darwin or is_unix): logger.info("... skipping TCL/TK detection on this platform (%s)", sys.platform) return mod # Get the Tcl/Tk data files for bundling with executable. #try: tk_files = _collect_tkfiles(mod) mod.datas.extend(tk_files) #except: #logger.error("could not find TCL/TK") return mod
def hook(mod): # get the shared libs used by _tkinter.so (resp. .dll, et al) binaries = bindepend.selectImports(mod.__file__) if is_win: tcl_tk = find_tk_win(binaries) elif is_darwin: tcl_tk = find_tk_darwin(binaries) elif is_unix: tcl_tk = find_tk_unix(binaries) else: # If no pattern is in place for this platform, skip TCL/TK detection. tcl_tk = -1 if tcl_tk == -1: logger.info("... skipping TCL/TK detection on this platform (%s)", sys.platform) elif tcl_tk is None: logger.error("could not find TCL/TK") else: mod.datas.extend(collect_tkfiles(*tcl_tk)) return mod