Skip to content
Snippets Groups Projects
Unverified Commit cfce3f5e authored by Brent Huisman's avatar Brent Huisman Committed by GitHub
Browse files

Fix CMake to use correct PYTHON_EXECUTABLE (#1290)

Fix CMAKE to use PYTHON_EXECUTABLE that corresponds to the version of Python used to build the python module.
parent 6ebfb3db
No related branches found
No related tags found
No related merge requests found
......@@ -59,15 +59,6 @@ option(ARB_WITH_NEUROML "build NeuroML support library" OFF)
option(ARB_WITH_PYTHON "enable Python front end" OFF)
if (ARB_WITH_PYTHON)
# Find path in which to install the Python module.
find_package(PythonInterp REQUIRED)
# Ask the above found Python where it keeps its system (platform) packages.
execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "import sysconfig; print(sysconfig.get_path('platlib'))" OUTPUT_VARIABLE ARB_PYTHON_LIB_PATH_DEFAULT OUTPUT_STRIP_TRAILING_WHITESPACE)
# Default to installing in that path
set(ARB_PYTHON_LIB_PATH ${ARB_PYTHON_LIB_PATH_DEFAULT} CACHE PATH "path for installing Python module for Arbor.")
endif()
#----------------------------------------------------------
# Global CMake configuration
#----------------------------------------------------------
......
......@@ -75,4 +75,9 @@ file(COPY "${PROJECT_SOURCE_DIR}/VERSION" DESTINATION "${python_mod_path}")
# Set the installation path
# Ask Python where it keeps its system (platform) packages.
execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "import sysconfig; print(sysconfig.get_path('platlib'))" OUTPUT_VARIABLE ARB_PYTHON_LIB_PATH_DEFAULT OUTPUT_STRIP_TRAILING_WHITESPACE)
# Default to installing in that path, override with user specified ARB_PYTHON_LIB_PATH
set(ARB_PYTHON_LIB_PATH ${ARB_PYTHON_LIB_PATH_DEFAULT} CACHE PATH "path for installing Python module for Arbor.")
install(DIRECTORY ${python_mod_path} DESTINATION ${ARB_PYTHON_LIB_PATH})
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