lustre: Adding external support. Closing #18698 (#18700)

This commit is contained in:
Robert Blake 2020-09-16 14:29:59 -07:00 committed by GitHub
parent 91649763ab
commit f95d7959b2
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 Lustre(Package): class Lustre(Package):
@ -13,8 +14,16 @@ class Lustre(Package):
homepage = 'http://lustre.org/' homepage = 'http://lustre.org/'
has_code = False has_code = False
executables = [r'^lfs$']
version('2.12') version('2.12')
@classmethod
def determine_version(cls, exe):
output = Executable(exe)('--version', output=str, error=str)
match = re.search(r'lfs (\d\S*)', output)
return match.group(1) if match else None
# Lustre is filesystem and needs to be installed on system. # Lustre is filesystem and needs to be installed on system.
# To have it as external package in SPACK, follow below: # To have it as external package in SPACK, follow below:
# config file packages.yaml needs to be adjusted: # config file packages.yaml needs to be adjusted: