]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix for some platforms where libs are installed to lib64 folder V9_6_0b1
authorvsr <vsr@opencascade.com>
Wed, 14 Oct 2020 16:06:18 +0000 (19:06 +0300)
committervsr <vsr@opencascade.com>
Wed, 14 Oct 2020 16:06:18 +0000 (19:06 +0300)
src/PVServerService/ENGINE/PVSERVER_impl.py

index 77be24200abb968feb248c70159db8f5a652a49d..252afdc2930d3ae68e7517c48c8da0fb2f7dc15f 100644 (file)
@@ -51,19 +51,21 @@ class PVSERVER_impl(object):
         # deduce dynamically PARAVIEW_ROOT_DIR from the paraview module location
         self.PARAVIEW_ROOT_DIR = None
         if sys.platform == "win32":
-          ZE_KEY_TO_FIND_PV_ROOT_DIR="Lib"
+          ZE_KEY_TO_FIND_PV_ROOT_DIR=["Lib"]
           upCount =2
         else:
-          ZE_KEY_TO_FIND_PV_ROOT_DIR="lib"
+          ZE_KEY_TO_FIND_PV_ROOT_DIR=["lib", "lib64"]
           upCount =1
         tmp = os.path.sep.join(tmp.split('/'))
         li=tmp.split(os.path.sep) ; li.reverse()
-        if ZE_KEY_TO_FIND_PV_ROOT_DIR not in li:
-            raise SALOME_Exception(ExceptionStruct(INTERNAL_ERROR,
-                      "PVSERVER_Impl.__init__ : error during dynamic deduction of PARAVIEW_ROOT_DIR : Loc of paraview module is \"%s\" ! \"%s\" is supposed to be the key to deduce it !"%(tmp,ZE_KEY_TO_FIND_PV_ROOT_DIR),
-                      "PVSERVER.py", 0))
-        li=li[li.index(ZE_KEY_TO_FIND_PV_ROOT_DIR)+upCount:] ; li.reverse()
-        self.PARAVIEW_ROOT_DIR = os.path.sep.join(li)
+        for key_to_find in ZE_KEY_TO_FIND_PV_ROOT_DIR:
+            if key_to_find in li:
+                li=li[li.index(key_to_find)+upCount:] ; li.reverse()
+                self.PARAVIEW_ROOT_DIR = os.path.sep.join(li)
+                return                
+        raise SALOME_Exception(ExceptionStruct(INTERNAL_ERROR,
+                                               "PVSERVER_Impl.__init__ : error during dynamic deduction of PARAVIEW_ROOT_DIR : Loc of paraview module is \"%s\" ! \"%s\" is supposed to be the key to deduce it !"%(tmp," or ".join(ZE_KEY_TO_FIND_PV_ROOT_DIR)),
+                                               "PVSERVER.py", 0))
 
     """
     Private. Identify a free port to launch the PVServer.