Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Main Repositories
otb
Commits
4d5e8154
Commit
4d5e8154
authored
Nov 26, 2021
by
Julien Osman
Browse files
FIX: Add a script to set PYTHONPATH for Pythin API doc generation
parent
67f75e77
Pipeline
#9214
passed with stages
in 77 minutes and 27 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Documentation/Cookbook/CMake/RunPythonApiRstGenerator.sh.cmake.in
0 → 100644
View file @
4d5e8154
#!/bin/sh
#
# Copyright (C) 2005-2020 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.
#
#cmake builds with rpath in the binary dir, so we don't need to set LD_LIBRARY_PATH here
#export LD_LIBRARY_PATH=@CMAKE_BINARY_DIR@/lib:$LD_LIBRARY_PATH
export
PYTHONPATH
=
@CMAKE_BINARY_DIR@/lib/otb/python:
$PYTHONPATH
export
OTB_APPLICATION_PATH
=
@CMAKE_BINARY_DIR@/lib/otb/applications
python3 @CMAKE_CURRENT_SOURCE_DIR@/Scripts/otbGeneratePythonApiRstDoc.py
"
$1
"
Documentation/Cookbook/CMakeLists.txt
View file @
4d5e8154
...
...
@@ -92,6 +92,12 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMake/RunApplicationsRstGenerator.sh.
${
CMAKE_CURRENT_BINARY_DIR
}
/RunApplicationsRstGenerator.sh
@ONLY
)
execute_process
(
COMMAND
${
CMAKE_COMMAND
}
-E remove
${
CMAKE_CURRENT_BINARY_DIR
}
/RunPythonApiRstGenerator.sh
)
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/CMake/RunPythonApiRstGenerator.sh.cmake.in
${
CMAKE_CURRENT_BINARY_DIR
}
/RunPythonApiRstGenerator.sh
@ONLY
)
file
(
COPY
${
RST_SOURCE_DIR
}
DESTINATION
${
CMAKE_CURRENT_BINARY_DIR
}
)
file
(
COPY
${
CMAKE_CURRENT_SOURCE_DIR
}
/Art DESTINATION
${
RST_BINARY_DIR
}
)
...
...
@@ -118,8 +124,8 @@ add_custom_target(generate_otbapps_rst
DEPENDS OTBSWIGWrapper-all
)
add_custom_target
(
generate_pythonap
y
_rst
COMMAND
python3
${
CMAKE_CURRENT_
SOURCE_DIR
}
/Scripts/otbGeneratePythonApiRstDoc.py
add_custom_target
(
generate_pythonap
i
_rst
COMMAND
${
SH_INTERP
}
${
CMAKE_CURRENT_
BINARY_DIR
}
/RunPythonApiRstGenerator.sh
${
RST_BINARY_DIR
}
WORKING_DIRECTORY
${
RST_BINARY_DIR
}
COMMENT
"Auto-generating Python Api Documentation in RST"
...
...
@@ -153,7 +159,7 @@ add_custom_target(CookBookHTML
-c
${
SPHINX_CONF_DIR
}
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
DEPENDS generate_otbapps_rst
DEPENDS generate_pythonap
y
_rst
DEPENDS generate_pythonap
i
_rst
DEPENDS generate_examples_rst
COMMENT
"Building RST documentation in html"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment