Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pyotb
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Nicolas Narçon
pyotb
Commits
12879457
Commit
12879457
authored
1 year ago
by
Vincent Delbar
Browse files
Options
Downloads
Patches
Plain Diff
FIX: try symlink python libs for executable in /usr/local/bin
parent
87de0932
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!108
Release 2.0.0
,
!98
Add function for interactive OTB installation
Pipeline
#13787
passed
1 year ago
Stage: Static Analysis
Stage: Tests
Stage: Documentation
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pyotb/__init__.py
+1
-1
1 addition, 1 deletion
pyotb/__init__.py
pyotb/install.py
+8
-3
8 additions, 3 deletions
pyotb/install.py
with
9 additions
and
4 deletions
pyotb/__init__.py
+
1
−
1
View file @
12879457
# -*- coding: utf-8 -*-
"""
This module provides convenient python wrapping of otbApplications.
"""
__version__
=
"
2.0.0.dev
5
"
__version__
=
"
2.0.0.dev
6
"
from
.install
import
install_otb
from
.helpers
import
logger
,
set_logger_level
...
...
This diff is collapsed.
Click to expand it.
pyotb/install.py
+
8
−
3
View file @
12879457
...
...
@@ -177,10 +177,15 @@ def install_otb(version: str = "latest", path: str = "", edit_env: bool = True):
)
# TODO: support for sudo auto build deps install using apt, pacman/yay, brew...
# Else use dirty cross version python symlink (only tested on Ubuntu)
if
sys
.
executable
.
startswith
(
"
/usr/bin
"
):
lib
=
f
"
/usr/lib/x86_64-linux-gnu/libpython3.
{
sys
.
version_info
.
minor
}
.so
"
suffix
=
"
so.1.0
"
if
otb_major
>=
8
else
f
"
so.rh-python3
{
expected
}
-1.0
"
target_lib
=
f
"
{
path
}
/lib/libpython3.
{
expected
}
.
{
suffix
}
"
for
prefix
in
(
"
/usr
"
,
"
/usr/local
"
):
if
not
sys
.
executable
.
startswith
(
f
"
{
prefix
}
/bin
"
):
continue
lib_dir
=
f
"
{
prefix
}
/lib
"
+
(
"
/x86_64-linux-gnu
"
if
prefix
==
"
/usr
"
else
""
)
lib
=
f
"
{
lib_dir
}
/libpython3.
{
sys
.
version_info
.
minor
}
.so
"
if
Path
(
lib
).
exists
():
print
(
f
"
##### Creating symbolic link
s
:
{
lib
}
->
{
target_lib
}
"
)
print
(
f
"
##### Creating symbolic link:
{
lib
}
->
{
target_lib
}
"
)
ln_cmd
=
f
'
ln -sf
"
{
lib
}
"
"
{
target_lib
}
"'
subprocess
.
run
(
ln_cmd
,
executable
=
cmd
,
shell
=
True
,
check
=
True
)
return
str
(
path
)
...
...
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