Skip to content

pyinstaller

Main script for creating executable based on Python source files

install()

Function to create self-contained executable out of python files. Function can be called from command line using a poetry function. Contains settings for pyinstaller.

Source code in D-EcoImpact/pyinstaller.py
def install():
    """Function to create self-contained executable out of python files.
    Function can be called from command line using a poetry function.
    Contains settings for pyinstaller."""

    # MDK: this warning is disabled on purpose. Using PyInstaller.__main__
    # comes directly from the documentation of PyInstaller.

    # pylint: disable=maybe-no-member
    PyInstaller.__main__.run(
        [
            PATH_TO_MAIN,
            "--name=decoimpact",
            "--console",
            # other pyinstaller options...
        ]
    )