wakepy icon indicating copy to clipboard operation
wakepy copied to clipboard

Wakepy and pyinstaller - does it works?

Open folkien opened this issue 1 year ago • 1 comments

Hello,

I have a python program packed with pyinstaller which uses wakepy. After packing for windows 10 .exe program is halted when wakepy with keep.running() is called. Have you tested it with pyinstaller?

folkien avatar Oct 20 '23 15:10 folkien

Hi @folkien , there is nothing so special in wakepy which would make it not possible to use it in a packaged executable. One thing to consider, though: The current (0.7.2) version uses still parts from a subpackage called _deprecated. As this has dynamical (runtime) imports, pyinstaller and alike do not see the import and cannot automatically add the files to the bundle. This means that those files need to be added to the bundle manually.

See also https://github.com/fohrloop/wakepy/issues/49

Note that the _deprecated subpackage is, as the name also implies, deprecated and will be removed in a future version of wakepy. In the future, I hope the dynamical imports can be avoided altogether.

Hope this helps!

Niko

fohrloop avatar Oct 20 '23 15:10 fohrloop