gfdm-server/v8_server/version.py
2021-01-15 11:20:16 -06:00

21 lines
510 B
Python

from pathlib import Path
def get_version_number() -> str:
# This file must exist in the root of the module, as the following code
# tries to find the module root so that it can find the VERSION file.
# project_root/
# - module/
# - VERSION
# - version.py
root_dir = Path(__file__).parent
version = "-1.-1.-1"
with (root_dir / "VERSION").open() as version_file:
version = version_file.read().strip()
return version
__version__ = get_version_number()