I am trying to create an EXE of a python program. The program is quite complex and cannot be listed here. I have some user defined modules, halfwave, halfwave.utils and halfwave.db. I need to create a hook for these modules, so I have made files hook-halfwave.py, hook-halfwave.db.py and halfwave.utils.py and put in a folder called hooks. In the program I import the modules
from halfwave import ...
from halfwave.utils import ...
from halfwave.db import ...
But the hook files are never called by the pyinstaller. I have tried setting hookspath in the Analysis structure of the spec file and set the --additional-hooks-path switch. If I put the hook files in the pyinstaller hooks path, they get called, but that is not a good option. What is the trick for making the pyinstaller call the hook files?
EDIT: The command I run is
pyinstaller -y foo.spec
and the .spec file looks something like this
a = Analysis(['.\\src\\testfoo.py'],
pathex=['C:\\Data\\python\\testfoo'],
hiddenimports=[],
hookspath='.\\hooks\\',
runtime_hooks=None)
pyz = PYZ(a.pure)
exe = EXE(pyz,
a.scripts, ...
Also tried using the --additional-hooks-dir switch, but that makes no difference.
Thanks