rsync: add support for external detection (#21669)

This commit is contained in:
iarspider 2021-02-16 16:57:55 +01:00 committed by GitHub
parent d2a0235d4b
commit cec1f9bd47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT) # SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import * from spack import *
import re
class Rsync(AutotoolsPackage): class Rsync(AutotoolsPackage):
@ -25,5 +26,13 @@ class Rsync(AutotoolsPackage):
conflicts('%nvhpc') 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): def configure_args(self):
return ['--with-included-zlib=no'] return ['--with-included-zlib=no']