hook-pyi_hooksample.py - A hook for the pyi_hooksample library


This is a PyInstaller hook. needed to successfully freeze the pyi_hooksample package. See the PyInstaller manual for more information.

from PyInstaller.utils.hooks import collect_data_files

Hook global variables

For the package pyi_hooksample to be frozen successfully, the module pyi_hooksample._hidden needs to be frozen, too, as well as all data-files. This hook takes care about this. For more information see hook global variables in the manual for more information.

hiddenimports = ["pyi_hooksample._hidden"]

The excludes parameter of collect_data_files excludes rthooks.dat from the frozen executable, which is only needed when freezeing, but not when executing the frozen program.

datas = collect_data_files('pyi_hooksample', excludes=['__pyinstaller'])