Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Cabieces
otb
Commits
968396f0
Commit
968396f0
authored
6 years ago
by
Victor Poughon
Browse files
Options
Downloads
Patches
Plain Diff
ENH: cookbook build support both python wrappings
parent
0e5993b5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Documentation/Cookbook/CMake/RunApplicationsRstGenerator.sh.cmake.in
+1
-1
1 addition, 1 deletion
...on/Cookbook/CMake/RunApplicationsRstGenerator.sh.cmake.in
Documentation/Cookbook/CMakeLists.txt
+14
-8
14 additions, 8 deletions
Documentation/Cookbook/CMakeLists.txt
with
15 additions
and
9 deletions
Documentation/Cookbook/CMake/RunApplicationsRstGenerator.sh.cmake.in
+
1
−
1
View file @
968396f0
...
...
@@ -2,7 +2,7 @@
#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
PYTHONPATH
=
@
PYTHONPATH_COOKBOOK@
:
$PYTHONPATH
export
OTB_APPLICATION_PATH
=
@CMAKE_BINARY_DIR@/lib/otb/applications
python3 @CMAKE_CURRENT_SOURCE_DIR@/Scripts/otbGenerateWrappersRstDoc.py
-o
"
$1
"
This diff is collapsed.
Click to expand it.
Documentation/Cookbook/CMakeLists.txt
+
14
−
8
View file @
968396f0
...
...
@@ -61,6 +61,19 @@ foreach(cmd
endif
()
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
)
# Cookbook only supports Python3
# But OTB_WRAP_PYTHON can wrap both python2 and python3
if
(
${
PYTHONLIBS_VERSION_STRING
}
STRGREATER
"3.0.0"
)
set
(
PYTHONPATH_COOKBOOK
"
${
CMAKE_BINARY_DIR
}
/lib/otb/python"
)
else
()
message
(
ERROR
"Must wrap OTB with python lib 3+ to build the cookbook, but found version
${
PYTHONLIBS_VERSION_STRING
}
"
)
endif
()
endif
()
set
(
RST_SOURCE_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/rst
)
set
(
RST_BINARY_DIR
${
CMAKE_CURRENT_BINARY_DIR
}
/rst
)
set
(
LATEX_DIR
${
CMAKE_CURRENT_BINARY_DIR
}
/latex
)
...
...
@@ -71,6 +84,7 @@ message(STATUS "RST_SOURCE_DIR = ${RST_SOURCE_DIR}")
message
(
STATUS
"RST_BINARY_DIR =
${
RST_BINARY_DIR
}
"
)
message
(
STATUS
"LATEX_DIR =
${
LATEX_DIR
}
"
)
message
(
STATUS
"HTML_DIR =
${
HTML_DIR
}
"
)
message
(
STATUS
"PYTHONPATH_COOKBOOK =
${
PYTHONPATH_COOKBOOK
}
"
)
# Clean any existing build
macro
(
remove_and_make_directories
)
...
...
@@ -106,14 +120,6 @@ set(OTB_COPYRIGHT_TEXT "${OTB_COPYRIGHT_YEAR} CNES.The OTB CookBook is licensed
configure_file
(
${
RST_SOURCE_DIR
}
/conf.py.in
${
SPHINX_CONF_DIR
}
/conf.py @ONLY
)
#configure_file(${RST_SOURCE_DIR}/Makefile.in ${RST_GENERATED_SOURCE_DIR}/Makefile.sphinx @ONLY)
# Internal variables.
# PAPEROPT_a4 = -D latex_paper_size=a4
# PAPEROPT_letter = -D latex_paper_size=letter
# ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# # the i18n builder cannot share the environment and doctrees with the others
# I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
add_custom_target
(
generate_otbapps_rst
COMMAND
${
SH_INTERP
}
${
CMAKE_CURRENT_BINARY_DIR
}
/RunApplicationsRstGenerator.sh
${
RST_BINARY_DIR
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment