Skip to content

Commit 7ff2130

Browse files
committed
swig CHANGE always find python interpreter first
Because then searching for python libraries tries to find the same version. This fixes problems on some ancient distributions where the installed python libraries are actually not known to the CMake module.
1 parent f729c24 commit 7ff2130

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

swig/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,21 @@ if(GEN_PYTHON_BINDINGS AND SWIG_FOUND)
2626
unset(PYTHON_INCLUDE_DIR CACHE)
2727
unset(PYTHON_LIBRARY_DEBUG CACHE)
2828
if(${GEN_PYTHON_VERSION} STREQUAL "2")
29-
find_package(PythonLibs 2 REQUIRED)
3029
find_package(PythonInterp 2 REQUIRED)
30+
find_package(PythonLibs 2 REQUIRED)
3131
if(NOT PYTHONLIBS_FOUND)
3232
message(WARNING "Did not found Python version 2.x")
33-
message(STATUS "Sysrepo supports Python 2.x and Python 3.x")
33+
message(STATUS "Libyang supports Python 2.x and Python 3.x")
3434
endif()
3535
elseif(${GEN_PYTHON_VERSION} STREQUAL "3")
36-
find_package(PythonLibs 3 REQUIRED)
3736
find_package(PythonInterp 3 REQUIRED)
37+
find_package(PythonLibs 3 REQUIRED)
3838
if(NOT PYTHONLIBS_FOUND)
3939
message(WARNING "Did not found Python version 3.x")
40-
message(STATUS "Sysrepo supports Python 2.x and Python 3.x")
40+
message(STATUS "Libyang supports Python 2.x and Python 3.x")
4141
endif()
4242
else()
43-
message(WARNING "Sysrepo supports Python 2.x and Python 3.x")
43+
message(WARNING "Libyang supports Python 2.x and Python 3.x")
4444
endif()
4545
endif()
4646

0 commit comments

Comments
 (0)