if(NOT mode)
  set(mode WARNING)
endif()
find_package(PythonModules 2.4 COMPONENTS yaml psutil bla QUIET)
if(NOT (PythonModules_yaml_FOUND AND PythonModules_psutil_FOUND))
  message(STATUS "** Required Python modules for testing not found:")
  message(STATUS "**")
  message(STATUS "**   PyYAML: ${PythonModules_yaml_FOUND}")
  message(STATUS "**   psutil: ${PythonModules_psutil_FOUND}")
  message(STATUS "**")
  message(STATUS "** Please make sure these modules are available in Python, for instance by")
  message(STATUS "** installing them using easy_install, pip, or your operating system's")
  message(STATUS "** package manager.")
  message(${mode} "Not all Python modules could be found (psutil, yaml), which need to be installed separately, to be used for the testing framework. Please consult the CMake log for more information.")
  set(MCRL2_PYTHON_TESTS FALSE)
else()
  set(MCRL2_PYTHON_TESTS TRUE)
endif()
