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
Container Registry
Model registry
Operate
Environments
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
Main Repositories
otb
Commits
c65355ae
Commit
c65355ae
authored
7 months ago
by
Tristan Laurent
Browse files
Options
Downloads
Patches
Plain Diff
COMP: automatically resolve which gdal bindings to download
parent
418ff066
No related branches found
Branches containing commit
No related tags found
1 merge request
!1047
Retrieve improvments from 9.1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+0
-2
0 additions, 2 deletions
.gitlab-ci.yml
CMakeLists.txt
+4
-2
4 additions, 2 deletions
CMakeLists.txt
Packaging/Files/post_install.sh.in
+14
-6
14 additions, 6 deletions
Packaging/Files/post_install.sh.in
with
18 additions
and
10 deletions
.gitlab-ci.yml
+
0
−
2
View file @
c65355ae
...
...
@@ -189,8 +189,6 @@ python3.12-gdal-bindings:
extends
:
.common-build
image
:
$BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-base:24.04
only
:
changes
:
-
SuperBuild/CMake/External_gdal.cmake
refs
:
-
develop
-
/^release-[0-9]+\.[0-9]+$/
...
...
This diff is collapsed.
Click to expand it.
CMakeLists.txt
+
4
−
2
View file @
c65355ae
...
...
@@ -427,9 +427,11 @@ if(UNIX)
DESTINATION .
COMPONENT Core
)
install
(
PROGRAMS
configure_file
(
${
OTB_SOURCE_DIR
}
/Packaging/Files/post_install.sh.in
${
CMAKE_BINARY_DIR
}
/post_install.sh @ONLY
)
install
(
PROGRAMS
${
OTB_SOURCE_DIR
}
/Packaging/Files/check_python_env.sh
${
OTB_SOURCE_DIR
}
/Packaging/Files
/post_install.sh
${
CMAKE_BINARY_DIR
}
/post_install.sh
${
OTB_SOURCE_DIR
}
/Packaging/Files/sanitize_rpath.sh
DESTINATION ./tools
COMPONENT Core
...
...
This diff is collapsed.
Click to expand it.
Packaging/Files/post_install.sh
→
Packaging/Files/post_install.sh
.in
+
14
−
6
View file @
c65355ae
...
...
@@ -18,20 +18,28 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# avoid magic number. Version filled by cmake
OTB_SHORT_VERSION
=
@OTB_VERSION_MAJOR@.@OTB_VERSION_MINOR@
echo
"***** First time launching OTB after installation, doing some post installation steps before use *****"
# Apply necessary patches for a modular install because cmake generates these file at configure time, not at packaging time
sed
-i
"s/
\/
builds
\/
otb
\/
xdk/
\$
{OTB_INSTALL_PREFIX}/g"
"
$OTB_INSTALL_DIR
"
/lib/cmake/OTB-9.0/
*
.cmake
sed
-i
"s/
\/
builds
\/
otb
\/
xdk/
\$
{OTB_INSTALL_PREFIX}/g"
"
$OTB_INSTALL_DIR
"
/lib/cmake/OTB-9.0/Modules/
*
.cmake
sed
-i
"s/
\/
builds
\/
otb
\/
xdk/
\$
{OTB_INSTALL_PREFIX}/g"
"
$OTB_INSTALL_DIR
"
/lib/cmake/ITK-4.13/
*
.cmake
sed
-i
"s/
\/
builds
\/
otb
\/
xdk/
\$
{OTB_INSTALL_PREFIX}/g"
"
$OTB_INSTALL_DIR
"
/lib/cmake/ITK-4.13/Modules/
*
.cmake
CMAKE_DIRS
=
"
$OTB_INSTALL_DIR
/lib/cmake"
sed
-i
"s/FATAL_ERROR/WARNING/g"
"
$CMAKE_DIRS
/OTB-
$OTB_SHORT_VERSION
/OTBTargets.cmake"
sed
-i
"s/FATAL_ERROR/WARNING/g"
"
$CMAKE_DIRS
/OTB-
$OTB_SHORT_VERSION
/OTBModuleAPI.cmake"
sed
-i
"s/
\/
builds
\/
otb
\/
xdk/
\$
{OTB_INSTALL_PREFIX}/g"
"
$CMAKE_DIRS
"
/OTB-
"
$OTB_SHORT_VERSION
"
/
*
.cmake
sed
-i
"s/
\/
builds
\/
otb
\/
xdk/
\$
{OTB_INSTALL_PREFIX}/g"
"
$CMAKE_DIRS
"
/OTB-
"
$OTB_SHORT_VERSION
"
/Modules/
*
.cmake
sed
-i
"s/
\/
builds
\/
otb
\/
xdk/
\$
{OTB_INSTALL_PREFIX}/g"
"
$CMAKE_DIRS
"
/ITK-4.13/
*
.cmake
sed
-i
"s/
\/
builds
\/
otb
\/
xdk/
\$
{OTB_INSTALL_PREFIX}/g"
"
$CMAKE_DIRS
"
/ITK-4.13/Modules/
*
.cmake
sed
-i
"s/
\/
builds
\/
otb
\/
xdk/
\$
OTB_INSTALL_DIR/g"
"
$OTB_INSTALL_DIR
"
/bin/gdal-config
sed
-i
"s/
\/
builds
\/
otb
\/
xdk/
\$
OTB_INSTALL_DIR/g"
"
$OTB_INSTALL_DIR
"
/bin/curl-config
sh
"
$OTB_INSTALL_DIR
"
/tools/sanitize_rpath.sh
# Check python version, if python 3.12 (ubuntu 24.04) download and extract the gdal bindings for python 3.12
# Check python version, if python 3.10 (ubuntu 22 and debian 12) download and extract the gdal bindings for python 3.10
pyversion
=
"
$(
python3
-V
2>&1 |
sed
's/.* \([0-9]\).\([0-9]*\).*/\1\2/'
)
"
if
[
"
$pyversion
"
=
"312"
]
;
then
echo
"*** Python 3.12 detected, downloading gdal bindings compiled for python 3.12 ***"
PACKAGE_OTB_VERSION
=
`
ls
$OTB_
INSTALL_DIR
/lib/libOTBCommon.so.
*
.
*
.
*
| egrep
-o
"[0-9]+
\.
[0-9]+
\.
[0-9]$"
`
PACKAGE_OTB_VERSION
=
"
$OTB_
SHORT_VERSION
.@OTB_VERSION_PATCH@"
curl https://www.orfeo-toolbox.org/packages/archives/OTB/OTB-
$PACKAGE_OTB_VERSION
-GDAL-bindings-py312
.tar.gz
-o
"
$OTB_INSTALL_DIR
"
/tools/gdal-py312.tar.gz
tar
-xf
"
$OTB_INSTALL_DIR
"
/tools/gdal-py312.tar.gz
-C
"
$OTB_INSTALL_DIR
"
/lib/python3/dist-packages/osgeo/
rm
"
$OTB_INSTALL_DIR
"
/tools/gdal-py312.tar.gz
...
...
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