git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8649 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2012-08-14 15:40:43 +00:00
parent 7365c2cfe6
commit 1512b14f98
2 changed files with 35 additions and 26 deletions

25
python/install.py Normal file
View File

@ -0,0 +1,25 @@
#!/usr/local/bin/python
# copy lammps.py and LAMMPS shared library src/liblmp.so to
# Python site-packages dir
import sys,commands
# find this Python's site-packages dir in sys.path list
paths = sys.path
for i,path in enumerate(paths):
index = path.rfind("site-packages")
if index < 0: continue
if index == len(path) - len("site-packages"): break
sitedir = paths[i]
str = "cp ../python/lammps.py %s" % sitedir
print str
outstr = commands.getoutput(str)
if len(outstr.strip()): print outstr
str = "cp ../src/liblmp.so %s" % sitedir
print str
outstr = commands.getoutput(str)
if len(outstr.strip()): print outstr