From 0d2ced34e83aaa939287b304766d6a12e09fb7f5 Mon Sep 17 00:00:00 2001 From: Nicolas OTTON Date: Tue, 18 Jan 2022 17:03:03 +0100 Subject: [PATCH] modification du PYTHONPATH de petsc pour SOLVERLAB --- products/env_scripts/petsc.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 -- 2.39.2