summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Krafczyk <krafczyk.matthew@gmail.com>2017-01-04 17:44:28 -0500
committerMatthew Krafczyk <krafczyk.matthew@gmail.com>2017-01-16 11:29:37 -0500
commit31f7a01a9d1babf4aa161491d8ef4557724aa6ad (patch)
tree8fbb9c74109ea864f1955a22ec26c396a8133307
parentd74309a7b75b34027256d92a5a9949c5a1116076 (diff)
downloadspack-31f7a01a9d1babf4aa161491d8ef4557724aa6ad.tar.gz
spack-31f7a01a9d1babf4aa161491d8ef4557724aa6ad.tar.bz2
spack-31f7a01a9d1babf4aa161491d8ef4557724aa6ad.tar.xz
spack-31f7a01a9d1babf4aa161491d8ef4557724aa6ad.zip
Correct rockstar package installation process
Needed to change the way the necessary prefixes are found as well as how the completed package is copied. There should probably be a way to do the copying in a more 'spack' way.
-rw-r--r--var/spack/repos/builtin/packages/rockstar/package.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/var/spack/repos/builtin/packages/rockstar/package.py b/var/spack/repos/builtin/packages/rockstar/package.py
index 7d430f3aec..1235be58e0 100644
--- a/var/spack/repos/builtin/packages/rockstar/package.py
+++ b/var/spack/repos/builtin/packages/rockstar/package.py
@@ -1,3 +1,5 @@
+import os
+import shutil
from spack import *
class Rockstar(Package):
@@ -18,8 +20,8 @@ class Rockstar(Package):
def install(self, spec, prefix):
# Set environment appropriately for HDF5
if '+hdf5' in spec:
- os.environ['HDF5_INC_DIR'] = os.environ['HDF5_DIR']+"/include"
- os.environ['HDF5_LIB_DIR'] = os.environ['HDF5_DIR']+"/lib"
+ os.environ['HDF5_INC_DIR'] = spec.get_dependency('hdf5').spec.prefix+"/include"
+ os.environ['HDF5_LIB_DIR'] = spec.get_dependency('hdf5').spec.prefix+"/lib"
# Build depending on whether hdf5 is to be used
if '+hdf5' in spec:
@@ -30,8 +32,10 @@ class Rockstar(Package):
# Build rockstar library
make('lib')
- mkdir(join_path(prefix.bin))
- mkdir(join_path(prefix.lib))
-
- install('rockstar', join_path(prefix.bin, 'rockstar'))
- install('librockstar.so', join_path(prefix.lib, 'librockstar.so'))
+ # Install all files and directories
+ for filename in os.listdir('.'):
+ if filename != "." and filename != "..":
+ if os.path.isdir(filename):
+ shutil.copytree(join_path(".",filename), join_path(prefix, filename))
+ else:
+ install(filename, join_path(prefix, filename))