Example #1
0
def hook(mod):
    # If not supported platform, skip TCL/TK detection.
    if is_win or is_darwin or is_unix:
        # Get the Tcl/Tk data files for bundling with executable.
        tk_files = _collect_tkfiles(mod)
        mod.datas.extend(tk_files)
    else:
        logger.info("... skipping TCL/TK detection on this platform (%s)", sys.platform)

    return mod
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 = PyInstaller.utils.hooks.hookutils.hook_variables.get('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