diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/rsync/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/rsync/package.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/rsync/package.py b/var/spack/repos/builtin/packages/rsync/package.py index d9a59ed7bd..e223150cfe 100644 --- a/var/spack/repos/builtin/packages/rsync/package.py +++ b/var/spack/repos/builtin/packages/rsync/package.py @@ -1,9 +1,10 @@ -# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * +import re class Rsync(AutotoolsPackage): @@ -25,5 +26,13 @@ class Rsync(AutotoolsPackage): conflicts('%nvhpc') + executables = ['^rsync$'] + + @classmethod + def determine_version(cls, exe): + output = Executable(exe)('--version', output=str, error=str) + match = re.search(r'rsync\s+version\s+(\S+)', output) + return match.group(1) if match else None + def configure_args(self): return ['--with-included-zlib=no'] |