16 lines
370 B
Python
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
|