From 3b57a6b850952a1979e9944f9e1997400a31d996 Mon Sep 17 00:00:00 2001 From: Andy Jost Date: Tue, 15 Sep 2026 15:13:03 -0700 Subject: [PATCH] cuda.core: anchor _extension_depends() on build_hooks.py's location The depends list located the _cpp headers relative to the current directory. Anchor it on the module's own path so it does not assume the process runs inside cuda_core. Follow-up to a review comment on #2837. Co-Authored-By: Claude Fable 5.1 --- cuda_core/build_hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuda_core/build_hooks.py b/cuda_core/build_hooks.py index 47bd4e7c66e..927c1264278 100644 --- a/cuda_core/build_hooks.py +++ b/cuda_core/build_hooks.py @@ -212,7 +212,7 @@ def _extension_depends(): Listing the whole directory keeps the rule free of include parsing; the cost is that every extension rebuilds when any of these headers changes, exactly as editing the one monolithic header did before the split.""" - cpp = Path("cuda", "core", "_cpp") + cpp = Path(__file__).parent / "cuda" / "core" / "_cpp" return sorted( str(path) for module_dir in cpp.iterdir()