Commit 97484e19 authored by Antoine Regimbeau's avatar Antoine Regimbeau

Remove numpy from python macro

parent b69514fe
......@@ -379,9 +379,11 @@ endmacro()
macro(find_python CRITICITY)
set( otb_python_major_version 3 )
find_package( PythonInterp ${otb_python_major_version} QUIET )
if( NOT PythonInterp_FOUND)
message (WARNING "Python3 not found. There is no longer support of python2 \
in OTB, but it can still be used.")
if( NOT PythonInterp_FOUND )
if ( NOT ${CRITICITY} STREQUAL "QUIET" )
message (WARNING "Python3 not found. There is no longer support of \
wrapping in python2 in OTB, but it can still be used.")
endif()
set (otb_python_major_version 2)
if ( ${CRITICITY} STREQUAL "QUIET")
find_package ( PythonInterp ${otb_python_major_version} QUIET )
......@@ -389,10 +391,9 @@ macro(find_python CRITICITY)
find_package ( PythonInterp ${otb_python_major_version} REQUIRED )
endif()
endif()
if ( ${CRITICITY} STREQUAL "QUIET")
find_package ( PythonLibs ${otb_python_major_version} QUIET )
else()
find_package ( PythonLibs ${otb_python_major_version} REQUIRED )
endif()
find_package ( Numpy )
if ( ${CRITICITY} STREQUAL "QUIET")
find_package ( PythonLibs ${otb_python_major_version} QUIET )
else()
find_package ( PythonLibs ${otb_python_major_version} REQUIRED )
endif()
endmacro()
......@@ -102,6 +102,9 @@ repository_status(${PROJECT_SOURCE_DIR} OTB_GIT_STATUS_MESSAGE)
if ( OTB_WRAP_PYTHON )
find_python( "REQUIERED" )
if ( NOT NUMPY_FOUND )
message( WARNING "OTB wrapper will be done without support for numpy")
endif()
else()
find_python( "QUIET" )
endif()
......
......@@ -43,6 +43,7 @@ endmacro()
# thi macro should be removed
if ( OTB_WRAP_PYTHON )
check_PIC_flag ( Python )
find_package(Numpy)
endif()
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment