From 3ad3b690ef53e9e131e79d5fb5a379fc524ab54b Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Keck <Jean-Baptiste.Keck@imag.fr>
Date: Mon, 9 Nov 2020 14:11:53 +0100
Subject: [PATCH] fix cmake standard install

---
 CMakeLists.txt                                              | 2 +-
 cmake/PythonInstallSetup.cmake                              | 2 +-
 cmake/{find_python_install.py => find_python_install.py.in} | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
 rename cmake/{find_python_install.py => find_python_install.py.in} (87%)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 745212b78..574912607 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -153,7 +153,7 @@ find_python_module(hptt OPTIONAL)       # high performance cpu tensor transpose
 find_python_module(flint OPTIONAL)      # high performance linear system solver (fallback to sympy)
 find_python_module(tbb OPTIONAL)        # additional numba threading backend (fallback to pthreads)
 find_python_module(mkl_fft OPTIONAL)    # additional fft backend, faster then FFTW, faster then clFFT on CPU OpenCL platforms.
-find_python_module(pycairo OPTIONAL)    # additional plotting backend
+find_python_module(cairo OPTIONAL)      # additional plotting backend
 find_python_module(matplotlib OPTIONAL) # required for general plots
 find_python_module(pyvis OPTIONAL)      # required for graph plots
 find_python_module(memory_tempfile OPTIONAL) # enable in memory HDF5 I/O to call paraview during simulation
diff --git a/cmake/PythonInstallSetup.cmake b/cmake/PythonInstallSetup.cmake
index e6b1c8577..65ae09ee5 100755
--- a/cmake/PythonInstallSetup.cmake
+++ b/cmake/PythonInstallSetup.cmake
@@ -80,7 +80,7 @@ function(set_python_install_path)
     # list depends on the OS, the python version ...
     configure_file(cmake/fake/setup.py tmp/setup.py)
     configure_file(cmake/fake/__init__.py tmp/fake/__init__.py)
-    configure_file(cmake/find_python_install.py tmp/find_python_install.py)
+    configure_file(cmake/find_python_install.py.in tmp/find_python_install.py)
     execute_process(
       COMMAND ${PYTHON_EXECUTABLE} find_python_install.py
       WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tmp/
diff --git a/cmake/find_python_install.py b/cmake/find_python_install.py.in
similarity index 87%
rename from cmake/find_python_install.py
rename to cmake/find_python_install.py.in
index 4e0a2146a..ae92f3440 100644
--- a/cmake/find_python_install.py
+++ b/cmake/find_python_install.py.in
@@ -5,7 +5,7 @@ import locale
 
 encoding = locale.getdefaultlocale()[1]
 
-output = subprocess.Popen(["python", "setup.py", "--dry-run", "install"],
+output = subprocess.Popen(["@PYTHON_EXECUTABLE@", "setup.py", "--dry-run", "install"],
                           stdout=subprocess.PIPE).communicate()[0]
 
 if encoding:
-- 
GitLab