Skip to content

Meta

cibmangotree.meta

Modules:

Name Description
get_version

Modules

get_version

Functions:

Name Description
get_version

Return version string if running as a bundled app, else None.

Functions:
get_version()

Return version string if running as a bundled app, else None.

Bundled apps have a VERSION file at the root of the PyInstaller extraction directory (sys._MEIPASS). Development runs always return None so the GUI shows "dev".

Source code in src/cibmangotree/meta/get_version.py
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
def get_version():
    """Return version string if running as a bundled app, else None.

    Bundled apps have a VERSION file at the root of the PyInstaller
    extraction directory (sys._MEIPASS). Development runs always
    return None so the GUI shows "dev".
    """
    if getattr(sys, "frozen", False):
        version_path = Path(sys._MEIPASS) / "VERSION"
        if version_path.exists():
            return version_path.read_text().strip()
    return None