summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Blake <blake14@llnl.gov>2020-09-16 14:29:59 -0700
committerGitHub <noreply@github.com>2020-09-16 16:29:59 -0500
commitf95d7959b2ab7178690b1be27bec5ed9ef76fe96 (patch)
treeb0e6208bd924f4c20ae4f0d3e947a50bb668729b
parent91649763ab2dc5211c2bd80ab183e17ebfcbe450 (diff)
downloadspack-f95d7959b2ab7178690b1be27bec5ed9ef76fe96.tar.gz
spack-f95d7959b2ab7178690b1be27bec5ed9ef76fe96.tar.bz2
spack-f95d7959b2ab7178690b1be27bec5ed9ef76fe96.tar.xz
spack-f95d7959b2ab7178690b1be27bec5ed9ef76fe96.zip
lustre: Adding external support. Closing #18698 (#18700)
-rw-r--r--var/spack/repos/builtin/packages/lustre/package.py9
1 files changed, 9 insertions, 0 deletions
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: