Got rid of my old method of finding in LOADEDMODULES
This commit is contained in:
parent
a5ba69d68d
commit
9458f7c7d0
1 changed files with 3 additions and 7 deletions
|
@ -283,13 +283,9 @@ def find_in_modules(cls):
|
|||
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),
|
||||
|
|
Loading…
Reference in a new issue