From f95d7959b2ab7178690b1be27bec5ed9ef76fe96 Mon Sep 17 00:00:00 2001 From: Robert Blake Date: Wed, 16 Sep 2020 14:29:59 -0700 Subject: [PATCH] lustre: Adding external support. Closing #18698 (#18700) --- var/spack/repos/builtin/packages/lustre/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/lustre/package.py b/var/spack/repos/builtin/packages/lustre/package.py index 2ce6a1ad55..b3d4a6a7b7 100644 --- a/var/spack/repos/builtin/packages/lustre/package.py +++ b/var/spack/repos/builtin/packages/lustre/package.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * +import re class Lustre(Package): @@ -13,8 +14,16 @@ class Lustre(Package): homepage = 'http://lustre.org/' has_code = False + executables = [r'^lfs$'] + 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. # To have it as external package in SPACK, follow below: # config file packages.yaml needs to be adjusted: