Find external package for git-lfs. (#18107)
This commit is contained in:
parent
6127a6faf6
commit
12c4b8a73e
@ -3,6 +3,7 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import re
|
||||
from spack import *
|
||||
|
||||
|
||||
@ -16,6 +17,8 @@ class GitLfs(MakefilePackage):
|
||||
homepage = "https://git-lfs.github.com"
|
||||
url = "https://github.com/git-lfs/git-lfs/archive/v2.6.1.tar.gz"
|
||||
|
||||
executables = ['^git-lfs$']
|
||||
|
||||
version('2.11.0', sha256='8183c4cbef8cf9c2e86b0c0a9822451e2df272f89ceb357c498bfdf0ff1b36c7')
|
||||
version('2.10.0', sha256='07fd5c57a1039d5717dc192affbe3268ec2fd03accdca462cb504c0b4194cd23')
|
||||
version('2.9.0', sha256='f1963ad88747577ffeeb854649aeacaa741c59be74683da4d46b129a72d111b7')
|
||||
@ -32,6 +35,12 @@ class GitLfs(MakefilePackage):
|
||||
|
||||
parallel = False
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, exe):
|
||||
output = Executable(exe)('--version', output=str, error=str)
|
||||
match = re.search(r'git-lfs/(\S+)', output)
|
||||
return match.group(1) if match else None
|
||||
|
||||
# Git-lfs does not provide an 'install' target in the Makefile
|
||||
def install(self, spec, prefix):
|
||||
mkdirp(prefix.bin)
|
||||
|
Loading…
Reference in New Issue
Block a user