rsync: add support for external detection (#21669)
This commit is contained in:
parent
d2a0235d4b
commit
cec1f9bd47
1 changed files with 9 additions and 0 deletions
|
@ -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']
|
||||||
|
|
Loading…
Reference in a new issue