diff options
author | Mario Melara <maamelara@gmail.com> | 2015-11-13 11:47:36 -0800 |
---|---|---|
committer | Mario Melara <maamelara@gmail.com> | 2015-11-13 11:47:36 -0800 |
commit | 9458f7c7d0ffebfbe33345c1a6b4b07c39e41e5f (patch) | |
tree | 30b594f75a52a35423b401d20bbe5f60a8e2b975 /lib | |
parent | a5ba69d68d1472f22454a93d045632b1340e2b04 (diff) | |
download | spack-9458f7c7d0ffebfbe33345c1a6b4b07c39e41e5f.tar.gz spack-9458f7c7d0ffebfbe33345c1a6b4b07c39e41e5f.tar.bz2 spack-9458f7c7d0ffebfbe33345c1a6b4b07c39e41e5f.tar.xz spack-9458f7c7d0ffebfbe33345c1a6b4b07c39e41e5f.zip |
Got rid of my old method of finding in LOADEDMODULES
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/compiler.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index abf7223117..5d87588245 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -283,13 +283,9 @@ class Compiler(object): modulecmd = which('modulecmd') modulecmd.add_default_arg('python') output = modulecmd('avail', return_oe=True) - matches = re.findall(r'(%s)/([^\s(]*)' % cls.PrgEnv_compiler, output) - -# loaded_modules = os.environ["LOADEDMODULES"].split(":") - #output = _shell('module avail %s' % cls.PrgEnv_compiler) -# for module in loaded_modules: -# match = re.findall(r'(%s)/([^\s(]*)' % cls.PrgEnv_compiler, module) - + matches = re.findall(r'(%s)/(\d+[\.\d]+)' % cls.PrgEnv_compiler, output) +# It's finding a weird third attribute + print matches for name, version in matches: v = version comp = cls(spack.spec.CompilerSpec(name + '@' + v), |