summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-03-31 09:47:33 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-03-31 09:47:33 -0700
commit0840ffa3ddbc58ae729cfe6f8d71707d5090460f (patch)
tree6f864bc62133dafc060cd39c5cf32611dfc7faac
parente2a7b7e50dc4c83fc3c8680ab933c28cdbdecc1a (diff)
parent7430f9142fc3fc590232a21a193321be9de33df7 (diff)
downloadspack-0840ffa3ddbc58ae729cfe6f8d71707d5090460f.tar.gz
spack-0840ffa3ddbc58ae729cfe6f8d71707d5090460f.tar.bz2
spack-0840ffa3ddbc58ae729cfe6f8d71707d5090460f.tar.xz
spack-0840ffa3ddbc58ae729cfe6f8d71707d5090460f.zip
Merge pull request #698 from UCL-RITS/espresso
Fixes install issues on OS/X for Quantum Espresso
-rw-r--r--var/spack/repos/builtin/packages/espresso/package.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/var/spack/repos/builtin/packages/espresso/package.py b/var/spack/repos/builtin/packages/espresso/package.py
index 59f362ab46..0dad57a9f6 100644
--- a/var/spack/repos/builtin/packages/espresso/package.py
+++ b/var/spack/repos/builtin/packages/espresso/package.py
@@ -24,7 +24,7 @@ class Espresso(Package):
depends_on('fftw~mpi', when='~mpi')
depends_on('fftw+mpi', when='+mpi')
depends_on('scalapack', when='+scalapack+mpi') # TODO : + mpi needed to avoid false dependencies installation
-
+
def check_variants(self, spec):
error = 'you cannot ask for \'+{variant}\' when \'+mpi\' is not active'
if '+scalapack' in spec and '~mpi' in spec:
@@ -32,14 +32,11 @@ class Espresso(Package):
if '+elpa' in spec and ('~mpi' in spec or '~scalapack' in spec):
raise RuntimeError(error.format(variant='elpa'))
- def setup_environment(self, spack_env, run_env):
- # Espresso copies every executable in prefix without creating sub-folders
- run_env.prepend_path('PATH', self.prefix)
-
def install(self, spec, prefix):
+ from glob import glob
self.check_variants(spec)
- options = ['-prefix=%s' % prefix]
+ options = ['-prefix=%s' % prefix.bin]
if '+mpi' in spec:
options.append('--enable-parallel')
@@ -65,5 +62,11 @@ class Espresso(Package):
configure(*options)
make('all')
- make('install')
+
+ if spec.architecture.startswith('darwin'):
+ mkdirp(prefix.bin)
+ for filename in glob("bin/*.x"):
+ install(filename, prefix.bin)
+ else:
+ make('install')