__pyinstaller/ __init__.py - Provide PyInstaller hooks

This package provides a hook for PyInstaller needed to successfully freeze the pyi_hooksample package. It also provides tests for that hook.

 

For demonstration purposes, it also includes the rarely used advanced hook types (run-time, pre-find module path, pre-safe import module), though these hooks perform no useful role in freezing this project.

 
import os
 

Functions

get_hook_dirs

Tell PyInstaller where to find hooks provided by this distribution; this is referenced by the hook registration. This function returns a list containing only the path to this directory, which is the location of these hooks.

 
def get_hook_dirs():
    return [os.path.dirname(__file__)]
 
 

get_PyInstaller_tests

Tell PyInstaller where to find tests of the hooks provided by this distribution; this is referenced by the tests registration. This function returns a list containing only the path to this directory, which is the location of these tests.

 
def get_PyInstaller_tests():
    return [os.path.dirname(__file__)]