Skip to content

Commit

Permalink
Improve error message when CMake is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
johningve committed Dec 10, 2024
1 parent 4236a49 commit 4e1e1e4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,15 @@ def run_process(args, **kwargs):
raise type(ex)("Process failed: '{}'.".format(" ".join(args))) from ex

try:
run_process(("cmake", "--version"))
run_process(("cake", "--version"))
except Exception as ex:
raise RuntimeError(_make_message_box("!! CMake not found !!")) from ex
raise RuntimeError(
_make_message_box(
"!! CMake not found !!",
"Ensure PIP is updated to the latest version to handle build dependencies automatically,",
"or install CMake and Ninja manually.",
)
) from ex
with tempfile.TemporaryDirectory(prefix="zivid-python-build-") as temp_dir:
with (Path(temp_dir) / "lib.cpp").open("w") as lib_cpp:
# MSVC does not report itself as C++17, on Windoes we have to rely on the CMAKE_CXX_STANDARD test below
Expand Down

0 comments on commit 4e1e1e4

Please sign in to comment.