Commit 4da1fa6
Refactor cuda-bindings setup.py to defer CUDA_HOME check to build time (#1652)
* Refactor cuda-bindings setup.py to defer CUDA_HOME check to build time
Move all CUDA-dependent logic (header parsing, code generation,
cythonization) from setup.py into a custom PEP 517 build backend
(build_hooks.py). Metadata queries (uv lock, uv sync, pip install
--dry-run) no longer require CUDA_HOME or CUDA_PATH to be set.
This follows the same pattern already used by cuda_core/build_hooks.py:
- Metadata hooks delegate directly to setuptools
- build_wheel/build_editable defer to _build_cuda_bindings()
- setup.py becomes a thin shim for ext_modules + parallel build_ext
Closes #1635
Co-authored-by: Cursor <cursoragent@cursor.com>
* Address review feedback and restore PARALLEL_LEVEL compat
- Move extra_link_args (strip) handling alongside extra_compile_args
in the non-debug build path instead of a separate post-loop
- Rename compiler_directives to cython_directives for clarity
- Restore deprecated PARALLEL_LEVEL env var support in setup.py
for build_ext parallelism parity with the old code
Co-authored-by: Cursor <cursoragent@cursor.com>
* Move clang detection to build_extensions for single check
Check the compiler once in build_extensions (plural) and fix up all
extensions in one pass, instead of checking per-extension in
build_extension (singular).
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 28c02ae commit 4da1fa6
3 files changed
+469
-370
lines changed
0 commit comments