From: Nicolas OTTON Date: Tue, 18 Jan 2022 16:03:03 +0000 (+0100) Subject: modification du PYTHONPATH de petsc pour SOLVERLAB X-Git-Tag: V9_9_0~220 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0d2ced34e83aaa939287b304766d6a12e09fb7f5;p=tools%2Fsat_salome.git modification du PYTHONPATH de petsc pour SOLVERLAB --- diff --git a/products/env_scripts/petsc.py b/products/env_scripts/petsc.py index 96d52fa..6ab641c 100644 --- a/products/env_scripts/petsc.py +++ b/products/env_scripts/petsc.py @@ -8,11 +8,21 @@ def set_env(env, prereq_dir, version): env.set('PETSCDIR', prereq_dir) env.set('PETSC_ROOT_DIR', prereq_dir) env.set('PETSC_DIR', prereq_dir) + env.set('PETSC4PY', os.path.join(prereq_dir, 'lib','petsc4py')) + env.set('SLEPC4PY', os.path.join(prereq_dir, 'lib','slepc4py')) + if platform.system() == "Windows" : pass else: - env.prepend('LD_LIBRARY_PATH', os.path.join(prereq_dir, 'lib')) env.set('PETSC_ARCH', 'arch-linux-c-opt') + env.prepend('LD_LIBRARY_PATH', os.path.join(prereq_dir, 'lib')) + # Setting pythonpath for libraries petsc4py and slepc4py + petsc4y=env.get('PETSC4PY') + slepc4y=env.get('SLEPC4PY') + env.prepend('PYTHONPATH', petsc4y) + env.prepend('PYTHONPATH', os.path.join(petsc4y, 'lib')) + env.prepend('PYTHONPATH', slepc4y) + env.prepend('PYTHONPATH', os.path.join(slepc4y, 'lib')) def set_nativ_env(env): pass