Skip to content

Commit 65ffb08

Browse files
committed
Make check cross-platform
1 parent e280a1f commit 65ffb08

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cmake/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import os
4+
import shutil
45
import subprocess
56
import sys
67
from importlib.metadata import distribution
@@ -50,7 +51,7 @@ def _program_exit(name: str, *args: str) -> NoReturn:
5051

5152

5253
def ccmake() -> NoReturn:
53-
if not (Path(CMAKE_BIN_DIR) / "ccmake").exists():
54+
if shutil.which("ccmake", path=CMAKE_BIN_DIR) is None:
5455
raise FileNotFoundError(
5556
f"'ccmake' is not available in cmake installation at '{CMAKE_BIN_DIR}'. "
5657
"Perhaps 'ccmake' is not yet inclucded to the package for this platform."

0 commit comments

Comments
 (0)