Commit 0e19a05
test: stub the CTK lookup in the build-dir capture helper
The two TestGeneratedSourceDirIsKeyed cases call the real
_build_cuda_core(), whose first statement resolves CUDA_PATH/CUDA_HOME
for the compiler's include dirs. The helper stubbed cythonize() but not
that lookup, so both tests failed on every (wheels) CI job -- those
install a prebuilt wheel and deliberately have no toolkit present:
RuntimeError: Environment variable CUDA_PATH or CUDA_HOME is not set
Nothing in these tests needs a real toolkit. cythonize() is replaced so
no C++ is generated or compiled, the path is only string-joined into
include_dirs and never dereferenced, and the CUDA major comes from the
CUDA_CORE_BUILD_MAJOR env var the helper already sets, which
_determine_cuda_major_version() returns from before reading cuda.h.
Stub _get_cuda_path rather than dropping the call: it must stay first so
the cuda.pathfinder import repairs PEP 517 namespace shadowing before
cuda.bindings is imported, which
test_cuda_path_is_resolved_before_importing_bindings pins. That test is
also the precedent here -- it calls _build_cuda_core() and stubs the same
function, which is why it has been green in the wheels jobs all along.
Verified by reproducing the wheels condition with CUDA_PATH and CUDA_HOME
unset: 2 failed before, 23 passed after, and 23 passed with them set.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 98a662e commit 0e19a05
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
229 | 232 | | |
230 | 233 | | |
231 | 234 | | |
| |||
0 commit comments