]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
modification du PYTHONPATH de petsc pour SOLVERLAB
authorNicolas OTTON <nicolaS.otton@cea.fr>
Tue, 18 Jan 2022 16:03:03 +0000 (17:03 +0100)
committerNicolas OTTON <nicolaS.otton@cea.fr>
Tue, 18 Jan 2022 16:03:03 +0000 (17:03 +0100)
products/env_scripts/petsc.py

index 96d52fa9c49d2724a3ef667e23584cb911414d01..6ab641c92e6f0dfd12714301c743ebaa4b9ab1b0 100644 (file)
@@ -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