Skip to content

Commit 87e87fc

Browse files
committed
fix(pathfinder): run loader subprocesses outside checkout
Launch the subprocess helper from a neutral working directory so wheel-based CI imports the installed cuda-pathfinder package instead of the source tree and avoids missing generated _version.py failures. Made-with: Cursor
1 parent 0fc8d3f commit 87e87fc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cuda_pathfinder/tests/child_load_nvidia_dynamic_lib_helper.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@
55

66
import subprocess
77
import sys
8+
import tempfile
89
from pathlib import Path
910

1011
from cuda.pathfinder._testing.load_nvidia_dynamic_lib_subprocess import DYNAMIC_LIB_NOT_FOUND_MARKER
1112

1213
LOAD_NVIDIA_DYNAMIC_LIB_SUBPROCESS_MODULE = "cuda.pathfinder._testing.load_nvidia_dynamic_lib_subprocess"
13-
LOAD_NVIDIA_DYNAMIC_LIB_SUBPROCESS_CWD = Path(__file__).resolve().parents[1]
14+
# Launch the child from a neutral directory so `python -m cuda.pathfinder...`
15+
# resolves the installed package instead of the source checkout. In CI the
16+
# checkout does not contain the generated `_version.py` file.
17+
LOAD_NVIDIA_DYNAMIC_LIB_SUBPROCESS_CWD = Path(tempfile.gettempdir())
1418
PROCESS_TIMED_OUT = -9
1519

1620

0 commit comments

Comments
 (0)