*: no loop over files with filter_file(*files) (#46420)
* *: no loop over files with filter_file(*files) * scalpel: revert
This commit is contained in:
parent
f73f0f861d
commit
c118c7733b
@ -168,13 +168,11 @@ def filter_sbang(self):
|
||||
pattern = "^#!.*"
|
||||
repl = f"#!{self.spec['perl'].command.path}"
|
||||
files = glob.glob("*.pl")
|
||||
for file in files:
|
||||
filter_file(pattern, repl, *files, backup=False)
|
||||
filter_file(pattern, repl, *files, backup=False)
|
||||
|
||||
repl = f"#!{self.spec['python'].command.path}"
|
||||
files = glob.glob("*.py")
|
||||
for file in files:
|
||||
filter_file(pattern, repl, *files, backup=False)
|
||||
filter_file(pattern, repl, *files, backup=False)
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
htslib = self.spec["htslib"].prefix
|
||||
|
@ -63,8 +63,7 @@ def filter_sbang(self):
|
||||
pattern = "^#!.*/usr/bin/env perl"
|
||||
repl = "#!{0}".format(self.spec["perl"].command.path)
|
||||
files = glob.iglob("*.pl")
|
||||
for file in files:
|
||||
filter_file(pattern, repl, *files, backup=False)
|
||||
filter_file(pattern, repl, *files, backup=False)
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
env.prepend_path("PERL5LIB", self.prefix.lib)
|
||||
|
@ -136,5 +136,4 @@ def perl_interpreter(self):
|
||||
pattern = "^#!.*/usr/bin/perl"
|
||||
repl = "#!{0}".format(self.spec["perl"].command.path)
|
||||
files = ["fconv2", "fconvdens2", "fdowngrad.pl", "fout2in", "grBhfat", "grpop"]
|
||||
for file in files:
|
||||
filter_file(pattern, repl, *files, backup=False)
|
||||
filter_file(pattern, repl, *files, backup=False)
|
||||
|
@ -62,8 +62,7 @@ def filter_sbang(self):
|
||||
pattern = "^#!.*/usr/bin/perl"
|
||||
repl = "#!{0}".format(self.spec["perl"].command.path)
|
||||
files = glob.iglob("*.pl")
|
||||
for file in files:
|
||||
filter_file(pattern, repl, *files, backup=False)
|
||||
filter_file(pattern, repl, *files, backup=False)
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
env.prepend_path("PERL5LIB", self.prefix.lib)
|
||||
|
@ -89,24 +89,20 @@ def filter_sbang(self):
|
||||
pattern = "^#!.*/usr/bin/env python"
|
||||
repl = f"#!{self.spec['python'].command.path}"
|
||||
files = ["hisat2-build", "hisat2-inspect"]
|
||||
for file in files:
|
||||
filter_file(pattern, repl, *files, backup=False)
|
||||
filter_file(pattern, repl, *files, backup=False)
|
||||
|
||||
pattern = "^#!.*/usr/bin/env perl"
|
||||
repl = f"#!{self.spec['perl'].command.path}"
|
||||
files = ["hisat2"]
|
||||
for file in files:
|
||||
filter_file(pattern, repl, *files, backup=False)
|
||||
filter_file(pattern, repl, *files, backup=False)
|
||||
|
||||
pattern = "^#!.*/usr/bin/env python3"
|
||||
repl = f"#!{self.spec['python'].command.path}"
|
||||
files = glob.glob("*.py")
|
||||
for file in files:
|
||||
filter_file(pattern, repl, *files, backup=False)
|
||||
filter_file(pattern, repl, *files, backup=False)
|
||||
|
||||
with working_dir(self.prefix.scripts):
|
||||
pattern = "^#!.*/usr/bin/perl"
|
||||
repl = f"#!{self.spec['perl'].command.path}"
|
||||
files = glob.glob("*.pl")
|
||||
for file in files:
|
||||
filter_file(pattern, repl, *files, backup=False)
|
||||
filter_file(pattern, repl, *files, backup=False)
|
||||
|
Loading…
Reference in New Issue
Block a user