From f2cb001c8616590bf0de4af93ed088472b3ce40e Mon Sep 17 00:00:00 2001 From: Davis King Date: Wed, 23 May 2018 13:00:27 -0400 Subject: [PATCH] Improved error messages. --- setup.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index e4a915635..0c8d8f16e 100644 --- a/setup.py +++ b/setup.py @@ -117,13 +117,16 @@ class CMakeBuild(build_ext): try: out = subprocess.check_output(['cmake', '--version']) except OSError: - raise RuntimeError("CMake must be installed to build the following extensions: " + - ", ".join(e.name for e in self.extensions)) + raise RuntimeError("\n*******************************************************************\n" + + " CMake must be installed to build the following extensions: " + + ", ".join(e.name for e in self.extensions) + + "\n*******************************************************************\n") return re.search(r'version\s*([\d.]+)', out.decode()).group(1) def run(self): + cmake_version = self.get_cmake_version() if platform.system() == "Windows": - if LooseVersion(self.get_cmake_version()) < '3.1.0': + if LooseVersion(cmake_version) < '3.1.0': raise RuntimeError("CMake >= 3.1.0 is required on Windows") for ext in self.extensions: