themeZed/themezed/__main__.py
2023-12-18 15:53:10 -08:00

23 lines
741 B
Python

# import qt stuff
import PyQt6.QtCore # TODO: only import classes and methods needed to reduce mem usage
def print_ver() -> None: # TODO: maybe find a better way to do this?
import platform
from importlib.metadata import version, PackageNotFoundError
tzv = ""
try:
tzv = version("themezed")
except PackageNotFoundError:
import tomllib
with open("./pyproject.toml","rb") as f:
tzv = tomllib.load(f)["tool"]["poetry"]["version"]
print("Theme-ZED - Version {}\n\nRunning on Python ({}) {}, using\n\tPyQt\t{}".format(
tzv,
platform.python_implementation(),platform.python_version(),
PyQt6.QtCore.PYQT_VERSION_STR
))
# TODO: actually do stuff
print_ver()