@ -54,24 +54,24 @@ if(PYTHONINTERP_FOUND)
endif ( )
SET ( PYTHON_PACKAGES_PATH "${_PYTHON_PACKAGES_PATH}" CACHE PATH "Where to install the python packages." )
if ( NOT PYTHON_NUMPY_INCLUDE_DIR )
if ( NOT PYTHON_NUMPY_INCLUDE_DIRS )
# A t t e m p t t o d i s c o v e r t h e N u m P y i n c l u d e d i r e c t o r y . I f t h i s s u c c e e d s , t h e n b u i l d p y t h o n A P I w i t h N u m P y
execute_process ( COMMAND ${ PYTHON_EXECUTABLE } -c "import os; os.environ['DISTUTILS_USE_SDK']='1'; import numpy.distutils; print(numpy.distutils.misc_util.get_numpy_include_dirs()[0])"
execute_process ( COMMAND "${PYTHON_EXECUTABLE}" -c
" i m p o r t o s ; o s . e n v i r o n [ ' D I S T U T I L S _ U S E _ S D K ' ] = ' 1 ' ; i m p o r t n u m p y . d i s t u t i l s ; print ( os.pathsep.join(numpy.distutils.misc_util.get_numpy_include_dirs( ) ) ) "
R E S U L T _ V A R I A B L E P Y T H O N _ N U M P Y _ P R O C E S S
O U T P U T _ V A R I A B L E P Y T H O N _ N U M P Y _ I N C L U D E _ D I R
O U T P U T _ V A R I A B L E P Y T H O N _ N U M P Y _ I N C L U D E _ D I R S
O U T P U T _ S T R I P _ T R A I L I N G _ W H I T E S P A C E )
if ( PYTHON_NUMPY_PROCESS EQUAL 0 )
file ( TO_CMAKE_PATH "${PYTHON_NUMPY_INCLUDE_DIR}" _PYTHON_NUMPY_INCLUDE_DIR )
set ( PYTHON_NUMPY_INCLUDE_DIR ${ _PYTHON_NUMPY_INCLUDE_DIR } CACHE PATH "Path to numpy headers" )
file ( TO_CMAKE_PATH "${PYTHON_NUMPY_INCLUDE_DIRS }" _PYTHON_NUMPY_INCLUDE_DIRS )
set ( PYTHON_NUMPY_INCLUDE_DIRS "${_PYTHON_NUMPY_INCLUDE_DIRS}" CACHE PATH "Path to numpy headers" )
endif ( )
endif ( )
if ( PYTHON_NUMPY_INCLUDE_DIR )
execute_process ( COMMAND ${ PYTHON_EXECUTABLE } -c "import numpy; print(numpy.version.version)"
R E S U L T _ V A R I A B L E P Y T H O N _ N U M P Y _ P R O C E S S
O U T P U T _ V A R I A B L E P Y T H O N _ N U M P Y _ V E R S I O N
O U T P U T _ S T R I P _ T R A I L I N G _ W H I T E S P A C E )
if ( PYTHON_NUMPY_INCLUDE_DIRS )
execute_process ( COMMAND "${PYTHON_EXECUTABLE}" -c "import numpy; print(numpy.version.version)"
O U T P U T _ V A R I A B L E P Y T H O N _ N U M P Y _ V E R S I O N
O U T P U T _ S T R I P _ T R A I L I N G _ W H I T E S P A C E )
endif ( )
endif ( NOT ANDROID AND NOT IOS )