Find Python modules. More...
#include "CMakeParseArguments.cmake"
Go to the source code of this file.
Functions | |
function | basis_find_python_module (in CACHEVAR, in ARGN) |
Find Python module. More... | |
Variables | |
cmake | _PythonModules_HINT |
Find Python modules.
PythonModules_DIR | List of directories where Python modules are installed. |
Definition in file FindPythonModules.cmake.
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.
[in] | CACHEVAR | Name 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] | ARGN | The 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. |
PATH
to the absolute path of the directory containing the specified Python MODULE
if found, or the string "<MODULE%gt;-NOTFOUND" otherwise. cmake _PythonModules_HINT |
Definition at line 329 of file FindPythonModules.cmake.