]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
PAL13340 : fix launching problem on 64-bit platforms (more correct check)
authorvsr <vsr@opencascade.com>
Tue, 5 Sep 2006 06:14:45 +0000 (06:14 +0000)
committervsr <vsr@opencascade.com>
Tue, 5 Sep 2006 06:14:45 +0000 (06:14 +0000)
bin/runSalome.py
src/KERNEL_PY/salome_shared_modules.py

index 485140e0e110f7c75cea81f0ca766c83701bf240..6e7e6788b754ab511bec57b1c933bf1e54c61635 100755 (executable)
@@ -55,11 +55,16 @@ def add_path(directory, variable_name):
 
 # -----------------------------------------------------------------------------
 
+__lib__dir__ = None
 def get_lib_dir():
-    import platform, re
-    if re.match(".*64.*", platform.machine()): 
-        return "lib64"
-    return "lib"
+    global __lib__dir__
+    if __lib__dir__: return __lib__dir__
+    import platform
+    if platform.architecture()[0] == "64bit":
+        __lib__dir__ = "lib64"
+    else:
+        __lib__dir__ = "lib"
+    return get_lib_dir()
 
 # -----------------------------------------------------------------------------
 
index a86c155abd04f841b6cf8dd59c43ebe522c11c87..2222a4d9e8d4191f57a418199c397b94d7eabfbc 100755 (executable)
@@ -75,11 +75,12 @@ list_modules=[]
 
 # Import all *_shared_modules in the path and store them in list_modules
 path=salome_path.split(":")
-for rep in path:
-    import platform, re
+import platform
+if platform.architecture()[0] == "64bit":
+    libdir = "lib64"
+else:
     libdir = "lib"
-    if re.match(".*64.*", platform.machine()): 
-        libdir = "lib64"
+for rep in path:
     # Import all *_shared_modules in rep
     for f in glob.glob(os.path.join(rep,libdir,"python"+sys.version[:3],"site-packages","salome","shared_modules","*_shared_modules.py")):
         try: