summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Cessenat <cessenat@gmail.com>2022-08-30 10:26:02 +0200
committerGitHub <noreply@github.com>2022-08-30 02:26:02 -0600
commit5be9f4dfefe8a81c254bb39d289ef497929d132d (patch)
tree942143d63465209b3d95b7dfd014b81f0452f550
parentd75234b675c23ed14cf4ba80eeff9bdbdc7b8f01 (diff)
downloadspack-5be9f4dfefe8a81c254bb39d289ef497929d132d.tar.gz
spack-5be9f4dfefe8a81c254bb39d289ef497929d132d.tar.bz2
spack-5be9f4dfefe8a81c254bb39d289ef497929d132d.tar.xz
spack-5be9f4dfefe8a81c254bb39d289ef497929d132d.zip
coreutils: add support for external find (#32414)
-rw-r--r--var/spack/repos/builtin/packages/coreutils/package.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/coreutils/package.py b/var/spack/repos/builtin/packages/coreutils/package.py
index e937d9a698..72bca4615e 100644
--- a/var/spack/repos/builtin/packages/coreutils/package.py
+++ b/var/spack/repos/builtin/packages/coreutils/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import re
+
from spack.package import *
@@ -18,6 +20,8 @@ class Coreutils(AutotoolsPackage, GNUMirrorPackage):
tags = ["core-packages"]
+ executables = [r"^md5sum$"]
+
version("9.1", sha256="61a1f410d78ba7e7f37a5a4f50e6d1320aca33375484a3255eddf17a38580423")
version("9.0", sha256="ce30acdf4a41bc5bb30dd955e9eaa75fa216b4e3deb08889ed32433c7b3b97ce")
version("8.32", sha256="4458d8de7849df44ccab15e16b1548b285224dbba5f08fac070c1c0e0bcc4cfa")
@@ -54,3 +58,9 @@ class Coreutils(AutotoolsPackage, GNUMirrorPackage):
configure_args.append("gl_cv_func_ftello_works=yes")
return configure_args
+
+ @classmethod
+ def determine_version(cls, exe):
+ output = Executable(exe)("--version", output=str, error=str)
+ match = re.search(r"\(GNU coreutils\)\s+([\d\.]+)", output)
+ return match.group(1) if match else None