websockify icon indicating copy to clipboard operation
websockify copied to clipboard

Pyinstaller support

Open cowo78 opened this issue 5 years ago • 7 comments

Added a PyInstaller .spec file to build a frozen distribution. Also set "C" locale to limit required encodings modules.

cowo78 avatar Mar 07 '19 10:03 cowo78

Thank you for your contribution. This configuration file looks a bit large though, and difficult to maintain. Do we really need to have a large list of exclusion?

And we don't want to mess up the locale like that as we would like to respect the system settings.

CendioOssman avatar Apr 02 '19 12:04 CendioOssman

Regarding size/maintenability: this is pretty much standard pyinstaller config, so I basically don't expect any changes to be needed (exept i.e. if websockify entry point changes). The exclusion list is of course optional: on python3.7/64bit leaving it out changes output size from 11MB to 14MB.

Regarding the locale: since no currencies are involved it basically means datetime. AFAIK logging in websockify has a custom formatter that only displays message so I don't see any changes happening.

However these are not standpoints to me so I'll stick to your decision.

cowo78 avatar Apr 03 '19 07:04 cowo78

Going from 11 MB to 14 MB doesn't seem like a big deal. Can we remove the entire exception list in that case?

CendioOssman avatar Apr 04 '19 07:04 CendioOssman

Depends on how much flash you have on your device, but surely that's not a deal on common PC-based hardware. I can comment the exclusion list, revert the setlocale and add some comments in the .spec on how to reduce output size. Sounds good?

cowo78 avatar Apr 04 '19 08:04 cowo78

Sounds good. :+1:

CendioOssman avatar Apr 04 '19 08:04 CendioOssman

Please have a look. It may be interesting to distribute the self-contained binaries (think mainly on windows, though I don't even know if websockify works on the platform) along with other formats in a release cycle.

cowo78 avatar Apr 04 '19 12:04 cowo78

Looks good, thanks. Could you rebase everything in to a single commit?

It may be interesting to distribute the self-contained binaries (think mainly on windows, though I don't even know if websockify works on the platform) along with other formats in a release cycle.

Might be interesting, yes. I don't have much experience building self-contained python executables though.

CendioOssman avatar Apr 12 '19 07:04 CendioOssman