Do not construct path to perl command manually (#6927)

Instead, use spec['perl'].command.path.
This commit is contained in:
Michael Kuhn
2018-01-14 05:10:42 +01:00
committed by Adam J. Stewart
parent 589ea856a5
commit df7876ab54
5 changed files with 8 additions and 10 deletions

View File

@@ -64,10 +64,11 @@ def patch(self):
@run_before('install')
def filter_sbang(self):
# Filter sbang before install so Spack's sbang hook can fix it up
perl = join_path(self.spec['perl'].prefix.bin, 'perl')
files = ['perl/feedGnuplot'] + glob.glob('filters/*')
filter_file('^#!/usr/bin/perl', '#!{0}'.format(perl), *files)
filter_file('^#!/usr/bin/perl',
'#!{0}'.format(self.spec['perl'].command.path),
*files)
def install(self, spec, prefix):
if self.compiler.name not in self.supported_compilers: