and make sure the version matches exactly the requested one
in future, we should use FindPython.cmake
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit
7b15b682b1201929e0ba9efc332ebb8652be40a8)
Conflicts:
src/CMakeLists.txt: trivial resolution
# Python stuff
find_package(PythonInterp 2 REQUIRED)
-find_package(PythonLibs 2 REQUIRED)
+find_package(PythonLibs ${PYTHON_VERSION_STRING} EXACT REQUIRED)
option(WITH_PYTHON3 "build python3 bindings" ON)
if(WITH_PYTHON3)
set(WITH_PYTHON3 "3")
endif()
find_package(Python3Interp ${WITH_PYTHON3} REQUIRED)
- find_package(Python3Libs ${PYTHON_VERSION_STRING} REQUIRED)
+ find_package(Python3Libs ${PYTHON3_VERSION_STRING} EXACT REQUIRED)
endif()
if(HAVE_XIO)