diff options
author | Olivier Cessenat <cessenat@gmail.com> | 2022-02-10 18:35:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-10 12:35:22 -0500 |
commit | 8b39aa1b5083442acc423581e70d88e60277388a (patch) | |
tree | 6db256b85f9839fe10d086acd009ca985d2f9f51 | |
parent | 5206bca19badc065e76475f1d787758f14fd17ea (diff) | |
download | spack-8b39aa1b5083442acc423581e70d88e60277388a.tar.gz spack-8b39aa1b5083442acc423581e70d88e60277388a.tar.bz2 spack-8b39aa1b5083442acc423581e70d88e60277388a.tar.xz spack-8b39aa1b5083442acc423581e70d88e60277388a.zip |
cvs: add the external find feature for cvs (#28863)
-rw-r--r-- | var/spack/repos/builtin/packages/cvs/package.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cvs/package.py b/var/spack/repos/builtin/packages/cvs/package.py index 3cc7c51c84..23df7412be 100644 --- a/var/spack/repos/builtin/packages/cvs/package.py +++ b/var/spack/repos/builtin/packages/cvs/package.py @@ -3,6 +3,7 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import re from spack import * @@ -20,3 +21,10 @@ class Cvs(AutotoolsPackage, GNUMirrorPackage): sha256='e13db2acebad3ca5be5d8e0fa97f149b0f9661e4a9a731965c8226290c6413c0', when='@1.12.13') parallel = False + executables = [r'^cvs$'] + + @classmethod + def determine_version(cls, exe): + output = Executable(exe)('--version', output=str, error=str) + match = re.search(r'\(CVS\)\s+([\d\.]+)', output) + return match.group(1) if match else None |