Files
orisys-sdk/build/common/bootstrap.py
T
2026-08-03 22:14:19 +08:00

16 lines
370 B
Python

"""Ensure ``build/`` is importable as the root for ``common``, ``wheel``, and ``gui``."""
from __future__ import annotations
import sys
from pathlib import Path
_BUILD_ROOT = Path(__file__).resolve().parents[1]
def ensure_build_root_on_path() -> Path:
root = str(_BUILD_ROOT)
if root not in sys.path:
sys.path.insert(0, root)
return _BUILD_ROOT