Add function for automatic OTB install
I think this should be quite easy to do, we can target de 2.0 milestone for this, for linux at least. Probably also for macOS. Not sure about Windows and permissions though.
What I have in mind:
"""helpers.py"""
...
def install_otb(path: Path = Path.home() / "Applications", version: str = "latest"):
# Get binaries with requests then
os.system(f"sh {script_path} --target {path}") # or subprocess
return path / "OTB_DIR_NAME"
Then we could do, during module init:
try:
import otbApplication
except ModuleNotFoundError:
if os.environ.get("OTB_AUTO_INSTALL"): # or OTB_AUTO_INSTALL_DIR
otb_dir = install_otb()
os.environ["OTB_ROOT"] = otb_dir
import otbApplication
Edited by Vincent Delbar