phist needs sbang fix for build script (#20063)

This commit is contained in:
Scott Wittenburg 2020-11-24 08:07:34 -07:00 committed by GitHub
parent 87689f7cc8
commit 348cbe143c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View file

@ -5,6 +5,7 @@
from spack import * from spack import *
import spack.hooks.sbang as sbang
class Phist(CMakePackage): class Phist(CMakePackage):
@ -101,6 +102,8 @@ class Phist(CMakePackage):
patch('update_tpetra_gotypes.patch', when='@:1.8.99') patch('update_tpetra_gotypes.patch', when='@:1.8.99')
patch('sbang.patch', when='+fortran')
# ###################### Dependencies ########################## # ###################### Dependencies ##########################
depends_on('cmake@3.8:', type='build') depends_on('cmake@3.8:', type='build')
@ -132,6 +135,9 @@ class Phist(CMakePackage):
# to compile some OpenMP statements # to compile some OpenMP statements
conflicts('%gcc@:4.9.1') conflicts('%gcc@:4.9.1')
def setup_build_environment(self, env):
env.set('SPACK_SBANG', sbang.sbang_install_path())
def cmake_args(self): def cmake_args(self):
spec = self.spec spec = self.spec

View file

@ -0,0 +1,8 @@
diff --git a/fortran_bindings/cfwrapper.py.in b/fortran_bindings/cfwrapper.py.in
index 6eb9051..874ce48 100755
--- a/fortran_bindings/cfwrapper.py.in
+++ b/fortran_bindings/cfwrapper.py.in
@@ -1,3 +1,4 @@
+#!/bin/bash $ENV{SPACK_SBANG}
#!${PYTHON_EXECUTABLE}
# -*- coding: utf-8 -*-