summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/visit/package.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py
index 3bd6bb0e17..68276b9831 100644
--- a/var/spack/repos/builtin/packages/visit/package.py
+++ b/var/spack/repos/builtin/packages/visit/package.py
@@ -64,6 +64,8 @@ class Visit(CMakePackage):
extendable = True
+ executables = ['^visit$']
+
version('develop', branch='develop')
version('3.1.1', sha256='0b60ac52fd00aff3cf212a310e36e32e13ae3ca0ddd1ea3f54f75e4d9b6c6cf0')
version('3.0.1', sha256='a506d4d83b8973829e68787d8d721199523ce7ec73e7594e93333c214c2c12bd')
@@ -282,3 +284,12 @@ class Visit(CMakePackage):
args.append('-DVISIT_MPI_COMPILER={0}'.format(spec['mpi'].mpicxx))
return args
+
+ # https://spack.readthedocs.io/en/latest/packaging_guide.html?highlight=executables#making-a-package-discoverable-with-spack-external-find
+ # Here we are only able to determine the latest version
+ # despite VisIt may have multiple versions
+ @classmethod
+ def determine_version(cls, exe):
+ output = Executable(exe)('-version', output=str, error=str)
+ match = re.search(r'\s*(\d[\d\.]+)\.', output)
+ return match.group(1) if match else None