Commit f2cb001c authored by Davis King's avatar Davis King

Improved error messages.

parent 39a13298
...@@ -117,13 +117,16 @@ class CMakeBuild(build_ext): ...@@ -117,13 +117,16 @@ class CMakeBuild(build_ext):
try: try:
out = subprocess.check_output(['cmake', '--version']) out = subprocess.check_output(['cmake', '--version'])
except OSError: except OSError:
raise RuntimeError("CMake must be installed to build the following extensions: " + raise RuntimeError("\n*******************************************************************\n" +
", ".join(e.name for e in self.extensions)) " 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) return re.search(r'version\s*([\d.]+)', out.decode()).group(1)
def run(self): def run(self):
cmake_version = self.get_cmake_version()
if platform.system() == "Windows": 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") raise RuntimeError("CMake >= 3.1.0 is required on Windows")
for ext in self.extensions: for ext in self.extensions:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment