from __future__ import annotations import sys from pathlib import Path from typing import Any def import_cudaslicer() -> Any | None: # Check local development path first to prioritize live compiled binaries during development dev_paths = [ Path("/home/nicolas/Workspace/Development/cudaslicer/python"), Path(__file__).resolve().parent.parent / "deps" / "cudaslicer" / "python", ] for p in dev_paths: if p.exists() and str(p) not in sys.path: sys.path.insert(0, str(p)) try: import cudaslicer return cudaslicer except ImportError: return None