Commit 35b37f7e authored by Wiktor Walentynowicz's avatar Wiktor Walentynowicz 🛋

Replace support for Python 3.6 from Python 2

parent fff4856f
......@@ -27,16 +27,18 @@ INCLUDE(${SWIG_USE_FILE})
include_directories(${Libmaca_SOURCE_DIR} "../libmaca")
link_directories(${Libmaca_BINARY_DIR})
find_package(PythonLibs 2)
find_package(PythonInterp)
# Python 2 support ended on 1st January 2020.
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