I\'m attempting to run PyInstaller on a CLI app I am building in Python using the Click library. I\'m having trouble building the project using PyInstaller. PyInstaller has
Something I've noticed is that the typical way of adding a data file doesn't work once you've monkey patched Entrypoint in the way Scott Crooks recommends in the ticked answer. For me, I had to append to the a.datas
array. In python3, this looks like:
...
a = Entrypoint(...)
from pathlib import Path
Path('/tmp/modulename/datafile.txt').write_text(Path('datafile.txt').read_text()))
a.datas.append('datafile.txt', '/tmp/modulename/datafile.txt', 'DATA')
pyz = PYZ(...)
...