Commit d1d38e09 authored by Antoine Regimbeau's avatar Antoine Regimbeau

RM: continue cleaning of python 2

parent 78ba686a
......@@ -26,7 +26,7 @@
# This does not force the developer to install python to be able to build OTB.
# The tests will simply not be run if python is unavailable.
find_package(PythonInterp)
find_package(PythonInterp 3 REQUIRED)
# The maximum number of headers in a test. This helps limit memory issues,
# and the cppcheck tests. However, if this is not unity, there is a slight
......@@ -67,7 +67,7 @@ macro( otb_module_headertest _name )
if( NOT ${_name}_THIRD_PARTY
AND EXISTS ${${_name}_SOURCE_DIR}/include
AND PYTHON_EXECUTABLE
AND NOT (PYTHON_VERSION_STRING VERSION_LESS 2.6)
AND NOT (PYTHON_VERSION_STRING VERSION_LESS 3.0)
AND NOT (${_name} STREQUAL OTBTestKernel)
AND NOT (CMAKE_GENERATOR MATCHES "^Visual Studio 10.*"))
......
......@@ -62,9 +62,9 @@ foreach(cmd
endforeach()
# We need to set PYTHONPATH for the script otbGenerateWrappersRstDoc.py, depending on how the Python3 module was built
if (OTB_WRAP_PYTHON3)
set(PYTHONPATH_COOKBOOK "${CMAKE_BINARY_DIR}/lib/otb/python3")
elseif (OTB_WRAP_PYTHON)
if (OTB_WRAP_PYTHON)
set(PYTHONPATH_COOKBOOK "${CMAKE_BINARY_DIR}/lib/otb/python")
else()
# Cookbook only supports Python3
# But OTB_WRAP_PYTHON can wrap both python2 and python3
if (${PYTHONLIBS_VERSION_STRING} STRGREATER "3.0.0")
......
......@@ -343,7 +343,6 @@ find_path(OTB_DATA_ROOT README-OTB-Data
# SWIG Wrapping
option(OTB_WRAP_PYTHON "Enable python wrappers for OTB applications (requires SWIG)" ON)
option(OTB_WRAP_PYTHON3 "Enable python 3 wrappers for OTB applications (requires SWIG)" OFF)
option(OTB_WRAP_JAVA "Enable java wrappers for OTB applications (requires SWIG)" OFF)
configure_file(${CMAKE_SOURCE_DIR}/CMake/CTestCustom.cmake.in
......
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