External recognition for find. (#18360)
* External recognition for find. * Adding re package.
This commit is contained in:
parent
c9fd2983dc
commit
aca370a3a2
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user