Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F73751986
install.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Jul 24, 05:50
Size
623 B
Mime Type
text/x-python
Expires
Fri, Jul 26, 05:50 (2 d)
Engine
blob
Format
Raw Data
Handle
19239547
Attached To
rLAMMPS lammps
install.py
View Options
#!/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
Event Timeline
Log In to Comment