Skip to content

Commit 3ca4b59

Browse files
committed
ci fixes
1 parent a93b851 commit 3ca4b59

7 files changed

Lines changed: 27 additions & 41 deletions

File tree

cuda_bindings/pixi.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ setuptools = ">=80"
9595
setuptools-scm = ">=8"
9696
cython = ">=3.2,<3.3"
9797
pyclibrary = ">=0.1.7"
98-
cuda-pathfinder = ">=1.1,<2"
98+
cuda-pathfinder = { path = "../cuda_pathfinder" }
9999
cuda-cudart-static = "*"
100100
cuda-nvrtc-dev = "*"
101101
cuda-profiler-api = "*"
@@ -115,7 +115,7 @@ cuda-crt-dev_win-64 = "*"
115115

116116
[package.run-dependencies]
117117
python = "*"
118-
cuda-pathfinder = ">=1.1,<2"
118+
cuda-pathfinder = { path = "../cuda_pathfinder" }
119119
libnvjitlink = "*"
120120
cuda-nvrtc = "*"
121121
cuda-nvvm = "*"

cuda_bindings/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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
]
1011
build-backend = "setuptools.build_meta"
1112

cuda_bindings/setup.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,7 @@
2323
from setuptools.command.editable_wheel import _TopLevelFinder, editable_wheel
2424
from 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

cuda_core/build_hooks.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,6 @@
1616
from setuptools import Extension
1717
from 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-
3319
prepare_metadata_for_build_editable = _build_meta.prepare_metadata_for_build_editable
3420
prepare_metadata_for_build_wheel = _build_meta.prepare_metadata_for_build_wheel
3521
build_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")

cuda_core/pixi.lock

Lines changed: 18 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cuda_core/pixi.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ setuptools-scm = ">=8"
101101
cython = ">=3.2,<3.3"
102102
cuda-cudart-dev = "*"
103103
cuda-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" }

cuda_core/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
requires = [
77
"setuptools>=80",
88
"setuptools-scm[simple]>=8",
9-
"Cython>=3.2,<3.3"
9+
"Cython>=3.2,<3.3",
10+
"cuda-pathfinder"
1011
]
1112
build-backend = "build_hooks"
1213
backend-path = ["."]

0 commit comments

Comments
 (0)