#!/usr/bin/env python3.12
"""Run script for pyinstaller.

Create a standalone executable as:

pyinstaller --name zabbix-cli bin/zabbix-cli -F --hidden-import=zabbix_cli.app

The finished binary will be in the `dist` directory.

The hidden import is required to include the host submodules in the executable,
due to using dynamic imports.
"""

from __future__ import annotations

import re
import sys

from zabbix_cli.main import main

if __name__ == "__main__":
    sys.argv[0] = re.sub(r"(-script\.pyw|\.exe)?$", "", sys.argv[0])
    sys.exit(main())
