eive-obsw/generators/definitions.py

24 lines
514 B
Python
Raw Normal View History

2021-08-02 11:43:49 +02:00
import os
2021-05-17 18:56:38 +02:00
import enum
2021-08-02 11:43:49 +02:00
from pathlib import Path
2021-05-17 18:56:38 +02:00
2022-03-01 18:03:50 +01:00
def determine_obsw_root_path() -> str:
for _ in range(5):
if os.path.exists("CMakeLists.txt"):
return os.curdir
else:
os.chdir("..")
PATH_VAR_ROOT = os.path.dirname(os.path.realpath(__file__))
ROOT_DIR = PATH_VAR_ROOT
OBSW_ROOT_DIR = Path(determine_obsw_root_path())
2021-05-18 16:14:11 +02:00
DATABASE_NAME = "eive_mod.db"
2021-05-17 18:56:38 +02:00
class BspType(enum.Enum):
BSP_Q7S = "bsp_q7s"
BSP_HOSTED = "bsp_hosted"
BSP_LINUX_BOARD = "bsp_linux_board"