Do not construct path to perl command manually (#6927)
Instead, use spec['perl'].command.path.
This commit is contained in:
parent
589ea856a5
commit
df7876ab54
@ -55,12 +55,11 @@ def filter_sbang(self):
|
|||||||
# We have to do this after install because otherwise the install
|
# We have to do this after install because otherwise the install
|
||||||
# target will try to rebuild the binaries (filter_file updates the
|
# target will try to rebuild the binaries (filter_file updates the
|
||||||
# timestamps)
|
# timestamps)
|
||||||
perl = join_path(self.spec['perl'].prefix.bin, 'perl')
|
|
||||||
|
|
||||||
# Revert sbang, so Spack's sbang hook can fix it up
|
# Revert sbang, so Spack's sbang hook can fix it up
|
||||||
filter_file('^#! /usr/bin/env perl',
|
filter_file('^#! /usr/bin/env perl',
|
||||||
'#! {0} -w'.format(perl),
|
'#! {0} -w'.format(self.spec['perl'].command.path),
|
||||||
'{0}/autom4te'.format(self.prefix.bin),
|
self.prefix.bin.autom4te,
|
||||||
backup=False)
|
backup=False)
|
||||||
|
|
||||||
def _make_executable(self, name):
|
def _make_executable(self, name):
|
||||||
|
@ -42,9 +42,8 @@ class Canu(MakefilePackage):
|
|||||||
|
|
||||||
def patch(self):
|
def patch(self):
|
||||||
# Use our perl, not whatever is in the environment
|
# Use our perl, not whatever is in the environment
|
||||||
perl = self.spec['perl'].prefix.bin.perl
|
|
||||||
filter_file(r'^#!/usr/bin/env perl',
|
filter_file(r'^#!/usr/bin/env perl',
|
||||||
'#!{0}'.format(perl),
|
'#!{0}'.format(self.spec['perl'].command.path),
|
||||||
'src/pipelines/canu.pl')
|
'src/pipelines/canu.pl')
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
|
@ -64,10 +64,11 @@ def patch(self):
|
|||||||
@run_before('install')
|
@run_before('install')
|
||||||
def filter_sbang(self):
|
def filter_sbang(self):
|
||||||
# Filter sbang before install so Spack's sbang hook can fix it up
|
# 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/*')
|
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):
|
def install(self, spec, prefix):
|
||||||
if self.compiler.name not in self.supported_compilers:
|
if self.compiler.name not in self.supported_compilers:
|
||||||
|
@ -63,7 +63,7 @@ def install(self, spec, prefix):
|
|||||||
# Repeatmasker? (Y/N)
|
# Repeatmasker? (Y/N)
|
||||||
# Add a Search Engine: Done
|
# Add a Search Engine: Done
|
||||||
|
|
||||||
config_answers = ['\n', '%s\n' % self.spec['perl'].prefix.bin.perl,
|
config_answers = ['\n', '%s\n' % self.spec['perl'].command.path,
|
||||||
'%s\n' % self.stage.source_path,
|
'%s\n' % self.stage.source_path,
|
||||||
'%s\n' % self.spec['trf'].prefix.bin.trf, '2\n',
|
'%s\n' % self.spec['trf'].prefix.bin.trf, '2\n',
|
||||||
'%s\n' % self.spec['ncbi-rmblastn'].prefix.bin,
|
'%s\n' % self.spec['ncbi-rmblastn'].prefix.bin,
|
||||||
|
@ -55,8 +55,7 @@ def filter_sbang(self):
|
|||||||
|
|
||||||
with working_dir('src/perl'):
|
with working_dir('src/perl'):
|
||||||
match = '^#!/usr/bin/env perl'
|
match = '^#!/usr/bin/env perl'
|
||||||
perl = join_path(self.spec['perl'].prefix.bin, 'perl')
|
substitute = "#!{perl}".format(perl=self.spec['perl'].command.path)
|
||||||
substitute = "#!{perl}".format(perl=perl)
|
|
||||||
# tab-to-vcf added in 0.1.15
|
# tab-to-vcf added in 0.1.15
|
||||||
files = ['fill-aa', 'fill-an-ac', 'fill-fs',
|
files = ['fill-aa', 'fill-an-ac', 'fill-fs',
|
||||||
'fill-ref-md5', 'tab-to-vcf', 'vcf-annotate',
|
'fill-ref-md5', 'tab-to-vcf', 'vcf-annotate',
|
||||||
|
Loading…
Reference in New Issue
Block a user