Merge pull request #698 from UCL-RITS/espresso

Fixes install issues on OS/X for Quantum Espresso
This commit is contained in:
Todd Gamblin 2016-03-31 09:47:33 -07:00
commit 0840ffa3dd

View File

@ -32,14 +32,11 @@ def check_variants(self, spec):
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 @@ def install(self, spec, prefix):
configure(*options)
make('all')
if spec.architecture.startswith('darwin'):
mkdirp(prefix.bin)
for filename in glob("bin/*.x"):
install(filename, prefix.bin)
else:
make('install')