def METHOD_NAME(self):
    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)
        )
    if platform.system() == "Windows":
        cmake_version = LooseVersion(
            re.search(r"version\s*([\d.]+)", out.decode()).group(1)
        )
        if cmake_version < "3.1.0":
            raise RuntimeError("CMake >= 3.1.0 is required on Windows")
    for ext in self.extensions:
        self.build_extension(ext)