Skip to content

Commit 9671b24

Browse files
committed
Systematically add _abs_norm() in find_nvidia_header_directory()
1 parent 90ed27a commit 9671b24

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cuda_pathfinder/cuda/pathfinder/_headers/find_nvidia_headers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,15 @@ def find_nvidia_header_directory(libname: str) -> Optional[str]:
147147
hdr_dir: Optional[str] # help mypy
148148
for cdir in candidate_dirs:
149149
if hdr_dir := _find_under_site_packages(cdir, h_basename):
150-
return hdr_dir
150+
return _abs_norm(hdr_dir)
151151

152152
if hdr_dir := _find_based_on_conda_layout(libname, h_basename, False):
153-
return hdr_dir
153+
return _abs_norm(hdr_dir)
154154

155155
candidate_dirs = supported_nvidia_headers.SUPPORTED_INSTALL_DIRS_NON_CTK.get(libname, [])
156156
for cdir in candidate_dirs:
157157
for hdr_dir in sorted(glob.glob(cdir), reverse=True):
158158
if _joined_isfile(hdr_dir, h_basename):
159-
return hdr_dir
159+
return _abs_norm(hdr_dir)
160160

161161
return None

0 commit comments

Comments
 (0)