from __future__ import annotations import shutil from pathlib import Path ROOT = Path(__file__).resolve().parents[1] SRC = ROOT / "src" / "inferscale" DEST = ROOT / "py" / "inferscale" if DEST.exists(): shutil.rmtree(DEST) DEST.parent.mkdir(parents=True, exist_ok=True) shutil.copytree(SRC, DEST, ignore=shutil.ignore_patterns("__pycache__", "*.pyc")) print(f"Synced {SRC} -> {DEST}")