*: no loop over files with filter_file(*files) (#46420)

* *: no loop over files with filter_file(*files)
* scalpel: revert
This commit is contained in:
Wouter Deconinck 2024-09-22 12:04:23 -05:00 committed by GitHub
parent f73f0f861d
commit c118c7733b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 9 additions and 18 deletions

View File

@ -168,12 +168,10 @@ 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)
repl = f"#!{self.spec['python'].command.path}"
files = glob.glob("*.py")
for file in files:
filter_file(pattern, repl, *files, backup=False)
def setup_build_environment(self, env):

View File

@ -63,7 +63,6 @@ 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)
def setup_run_environment(self, env):

View File

@ -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)

View File

@ -62,7 +62,6 @@ 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)
def setup_run_environment(self, env):

View File

@ -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)
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)
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)
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)