Skip to content

Commit 6d23b00

Browse files
authored
fix: more readable error on missing ccmake (#667)
* fix: more readable error on missing `ccmake` * Make check cross-platform
1 parent 65e300c commit 6d23b00

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/cmake/__init__.py

Lines changed: 6 additions & 0 deletions
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,6 +51,11 @@ def _program_exit(name: str, *args: str) -> NoReturn:
5051

5152

5253
def ccmake() -> NoReturn:
54+
if shutil.which("ccmake", path=CMAKE_BIN_DIR) is None:
55+
raise FileNotFoundError(
56+
f"'ccmake' is not available in cmake installation at '{CMAKE_BIN_DIR}'. "
57+
"Perhaps 'ccmake' is not yet inclucded to the package for this platform."
58+
)
5359
_program_exit('ccmake', *sys.argv[1:])
5460

5561

0 commit comments

Comments
 (0)