]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
spns #26828: convergence EDF: gdal environment
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 1 Mar 2022 10:22:24 +0000 (11:22 +0100)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 1 Mar 2022 10:22:24 +0000 (11:22 +0100)
products/env_scripts/gdal.py

index c66e8244fcba324e563b83c11f73f63160bd73bc..b28761510f2425ee74b8ed714588ee794c8189d8 100644 (file)
@@ -2,11 +2,17 @@
 import os.path
 
 def set_env(env, prereq_dir, version):
+    pyver = 'python' + env.get('PYTHON_VERSION')
+
     env.set('GDAL_ROOT_DIR', prereq_dir)
     env.set('GDALHOME', prereq_dir)
     env.set('GDAL_VERSION',version)
+    env.set('GDAL_DATA', os.path.join(prereq_dir, 'share', 'gdal'))
+    env.set('GDAL_ROOT', os.path.join(prereq_dir, 'root'))
+
     env.prepend('PATH', os.path.join(prereq_dir,'bin'))
     env.prepend('LD_LIBRARY_PATH',os.path.join(prereq_dir, 'lib'))
+    env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib', pyver, 'site-packages'))
 
 def set_nativ_env(env):
     pass