summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2016-06-15 09:33:13 -0500
committerAdam J. Stewart <ajstewart426@gmail.com>2016-06-15 14:17:29 -0500
commit7b97ea248a355d0dd763facd808722dfb1632f14 (patch)
tree9643c437f3257f7827bc520b69ba1a1bb3cbb52a /var
parent9cf1257be4b6203f5a90ee5b410902daafa53d7b (diff)
downloadspack-7b97ea248a355d0dd763facd808722dfb1632f14.tar.gz
spack-7b97ea248a355d0dd763facd808722dfb1632f14.tar.bz2
spack-7b97ea248a355d0dd763facd808722dfb1632f14.tar.xz
spack-7b97ea248a355d0dd763facd808722dfb1632f14.zip
More template filtering
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/psi4/package.py26
1 files changed, 23 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/psi4/package.py b/var/spack/repos/builtin/packages/psi4/package.py
index 4bd47302ab..74f1554336 100644
--- a/var/spack/repos/builtin/packages/psi4/package.py
+++ b/var/spack/repos/builtin/packages/psi4/package.py
@@ -73,12 +73,12 @@ class Psi4(Package):
cmake('..', *cmake_args)
make()
- # ctest()
+ ctest()
make('install')
- self.filter_compilers()
+ self.filter_compilers(spec)
- def filter_compilers(self):
+ def filter_compilers(self, spec):
"""Run after install to tell the configuration files to
use the compilers that Spack built the package with.
@@ -90,6 +90,7 @@ class Psi4(Package):
cc_files = ['bin/psi4-config']
cxx_files = ['bin/psi4-config', 'include/psi4/psiconfig.h']
+ template = 'share/psi4/plugin/Makefile.template'
for filename in cc_files:
filter_file(os.environ['CC'], self.compiler.cc,
@@ -98,3 +99,22 @@ class Psi4(Package):
for filename in cxx_files:
filter_file(os.environ['CXX'], self.compiler.cxx,
os.path.join(self.prefix, filename), **kwargs)
+
+ # The binary still keeps track of the compiler used to install Psi4
+ # and uses it when creating a plugin template
+ filter_file('@PLUGIN_CXX@', self.compiler.cxx,
+ os.path.join(self.prefix, template), **kwargs)
+
+ # The binary links to the build include directory instead of the
+ # installation include directory:
+ # https://github.com/psi4/psi4/issues/410
+ filter_file('@PLUGIN_INCLUDES@', '-I{0}'.format(
+ ' -I'.join(
+ spec['psi4'].prefix.include,
+ spec['boost'].prefix.include,
+ spec['lapack'].prefix.include,
+ spec['blas'].prefix.include,
+ spec['python'].prefix.include,
+ '/usr/include'
+ )
+ ), os.path.join(self.prefix, template), **kwargs)