diff options
-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 |