# -----------------------------------------------------------------------------
+def get_lib_dir():
+ if os.path.exists("/usr/lib64/libc.so"):
+ return "lib64"
+ return "lib"
+
+# -----------------------------------------------------------------------------
+
def get_config():
"""
Get list of modules, paths.
if modules_root_dir.has_key(module):
module_root_dir = modules_root_dir[module]
modules_root_dir_list[:0] = [module_root_dir]
- add_path(os.path.join(module_root_dir,"lib",salome_subdir),
+ add_path(os.path.join(module_root_dir,get_lib_dir(),salome_subdir),
"LD_LIBRARY_PATH")
add_path(os.path.join(module_root_dir,"bin",salome_subdir),
"PATH")
pass
add_path(os.path.join(module_root_dir,"bin",salome_subdir),
"PYTHONPATH")
- add_path(os.path.join(module_root_dir,"lib",
+ add_path(os.path.join(module_root_dir,get_lib_dir(),
python_version,"site-packages",
salome_subdir),
"PYTHONPATH")
- add_path(os.path.join(module_root_dir,"lib",salome_subdir),
+ add_path(os.path.join(module_root_dir,get_lib_dir(),salome_subdir),
"PYTHONPATH")
- add_path(os.path.join(module_root_dir,"lib",
+ add_path(os.path.join(module_root_dir,get_lib_dir(),
python_version,"site-packages",
salome_subdir,
"shared_modules"),
if not os.environ.has_key("SALOME_"+plugin+"Resources"):
os.environ["SALOME_"+plugin+"Resources"] \
= plugin_root+"/share/"+args["appname"]+"/resources/"+plugin.lower()
- add_path(os.path.join(plugin_root,"lib",python_version,
+ add_path(os.path.join(plugin_root,get_lib_dir(),python_version,
"site-packages",salome_subdir),
"PYTHONPATH")
- add_path(os.path.join(plugin_root,"lib",salome_subdir),
+ add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir),
"PYTHONPATH")
- add_path(os.path.join(plugin_root,"lib",salome_subdir),
+ add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir),
"LD_LIBRARY_PATH")
add_path(os.path.join(plugin_root,"bin",salome_subdir),
"PYTHONPATH")
pass
pass
+def get_lib_dir():
+ """Get libraries directory according to the Linux platform being used"""
+ if os.path.exists("/usr/lib64/libc.so"):
+ return "lib64"
+ return "lib"
+
def main():
usage="""usage: %prog [options]
Typical use is:
#module_dir="/local/chris/SALOME2/RELEASES/Install/KERNEL_V3_1_0b1"
module_bin_dir=os.path.join(module_dir,'bin','salome')
- module_lib_dir=os.path.join(module_dir,'lib','salome')
- module_lib_py_dir=os.path.join(module_dir,'lib',py_version,'site-packages','salome')
- module_lib_py_shared_dir=os.path.join(module_dir,'lib',py_version,
+ module_lib_dir=os.path.join(module_dir,get_lib_dir(),'salome')
+ module_lib_py_dir=os.path.join(module_dir,get_lib_dir(),py_version,'site-packages','salome')
+ module_lib_py_shared_dir=os.path.join(module_dir,get_lib_dir(),py_version,
'site-packages','salome','shared_modules')
module_share_dir=os.path.join(module_dir,'share','salome','resources')
module_doc_gui_dir=os.path.join(module_dir,'doc','salome','gui')