return
home_dir = os.path.expanduser(options.prefix)
+ #try to find python version of salome application and put it in versio
+ pys=[os.path.split(s)[1] for s in glob.glob(os.path.join(home_dir,get_lib_dir(),"python*.*"))]
+ if not pys :
+ versio=None
+ else:
+ versio=pys[0]
+
+ pys=[os.path.split(s)[1] for s in glob.glob(os.path.join(module_dir,get_lib_dir(),"python*.*"))]
+ #check if the module has a python version compatible with application version
+ if not pys :
+ pyversio=versio or py_version
+ elif versio is None:
+ pyversio=pys[0]
+ elif versio in pys:
+ pyversio=versio
+ else:
+ #incompatible python versions
+ print "incompatible python versions : application has version %s and module %s has not" % (versio,module_dir)
+ return
module_bin_dir=os.path.join(module_dir,'bin','salome')
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,
+ module_lib_py_dir=os.path.join(module_dir,get_lib_dir(),pyversio,'site-packages','salome')
+ module_lib_py_shared_dir=os.path.join(module_dir,get_lib_dir(),pyversio,
'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')
bin_dir=os.path.join(home_dir,'bin','salome')
lib_dir=os.path.join(home_dir,'lib','salome')
- lib_py_dir=os.path.join(home_dir,'lib',py_version,'site-packages','salome')
- lib_py_shared_dir=os.path.join(home_dir,'lib',py_version,
+ lib_py_dir=os.path.join(home_dir,'lib',pyversio,'site-packages','salome')
+ lib_py_shared_dir=os.path.join(home_dir,'lib',pyversio,
'site-packages','salome','shared_modules')
share_dir=os.path.join(home_dir,'share','salome','resources')
doc_gui_dir=os.path.join(home_dir,'doc','salome','gui')
print module_lib_dir, " doesn't exist"
pass
- #directory lib/py_version/site-packages/salome : create it and link content
+ #directory lib/pyversio/site-packages/salome : create it and link content
if not os.path.exists(module_lib_py_dir):
print "Python directory %s does not exist" % module_lib_py_dir
else: