From 6c3623422fe3d1354f14d67c54a32070e2df2d58 Mon Sep 17 00:00:00 2001 From: George Hartzell Date: Mon, 25 Jul 2016 17:50:06 -0400 Subject: Use cleaner mech to install script Use @adamjstewart's nicer bit of python code in the install method. --- var/spack/repos/builtin/packages/ack/package.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/ack/package.py b/var/spack/repos/builtin/packages/ack/package.py index 8c97e03456..41100a5e66 100644 --- a/var/spack/repos/builtin/packages/ack/package.py +++ b/var/spack/repos/builtin/packages/ack/package.py @@ -48,10 +48,6 @@ class Ack(Package): def install(self, spec, prefix): mkdirp(prefix.bin) - # find the file named like ack-2.14-single-file in a version - # independent manner (there should be only one )and install it - # as `ack`. - for f in os.listdir('.'): - if re.match('ack-\d*\.\d*-single-file', f): - install(f, join_path(prefix.bin, "ack")) - set_executable(join_path(prefix.bin, "ack")) + ack = 'ack-{0}-single-file'.format(self.version) + install(ack, join_path(prefix.bin, "ack")) + set_executable(join_path(prefix.bin, "ack")) -- cgit v1.2.3-60-g2f50