#
if (NOT EVENT__DISABLE_REGRESS)
- # (We require python to generate the regress tests)
- find_program(FIND_PYTHON2 python2)
- if (FIND_PYTHON2)
- set(PYTHON_EXECUTABLE "python2")
- endif()
+ # (We require python2 to generate the regress tests)
+ foreach (PY python2.6 python2.7 python2)
+ unset(FIND_PYTHON2 CACHE)
+ find_program(FIND_PYTHON2 ${PY})
+ if (FIND_PYTHON2)
+ set(PYTHON_EXECUTABLE "${PY}")
+ break()
+ endif()
+ endforeach()
find_package(PythonInterp)
- if (PYTHONINTERP_FOUND)
+ if (PYTHONINTERP_FOUND AND PYTHON_VERSION_STRING VERSION_LESS "3.0.0")
set(__FOUND_USABLE_PYTHON 1)
endif()