Commit 83206482 authored by Antoine Regimbeau's avatar Antoine Regimbeau

Merge branch 'develop' into 1506-refactor-MapProjectionAdapter

parents d7087ef3 0f372bfe
Pipeline #366 failed with stage
in 27 minutes and 23 seconds
variables:
DOCKER_DRIVER: overlay2
GIT_DEPTH: "3"
stages:
- build
......@@ -17,13 +18,13 @@ stages:
native-build:
extends: .general
stage: build
image: registry.orfeo-toolbox.org/orfeotoolbox/otb:ubuntu-18.04-gcc
image: registry.orfeo-toolbox.org/gbonnefille/otb-build-env/otb-ubuntu-native:18.04
script:
- ctest -VV -S CI/main_ci.cmake -DIMAGE_NAME:string=ubuntu-18.04-gcc
shark-build:
extends: .general
stage: build
image: registry.orfeo-toolbox.org/orfeotoolbox/otb:ubuntu-18.04-gcc-shark-3.1.4
image: registry.orfeo-toolbox.org/gbonnefille/otb-build-env/otb-ubuntu-shark:18.04
script:
- ctest -VV -S CI/main_ci.cmake -DIMAGE_NAME:string=ubuntu-18.04-gcc-shark-3.1.4
\ No newline at end of file
- ctest -VV -S CI/main_ci.cmake -DIMAGE_NAME:string=ubuntu-18.04-llvm-shark
......@@ -48,7 +48,7 @@ OTB_USE_OPENGL:BOOL=ON
OTB_USE_OPENMP:BOOL=ON
OTB_USE_QT:BOOL=ON
OTB_USE_QWT:BOOL=ON
OTB_USE_SHARK:BOOL=$ENV{OTB_USESHARK}
OTB_USE_SHARK:BOOL=ON
OTB_USE_SIFTFAST:BOOL=ON
OTB_USE_SPTW:BOOL=ON
OTB_USE_SSE_FLAGS:BOOL=ON")
......
......@@ -21,4 +21,5 @@
# Configuration options for ubuntu-18.04-gcc
set(site_option
"opencv_INCLUDE_DIR:PATH=/usr/include")
"opencv_INCLUDE_DIR:PATH=/usr/include
OTB_USE_SHARK:BOOL=OFF")
#
# Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Configuration options for ubuntu-18.04-llvm-shark-3.1.4
set(site_option
"opencv_INCLUDE_DIR:PATH=/usr/include
CMAKE_C_COMPILER:STRING=clang
CMAKE_CXX_COMPILER:STRING=clang++
CMAKE_EXE_LINKER_FLAGS:STRING=-fuse-ld=lld
CMAKE_MODULE_LINKER_FLAGS:STRING=-fuse-ld=lld
CMAKE_SHARED_LINKER_FLAGS:STRING=-fuse-ld=lld")
#
# Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Configuration options for ubuntu-18.04-llvm
set(site_option
"opencv_INCLUDE_DIR:PATH=/usr/include
OTB_USE_SHARK:BOOL=OFF
CMAKE_C_COMPILER:STRING=clang
CMAKE_CXX_COMPILER:STRING=clang++
CMAKE_EXE_LINKER_FLAGS:STRING=-fuse-ld=lld
CMAKE_MODULE_LINKER_FLAGS:STRING=-fuse-ld=lld
CMAKE_SHARED_LINKER_FLAGS:STRING=-fuse-ld=lld")
......@@ -63,7 +63,6 @@ set(CTEST_CUSTOM_COVERAGE_EXCLUDE
# Exclude SWIG wrappers files
".*/Modules/Wrappers/SWIG/src/python/otbApplicationPYTHON_wrap.*"
".*/Modules/Wrappers/SWIG/src/python3/otbApplicationPYTHON_wrap.*"
".*/Modules/Wrappers/SWIG/src/java/otbApplicationJAVA_wrap.*"
# Exclude Qt moc file
......
......@@ -26,7 +26,6 @@
# python is needed to verify the presence of the module name in the doxygen header
# Don't require it to not force the developers to install python to be able to build
# OTB. The tests will simply not be run if python is not available.
find_package(PythonInterp)
macro( otb_module_doxygen _name )
......
......@@ -26,7 +26,6 @@
# 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)
# 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
......
......@@ -100,6 +100,19 @@ reset_qt_i18n_sources()
repository_status(${PROJECT_SOURCE_DIR} OTB_GIT_STATUS_MESSAGE)
# Find python stuff
# Version 3 is prefered before 2
set ( Python_ADDITIONAL_VERSIONS "3;2" )
set ( PythonInterp_FIND_REQUIRED ${OTB_WRAP_PYTHON} )
set ( PythonLibs_FIND_REQUIRED ${OTB_WRAP_PYTHON} )
find_package( PythonInterp )
if ( OTB_WRAP_PYTHON AND ( ${PYTHON_VERSION_MAJOR} EQUAL 2 ) )
message (WARNING "Python3 not found. There is no longer support of \
wrapping in python2 in OTB, but it can still be used.")
endif()
set (Python_ADDITIONAL_VERSIONS "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
find_package ( PythonLibs )
#-----------------------------------------------------------------------------
# Configure the default OTB_DATA_ROOT for the location of OTB Data.
find_path(OTB_DATA_ROOT
......@@ -152,9 +165,6 @@ endif()
if(NOT OTB_INSTALL_PYTHON_DIR)
set(OTB_INSTALL_PYTHON_DIR "${OTB_INSTALL_LIBRARY_DIR}/otb/python")
endif()
if(NOT OTB_INSTALL_PYTHON3_DIR)
set(OTB_INSTALL_PYTHON3_DIR "${OTB_INSTALL_LIBRARY_DIR}/otb/python3")
endif()
if(NOT OTB_INSTALL_JAVA_DIR)
set(OTB_INSTALL_JAVA_DIR "${OTB_INSTALL_LIBRARY_DIR}/otb/java")
endif()
......@@ -339,6 +349,7 @@ set(OTB_CONFIG_CODE "
set(OTB_MODULES_DIR \"${OTB_MODULES_DIR}\")")
set(OTB_CONFIG_CMAKE_DIR "${OTB_SOURCE_DIR}/CMake")
set(OTB_USE_FILE "${OTB_CONFIG_CMAKE_DIR}/UseOTB.cmake")
if(OTB_WRAP_PYTHON)
set(OTB_CONFIG_CODE "${OTB_CONFIG_CODE}
set(OTB_PYTHONPATH \"${OTB_BINARY_DIR}/${OTB_INSTALL_PYTHON_DIR}\")")
......@@ -366,10 +377,12 @@ set(OTB_CONFIG_CODE "${OTB_CONFIG_CODE}
set(OTB_MODULES_DIR \"\${OTB_INSTALL_PREFIX}/${OTB_INSTALL_PACKAGE_DIR}/Modules\")")
set(OTB_USE_FILE "\${OTB_INSTALL_PREFIX}/${OTB_INSTALL_PACKAGE_DIR}/UseOTB.cmake")
set(OTB_CONFIG_CMAKE_DIR "\${OTB_INSTALL_PREFIX}/${OTB_INSTALL_PACKAGE_DIR}")
if(OTB_WRAP_PYTHON)
set(OTB_CONFIG_CODE "${OTB_CONFIG_CODE}
set(OTB_PYTHONPATH \"\${OTB_INSTALL_PREFIX}/${OTB_INSTALL_PYTHON_DIR}\")")
endif()
set(OTB_CONFIG_APPLICATION_PATH "\${OTB_INSTALL_PREFIX}/${OTB_INSTALL_APP_DIR}")
set(OTB_CONFIG_TARGETS_CONDITION "")
set(OTB_CONFIG_TARGETS_FILE "\${OTB_INSTALL_PREFIX}/${OTB_INSTALL_PACKAGE_DIR}/OTBTargets.cmake")
......
......@@ -66,9 +66,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")
......@@ -117,10 +117,15 @@ file(COPY ${RST_SOURCE_DIR} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/Art DESTINATION ${RST_BINARY_DIR})
# Create symlinks to otb-data/Output and otb-data/Input in the rst build directory
# Used for including figures and images in the CookBook
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${OTB_DATA_ROOT}/Output" "${RST_BINARY_DIR}/Output")
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${OTB_DATA_ROOT}/Input" "${RST_BINARY_DIR}/Input")
set(SPHINX_CONF_DIR ${CMAKE_CURRENT_BINARY_DIR})
string(TIMESTAMP OTB_COPYRIGHT_YEAR "%Y")
set(OTB_COPYRIGHT_TEXT "${OTB_COPYRIGHT_YEAR} CNES.The OTB CookBook is licensed under a Creative Commons Attribution-ShareAlike 4.0 International license (CC-BY-SA)")
set(OTB_COPYRIGHT_TEXT "${OTB_COPYRIGHT_YEAR} CNES. The OTB CookBook is licensed under a Creative Commons Attribution-ShareAlike 4.0 International license (CC-BY-SA).")
configure_file(${RST_SOURCE_DIR}/conf.py.in ${SPHINX_CONF_DIR}/conf.py @ONLY)
......@@ -130,14 +135,22 @@ add_custom_target(generate_otbapps_rst
COMMAND ${SH_INTERP} ${CMAKE_CURRENT_BINARY_DIR}/RunApplicationsRstGenerator.sh
${RST_BINARY_DIR}
WORKING_DIRECTORY ${RST_BINARY_DIR}
COMMENT "Auto-generating Application Reference Documentation in RST"
COMMENT "Auto-generating Application Documentation in RST"
DEPENDS OTBSWIGWrapper-all
)
add_custom_target(generate_examples_rst
COMMAND "python3" ${CMAKE_CURRENT_SOURCE_DIR}/Scripts/otbGenerateExamplesRstDoc.py
${RST_BINARY_DIR}
${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY ${RST_BINARY_DIR}
COMMENT "Auto-generating Examples in RST"
DEPENDS OTBSWIGWrapper-all
)
# Add all applications as dependencies to rst generation
set(app_names ${OTB_APPLICATIONS_NAME_LIST})
list(REMOVE_ITEM app_names "TestApplication")
list(REMOVE_ITEM app_names "ApplicationExample")
list(REMOVE_DUPLICATES app_names)
foreach(app_name ${app_names})
add_dependencies(generate_otbapps_rst otbapp_${app_name})
......@@ -152,6 +165,7 @@ add_custom_target(CookBookHTML
-c ${SPHINX_CONF_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS generate_otbapps_rst
DEPENDS generate_examples_rst
COMMENT "Building RST documentation in html")
add_custom_target(CookBookArchive
......
#!/usr/bin/env python3
#
# Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import argparse
import glob
import subprocess
import os
from os.path import join
import re
from rst_utils import examples_usage_regex
blacklist = [
"ApplicationExample", # does not produce a binary (uses the application engine)
"LAIAndPROSAILToSensorResponse" # does not run, wrong arguments
]
def run_example(otb_root, otb_data, name, dry_run):
"""
Run an example by name
Assumes the current working directory is an OTB build
"""
if name in blacklist:
return
# Find binary in bin/
binary_names = glob.glob(join("bin", name))
if len(binary_names) == 0:
raise RuntimeError("Can't find binary for {}".format(name))
if len(binary_names) > 1:
raise RuntimeError("Found {} binaries for {}".format(len(binary_names), name))
binary = os.path.abspath(binary_names[0])
# Find source file in otb_root/Examples/<tag>/name
sources_files = glob.glob(join(otb_root, "Examples/*/" + name + ".cxx"))
if len(sources_files) == 0:
raise RuntimeError("Can't find source file for {}".format(name))
if len(sources_files) > 1:
raise RuntimeError("Found {} source files for {}".format(len(sources_files), name))
filename = os.path.abspath(sources_files[0])
# Extract example usage command arguments
matches = list(re.finditer(examples_usage_regex, open(filename).read(), flags = re.MULTILINE | re.DOTALL))
if len(matches) == 0:
print("Warning: no usage for example: {}".format(sources_files[0]))
return
for match in matches:
# Get command line call and print it
example_args = match.group(2).replace("\\\n", "").split()
print("$ " + binary + " " + " ".join(example_args))
if not dry_run:
# Make sure Output dir exists
os.makedirs(join(otb_data, "Output"), exist_ok=True)
# Execute the example with otb_data as working directory,
# because paths are given relative to otb_data in the example usage
subprocess.check_call([binary, *example_args], cwd=otb_data)
def main():
parser = argparse.ArgumentParser(usage="Run one or all OTB cxx examples")
parser.add_argument("otb_root", help="Path to otb repository")
parser.add_argument("otb_data", help="Path to otb-data repository")
parser.add_argument("--name", type=str, help="Run only one example with then given name")
parser.add_argument("-n", "--dry-run", action='store_true', help="Dry run, only print commands")
parser.add_argument("-k", "--keep-going", action='store_true', help="Keep going after failing examples")
args = parser.parse_args()
if args.name:
run_example(args.otb_root, args.otb_data, args.name, dry_run=args.dry_run)
else:
list_of_examples =[os.path.splitext(os.path.basename(f))[0] for f in glob.glob(join(args.otb_root, "Examples/*/*.cxx"))]
for name in list_of_examples:
try:
run_example(args.otb_root, args.otb_data, name, dry_run=args.dry_run)
except Exception as e:
if args.keep_going:
print("Warning:", e)
else:
raise
if __name__ == "__main__":
main()
#!/usr/bin/env python3
#
# Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import argparse
import os
import os.path
from os.path import join
from collections import defaultdict
import re
import glob
from rst_utils import rst_section, RstPageHeading, examples_usage_regex
def generate_examples_index(rst_dir, list_of_examples):
# Compute dictionary of tag -> (list of examples)
tag_files = defaultdict(list)
for filename in list_of_examples:
tag = filename.split("/")[1]
name, _ = os.path.splitext(filename.split("/")[2])
tag_files[tag].append(join(tag, name + ".rst"))
# Render index file and tag index files
os.makedirs(join(rst_dir, "Examples"), exist_ok=True)
index_f = open(join(rst_dir, "Examples.rst"), "w")
index_f.write(RstPageHeading("Examples", 3, ref="cpp-examples"))
for tag, examples_filenames in tag_files.items():
tag_filename = join("Examples", tag + ".rst")
index_f.write("\t" + tag_filename + "\n")
with open(join(rst_dir, tag_filename), "w") as tag_f:
tag_f.write(RstPageHeading(tag, 3))
for examples_filename in examples_filenames:
tag_f.write("\t" + examples_filename + "\n")
def indent(str):
return "\n".join([" " + line for line in str.split("\n")])
def cpp_uncomment(code):
# Strip '// '
return "\n".join([line[4:] for line in code.split("\n")])
def render_example(filename, otb_root):
"Render a cxx example to rst"
# Read the source code of the cxx example
code = open(join(otb_root, filename)).read()
# Don't show the license header to make it nicer,
# and the cookbook is already under a CC license
examples_license_header = open("templates/examples_license_header.txt").read()
code = code.replace(examples_license_header, "")
# Extract usages
example_usage = ""
usage_matches = list(re.finditer(examples_usage_regex, code, flags = re.MULTILINE | re.DOTALL))
examples_usage_template = open("templates/example_usage.rst").read()
for match in usage_matches:
example_usage += examples_usage_template.format(indent(match.group(1).strip()))
# Don't show usage in example source
code = re.sub(examples_usage_regex, "", code, flags = re.MULTILINE | re.DOTALL)
# Make the link to the source code
link_name = os.path.basename(filename)
link_href = "https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/raw/develop/" + filename + "?inline=false"
# Read the description from the example .rst file if it exists
example_rst_file = join(otb_root, filename.replace(".cxx", ".rst"))
if os.path.isfile(example_rst_file):
rst_description = open(example_rst_file).read()
else:
rst_description = ""
# Render the template
template_example = open("templates/example.rst").read()
output_rst = template_example.format(
label="example-" + root,
heading=rst_section(name, "="),
description=rst_description,
usage=example_usage,
code=indent(code.strip()),
link_name=link_name,
link_href=link_href
)
return output_rst
if __name__ == "__main__":
parser = argparse.ArgumentParser(usage="Export examples to rst")
parser.add_argument("rst_dir", help="Directory where rst files are generated")
parser.add_argument("otb_root", help="OTB repository root")
args = parser.parse_args()
# Get list of cxx examples as relative paths from otb_root
list_of_examples = [os.path.relpath(p, start=args.otb_root) for p in sorted(glob.glob(join(args.otb_root, "Examples/*/*.cxx")))]
print("Generating rst for {} examples".format(len(list_of_examples)))
# Generate example index and tag indexes
generate_examples_index(join(args.rst_dir, "C++"), list_of_examples)
# Generate examples rst
for filename in list_of_examples:
name = os.path.basename(filename)
tag = filename.split("/")[1]
root, ext = os.path.splitext(name)
os.makedirs(join(args.rst_dir, "C++", "Examples", tag), exist_ok=True)
with open(join(args.rst_dir, "C++", "Examples", tag, root + ".rst"), "w") as output_file:
output_file.write(render_example(filename, args.otb_root))
......@@ -29,6 +29,8 @@ from otbApplication import ParameterType_Bool, ParameterType_Int, ParameterType_
from otb_warnings import application_documentation_warnings
from rst_utils import rst_section, RstPageHeading
linesep = os.linesep
def EncloseString(s):
......@@ -179,17 +181,6 @@ def render_choice(app, key):
choices=choice_entries,
)
def rst_section(text, delimiter, ref=None):
"Make a rst section title"
output = ""
if ref is not None:
output += ".. _" + ref + ":\n\n"
output += text + "\n" + delimiter * len(text) + "\n\n"
return output
def rst_parameter_value(app, key):
"Render a parameter value to rst"
......@@ -400,13 +391,6 @@ def GetApplicationTags(appname):
app = otbApplication.Registry.CreateApplication(appname)
return app.GetDocTags()
def RstPageHeading(text, maxdepth, ref=None):
output = rst_section(text, "=", ref=ref)
output += ".. toctree::" + linesep
output += "\t:maxdepth: " + maxdepth + linesep
output += linesep + linesep
return output
def GenerateRstForApplications(rst_dir):
"Generate .rst files for all applications"
......
# Regex used to find examples usage
examples_usage_regex = r"\/\* Example usage:\n(\.\/\w+ (.*?))\*\/"
def rst_section(text, delimiter, ref=None):
"Make a rst section title"
output = ""
if ref is not None:
output += ".. _" + ref + ":\n\n"
output += text + "\n" + delimiter * len(text) + "\n\n"
return output
def RstPageHeading(text, maxdepth, ref=None):
output = rst_section(text, "=", ref=ref)
output += ".. toctree::\n"
output += "\t:maxdepth: {}\n\n\n".format(maxdepth)
return output
.. _cpp-api:
C++ API
=======
.. toctree::
C++/Examples.rst
......@@ -84,23 +84,20 @@ necessary to install one of the following packages:
Python bindings
~~~~~~~~~~~~~~~
Starting from OTB 5.8.0, OTB bindings for Python 2.7 are distributed as a binary
package. With OTB 6.4.0, additional bindings for Python 3.5 are also included.
Since OTB 6.7.0 OTB bindings for Python 3.5 are distributed as a binary
package.
Please note that using a different Python version may not be compatible with
OTB wrappings. If no compatible Python 2.x version is found a
notification is generated during the installation process. If the installation completes
OTB wrappings. If the installation completes
without issue, information relating to your Python bindings will be provided.
You must have Python NumPy bindings installed in your system. They can be installed locally
without admin rights as follows: "pip install --user numpy". This is to give users the option
to select their own existing Python installation rather than the one distributed by the OTB package.
to select their own existing Python installation rather than the one dibstributed by the OTB package.
By default, bindings for Python 2.7 will be enabled with the ``otbenv`` script.
If you want to use bindings for Python 3.5, you can copy this script and modify:
- ``lib/python`` into ``lib/python3``, for variable PYTHONPATH
By default, bindings for Python 3.5 will be enabled with the ``otbenv`` script.
Notes:
~~~~~~
- You must use monteverdi and mapla through ``mapla.sh`` and ``monteverdi.sh`` helper scripts in extracted directory.
......
......@@ -44,23 +44,20 @@ supplied script ``tools/uninstall_otb.sh``.
Python bindings
~~~~~~~~~~~~~~~
Starting from OTB 5.8.0, OTB bindings for Python 2.7 are distributed as a binary
package. With OTB 6.4.0, additional bindings for Python 3.5 are also included.
Since OTB 6.7.0 OTB bindings for Python 3.5 are distributed as a binary
package.
Please note that using a different Python version may not be compatible with
OTB wrappings. If no compatible Python 2.x version is found a
notification is generated during the installation process. If the installation completes
OTB wrappings. If the installation completes
without issue, information relating to your Python bindings will be provided.
You must have Python numpy bindings installed in your system. They can be installed locally
without admin rights as follows: "pip install --user numpy". This is to give users the option
to select their own existing Python installation rather than the one dibstributed by the OTB package.
By default, bindings for Python 2.7 will be enabled with the ``otbenv`` script.
If you want to use bindings for Python 3.5, you can copy this script and modify:
- ``lib/python`` into ``lib/python3``, for variable PYTHONPATH
By default, bindings for Python 3.5 will be enabled with the ``otbenv`` script.
Notes:
~~~~~~
- If you want to use the otbcli and otbgui launchers, you must access
them via a terminal prompt.
......
......@@ -43,24 +43,20 @@ start Visual Studio.
Python bindings
~~~~~~~~~~~~~~~
Starting from OTB 5.8.0, OTB bindings for Python 2.7 are distributed as a binary
package. With OTB 6.4.0, additional bindings for Python 3.5 are also included.
Since OTB 6.7.0 OTB bindings for Python 3.5 are distributed as a binary
package.
Please note that using a different Python version may not be compatible with
OTB wrappings. If no compatible Python 2.x version is found a
notification is generated during the installation process. If the installation completes
OTB wrappings. If the installation completes
without issue, information relating to your Python bindings will be provided.
You must have Python numpy bindings installed in your system. They can be installed locally
without admin rights as follows: "pip install --user numpy". This is to give users the option
to select their own existing Python installation rather than the one dibstributed by the OTB package.