-
Notifications
You must be signed in to change notification settings - Fork 10
Compiling SeBAz using PyInstaller
This page explains how the SeBAz binary is created
Run the following command from the virtual environment
python -OO -m PyInstaller SeBAz.py --add-data "./scripts:scripts" --onefile --runtime-tmpdir "."
The
-OOflag performs bytecode optimization and additionally removes docstrings
The
--add-dataflag adds the additional scripts to the executable
The
--runtime-tmpdirflag specifies where to extract the libraries and support files. This will create a temporary_MEIxxxxxxfolder at the program call directory, which will be deleted when the program has finished executing successfully
The
--onefileflag creates a one-file executable bundle
Additionally, the following quotes from PyInstaller document needs to be kept in mind
- glibc requirement in end user system [link]
Under GNU/Linux, PyInstaller does not bundle libc (the C standard library, usually glibc, the Gnu version) with the app. Instead, the app expects to link dynamically to the libc from the local OS where it runs. The interface between any app and libc is forward compatible to newer releases, but it is not backward compatible to older releases.
- seperate executables for specific platforms [link]
The GNU/Linux standard libraries such as glibc are distributed in 64-bit and 32-bit versions, and these are not compatible. As a result you cannot bundle your app on a 32-bit system and run it on a 64-bit installation, nor vice-versa. You must make a unique version of the app for each word-length supported.