diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/swig/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/swig/package.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/swig/package.py b/var/spack/repos/builtin/packages/swig/package.py index 92334e342b..70fefc51b9 100644 --- a/var/spack/repos/builtin/packages/swig/package.py +++ b/var/spack/repos/builtin/packages/swig/package.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os +import re from spack.package import * @@ -22,7 +23,9 @@ class Swig(AutotoolsPackage, SourceforgePackage): sourceforge_mirror_path = "swig/swig-3.0.12.tar.gz" maintainers = ["sethrj"] - tags = ["e4s"] + tags = ["e4s", "build-tools"] + + executables = ["^swig$"] version("master", git="https://github.com/swig/swig.git") version( @@ -66,6 +69,12 @@ class Swig(AutotoolsPackage, SourceforgePackage): conflicts("%nvhpc", when="@:4.0.2") + @classmethod + def determine_version(cls, exe): + output = Executable(exe)("-version", output=str, error=str) + match = re.search(r"SWIG\s+Version\s+(\S+)", output) + return match.group(1) if match else None + @run_after("install") def create_symlink(self): # CMake compatibility: see https://github.com/spack/spack/pull/6240 |