# -----------------------------------------------------------------------------
+__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()
# -----------------------------------------------------------------------------
# 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: