From 7ecbba7ec25948b2cf8a7e2cdfac37c2b18a1bd5 Mon Sep 17 00:00:00 2001 From: Ugo Finnendahl Date: Tue, 1 Jun 2021 17:46:24 +0200 Subject: [PATCH] bug: run cmake again after failed attempt --- pybindmagic/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pybindmagic/__init__.py b/pybindmagic/__init__.py index 13579b0..e66c3da 100644 --- a/pybindmagic/__init__.py +++ b/pybindmagic/__init__.py @@ -99,8 +99,9 @@ def cpp(line, cell, *what): if cmake_path is None: ensure_tmp_folder() else: - run_cmake = not ensure_build_dir(cmake_path, clear=rebuild) + ensure_build_dir(cmake_path, clear=rebuild) p = os.path.abspath(os.path.join(cmake_path,"build")) + run_cmake = not os.path.exists(os.path.join(p, "Makefile")) if p not in sys.path: sys.path.append(p) ensure_pybind(cmake_path)