diff --git a/cmake/PythonInstallSetup.cmake b/cmake/PythonInstallSetup.cmake index e6b1c8577eff3be971239ca6b13a748f9b85fde0..65ae09ee576a908e6557acc294fe5c7ba286c046 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 4e0a2146a77dbb36cb00e3c5df745b871f73449c..ae92f3440215072cfecdea8a81e72f7cc55f4ada 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: