BASIS  r3148
FindPythonModules.cmake File Reference

Find Python modules. More...

#include "CMakeParseArguments.cmake"
+ Include dependency graph for FindPythonModules.cmake:

Go to the source code of this file.

Functions

function basis_find_python_module (in CACHEVAR, in ARGN)
 Find Python module.

Variables

cmake _PythonModules_HINT

Detailed Description

Find Python modules.

Input/Output variables:
PythonModules_DIR List of directories where Python modules are installed.

Definition in file FindPythonModules.cmake.


Function Documentation

function basis_find_python_module ( in  CACHEVAR,
in  ARGN 
)

Find Python module.

If the PYTHON_EXECUTABLE variable is set, this function at first tries to launch the Python interpreter, import the named Python module, and then determines the search path for the Python module from the __file__ attribute of the loaded module. Otherwise, or if this fails, it looks for the Python module in the directories listed in the PYTHONPATH variable if defined. If this variable is not defined, the PYTHONPATH environment variable is used instead.

Parameters:
[in]CACHEVARName of CMake cache variable which stores path of directory of the Python module. If not set or if the cache entry contains space characters only or ends in the string NOTFOUND, this function looks for the specified Python module. Otherwise, it does nothing and leaves the cache entry unmodified.
[in]ARGNThe remaining arguments are parsed and the following options extract:
NAME module Name of the Python module.
PYTHON_EXECUTABLE python Full path of the Python interpreter executable. If not specified the global PYTHON_EXECUTABLE CMake variable/cache entry is used.
PATH dir1 [dir2...] Directories where to look for Python module.
NO_PYTHONPATH Do not consider the PYTHONPATH environment variable.
NO_DEFAULT_PATH Do not look in any default path such as the directories listed by the PYTHONPATH environment variable.
Returns:
Sets the named cache variable of type PATH to the absolute path of the directory containing the specified Python MODULE if found, or the string "<MODULE%gt;-NOTFOUND" otherwise.

Variable Documentation

Definition at line 315 of file FindPythonModules.cmake.