Research-Stack/5-Applications/text-to-cad/skills/cad/scripts/cadref/__main__.py

16 lines
403 B
Python

from __future__ import annotations
import sys
from pathlib import Path
if __package__ in {None, ""}:
tool_dir = Path(__file__).resolve().parent
sys.path = [path for path in sys.path if Path(path or ".").resolve() != tool_dir]
sys.path.insert(0, str(tool_dir.parent))
from cadref.cli import main
else:
from .cli import main
if __name__ == "__main__":
raise SystemExit(main())