Skip to content

Compiling SeBAz using PyInstaller

Deepak Balaji edited this page Apr 4, 2020 · 2 revisions

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 -OO flag performs bytecode optimization and additionally removes docstrings

The --add-data flag adds the additional scripts to the executable

The --runtime-tmpdir flag specifies where to extract the libraries and support files. This will create a temporary _MEIxxxxxx folder at the program call directory, which will be deleted when the program has finished executing successfully

The --onefile flag 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.

Clone this wiki locally