File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ setuptools = ">=80"
9595setuptools-scm = " >=8"
9696cython = " >=3.2,<3.3"
9797pyclibrary = " >=0.1.7"
98- cuda-pathfinder = " >=1.1,<2 "
98+ cuda-pathfinder = { path = " ../cuda_pathfinder " }
9999cuda-cudart-static = " *"
100100cuda-nvrtc-dev = " *"
101101cuda-profiler-api = " *"
@@ -115,7 +115,7 @@ cuda-crt-dev_win-64 = "*"
115115
116116[package .run-dependencies ]
117117python = " *"
118- cuda-pathfinder = " >=1.1,<2 "
118+ cuda-pathfinder = { path = " ../cuda_pathfinder " }
119119libnvjitlink = " *"
120120cuda-nvrtc = " *"
121121cuda-nvvm = " *"
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ requires = [
66 " setuptools_scm[simple]>=8" ,
77 " cython>=3.2,<3.3" ,
88 " pyclibrary>=0.1.7" ,
9+ " cuda-pathfinder" ,
910]
1011build-backend = " setuptools.build_meta"
1112
Original file line number Diff line number Diff line change 2323from setuptools .command .editable_wheel import _TopLevelFinder , editable_wheel
2424from setuptools .extension import Extension
2525
26- # Note: cuda_bindings requires cuda.pathfinder to be installed to ensure consistent
27- # environment variable handling across all CUDA Python packages.
28- try :
29- from cuda .pathfinder ._utils .env_vars import get_cuda_home_or_path
30- except ImportError as e :
31- raise RuntimeError (
32- "cuda.pathfinder package is required to build cuda_bindings. "
33- "Please install it first: pip install cuda-pathfinder"
34- ) from e
26+ from cuda .pathfinder ._utils .env_vars import get_cuda_home_or_path
3527
3628# ----------------------------------------------------------------------
3729# Fetch configuration options
Original file line number Diff line number Diff line change 1616from setuptools import Extension
1717from setuptools import build_meta as _build_meta
1818
19- # Import centralized CUDA environment variable handling
20- # Note: This import may fail at build-dependency-resolution time if cuda-pathfinder
21- # is not yet installed, but it's guaranteed to be available when _get_cuda_path()
22- # is actually called (during wheel build time).
23- try :
24- from cuda .pathfinder ._utils .env_vars import get_cuda_home_or_path
25- except ImportError as e :
26- raise ImportError (
27- "Failed to import cuda.pathfinder. "
28- "Please ensure cuda-pathfinder is installed as a build dependency. "
29- "If building cuda-core, cuda-pathfinder should be automatically installed. "
30- "If this error persists, try: pip install cuda-pathfinder"
31- ) from e
32-
3319prepare_metadata_for_build_editable = _build_meta .prepare_metadata_for_build_editable
3420prepare_metadata_for_build_wheel = _build_meta .prepare_metadata_for_build_wheel
3521build_sdist = _build_meta .build_sdist
@@ -45,6 +31,8 @@ def _get_cuda_paths() -> list[str]:
4531 Supports multiple paths separated by os.pathsep (: on Unix, ; on Windows).
4632 Returns a list of paths for use in include_dirs and library_dirs.
4733 """
34+ from cuda .pathfinder ._utils .env_vars import get_cuda_home_or_path
35+
4836 CUDA_PATH = get_cuda_home_or_path ()
4937 if not CUDA_PATH :
5038 raise RuntimeError ("Environment variable CUDA_PATH or CUDA_HOME is not set" )
Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ setuptools-scm = ">=8"
101101cython = " >=3.2,<3.3"
102102cuda-cudart-dev = " *"
103103cuda-profiler-api = " *"
104+ cuda-pathfinder = { path = " ../cuda_pathfinder" }
104105# this doesn't work because Cython cannot find editable-installed build-time
105106# dependencies https://github.com/cython/cython/issues/7326
106107# cuda-bindings = { path = "../cuda_bindings" }
Original file line number Diff line number Diff line change 66requires = [
77 " setuptools>=80" ,
88 " setuptools-scm[simple]>=8" ,
9- " Cython>=3.2,<3.3"
9+ " Cython>=3.2,<3.3" ,
10+ " cuda-pathfinder"
1011]
1112build-backend = " build_hooks"
1213backend-path = [" ." ]
You can’t perform that action at this time.
0 commit comments