summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Blake <blake14@llnl.gov>2020-08-28 14:22:05 -0700
committerGitHub <noreply@github.com>2020-08-28 16:22:05 -0500
commitaca370a3a2dc35dc5ccc8410dab3f91743715d14 (patch)
tree6cd6955f17829f6641814a6fe837ebecce97a63c
parentc9fd2983dc41367b042eb9f64e533604e9adcade (diff)
downloadspack-aca370a3a2dc35dc5ccc8410dab3f91743715d14.tar.gz
spack-aca370a3a2dc35dc5ccc8410dab3f91743715d14.tar.bz2
spack-aca370a3a2dc35dc5ccc8410dab3f91743715d14.tar.xz
spack-aca370a3a2dc35dc5ccc8410dab3f91743715d14.zip
External recognition for find. (#18360)
* External recognition for find. * Adding re package.
-rw-r--r--var/spack/repos/builtin/packages/findutils/package.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/findutils/package.py b/var/spack/repos/builtin/packages/findutils/package.py
index f4a36dbb46..56a60c85b8 100644
--- a/var/spack/repos/builtin/packages/findutils/package.py
+++ b/var/spack/repos/builtin/packages/findutils/package.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
+import re
class Findutils(AutotoolsPackage, GNUMirrorPackage):
@@ -13,6 +14,8 @@ class Findutils(AutotoolsPackage, GNUMirrorPackage):
homepage = "https://www.gnu.org/software/findutils/"
gnu_mirror_path = "findutils/findutils-4.6.0.tar.gz"
+ executables = ['^find$']
+
version('4.6.0', sha256='ded4c9f73731cd48fec3b6bdaccce896473b6d8e337e9612e16cf1431bb1169d')
version('4.4.2', sha256='434f32d171cbc0a5e72cfc5372c6fc4cb0e681f8dce566a0de5b6fccd702b62a')
version('4.4.1', sha256='77a5b85d7fe0dd9c1093e010b61f765707364ec2c89c4f432c1c616215bcc138')
@@ -45,6 +48,12 @@ class Findutils(AutotoolsPackage, GNUMirrorPackage):
build_directory = 'spack-build'
+ @classmethod
+ def determine_version(cls, exe):
+ output = Executable(exe)('--version', output=str, error=str)
+ match = re.search(r'find \(GNU findutils\)\s+(\S+)', output)
+ return match.group(1) if match else None
+
@property
def force_autoreconf(self):
# Run autoreconf due to build system patch (gnulib-makedev)