I'm using PyInstaller on Windows on a project structured as a package, like this:
myproject/
__init__.py
__init__.py
module_a.py
subpackage_b/
__init__.py
module_b.py
cli.py
The entry point is cli.py, which starts like this:
import logging
import click
from myproject.subpackage_a import module_a
from myproject.subpackage_b import module_b
I'm running this PyInstaller command:
pyinstaller cli.py -y --clean
It fails to find the modules in the pyproject package, reporting the following in the warn-cli.txt:
missing module named 'myproject.subpackage_a' - imported by C:\LocalProjects\myproject\cli.py (top-level)
missing module named 'myproject.subpackage_b' - imported by C:\LocalProjects\myproject\cli.py (top-level)
I've already tried adding --paths ./myproject to the PyInstaller command, as well as putting the cli.py file inside the package and adjusting the PyInstaller command appropriately, neither of which made any difference to the result.
This seems like really basic functionality, so I figure I'm missing something simple but non-obvious. Any help would be appreciated.