Commit ea7a08eb authored by Wiktor Walentynowicz's avatar Wiktor Walentynowicz 🛋

Change depracated Python 2 to Python 3.6

parent b7d6332f
......@@ -27,15 +27,17 @@ link_directories(${Libwccl_BINARY_DIR})
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
find_package(PythonLibs 2)
find_package(PythonInterp)
# Python 2 is deprecated.
find_package(PythonLibs 3.6)
find_package(PythonInterp 3.6)
# idea taken from pyplot build system
execute_process(
COMMAND
${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='${CMAKE_INSTALL_EXEC_PREFIX}')"
OUTPUT_VARIABLE PYTHON_INSTDIR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
#execute_process(
# COMMAND
# ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='${CMAKE_INSTALL_EXEC_PREFIX}')"
# OUTPUT_VARIABLE PYTHON_INSTDIR
# OUTPUT_STRIP_TRAILING_WHITESPACE
#)
set(PYTHON_INSTDIR "lib/python3.6/dist-packages")
message(STATUS "INFO: " "python lib: ${PYTHON_INSTDIR}" )
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
......
Markdown is supported
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