__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.
- pyi_rth_hooksample.py - A run-time hook for the hook sample library
- rthooks.dat - Run-time hooks for PyInstaller
rthooks/
__init__.py - make this directory a dummy packagepre_find_module_path/
hook-pyi_hooksample.py - Provide PyInstaller pre-find module path hookspre_find_module_path/
__init__.py - make this directory a dummy packagepre_safe_import_module/
hook-pyi_hooksample.py - Provide PyInstaller pre-safe import module hookspre_safe_import_module/
__init__.py - make this directory a dummy package
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__)]