Reverted back all architecture way of finding modules

This commit is contained in:
Mario Melara 2015-10-30 15:58:49 -07:00
parent 2d87bb92ed
commit e39586c81d

View file

@ -38,7 +38,6 @@
from spack.spec import CompilerSpec from spack.spec import CompilerSpec
description = "Manage compilers" description = "Manage compilers"
ARCHITECTURE = spack.architecture.sys_type()
def setup_parser(subparser): def setup_parser(subparser):
sp = subparser.add_subparsers(metavar='SUBCOMMAND', dest='compiler_command') sp = subparser.add_subparsers(metavar='SUBCOMMAND', dest='compiler_command')
@ -59,10 +58,7 @@ def compiler_add(args):
"""Search either $PATH or a list of paths OR MODULES for compilers and add them """Search either $PATH or a list of paths OR MODULES for compilers and add them
to Spack's configuration.""" to Spack's configuration."""
strategies = ARCHITECTURE.strategy()
for strategy in strategies:
if strategy == 'PATH':
paths = args.add_paths # This might be a parser method. Parsing method to add_paths paths = args.add_paths # This might be a parser method. Parsing method to add_paths
if not paths: if not paths:
paths = get_path('PATH') paths = get_path('PATH')
@ -70,10 +66,6 @@ def compiler_add(args):
compilers = [c for c in spack.compilers.find_compilers(*args.add_paths) compilers = [c for c in spack.compilers.find_compilers(*args.add_paths)
if c.spec not in spack.compilers.all_compilers()] if c.spec not in spack.compilers.all_compilers()]
elif strategy == "MODULES":
from spack.compilers.cray import Cray
compilers = Cray.find_in_modules()
#TODO: Find a way to locate the executables
if compilers: if compilers:
spack.compilers.add_compilers_to_config('user', *compilers) spack.compilers.add_compilers_to_config('user', *compilers)