From 4e1e1e40d91e1ea254d56d7fa68ad0e3366d6400 Mon Sep 17 00:00:00 2001 From: John Ingve Olsen Date: Tue, 10 Dec 2024 11:22:37 +0100 Subject: [PATCH] Improve error message when CMake is not found --- setup.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 0c2e6a9c..fe4c208d 100644 --- a/setup.py +++ b/setup.py @@ -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