From e39586c81da152e8d02fd26bf48c66e00e26519a Mon Sep 17 00:00:00 2001
From: Mario Melara <maamelara@gmail.com>
Date: Fri, 30 Oct 2015 15:58:49 -0700
Subject: Reverted back all architecture way of finding modules

---
 lib/spack/spack/cmd/compiler.py | 40 ++++++++++++++++------------------------
 1 file changed, 16 insertions(+), 24 deletions(-)

diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py
index cbe3aba864..3e86928977 100644
--- a/lib/spack/spack/cmd/compiler.py
+++ b/lib/spack/spack/cmd/compiler.py
@@ -38,7 +38,6 @@ from spack.util.environment import get_path
 from spack.spec import CompilerSpec
 
 description = "Manage compilers"
-ARCHITECTURE = spack.architecture.sys_type()
 
 def setup_parser(subparser):
     sp = subparser.add_subparsers(metavar='SUBCOMMAND', dest='compiler_command')
@@ -59,30 +58,23 @@ def compiler_add(args):
     """Search either $PATH or a list of paths OR MODULES for compilers and add them
        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 
-            if not paths:
-                paths = get_path('PATH')
-            
-            compilers = [c for c in spack.compilers.find_compilers(*args.add_paths)
-                        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:
-            spack.compilers.add_compilers_to_config('user', *compilers)
-            n = len(compilers)
-            tty.msg("Added %d new compiler%s to %s" % (
-                n, 's' if n > 1 else '', spack.config.get_config_scope_filename('user', 'compilers')))
-            colify(reversed(sorted(c.spec for c in compilers)), indent=4)
-        else:
-            tty.msg("Found no new compilers")
+    paths = args.add_paths # This might be a parser method. Parsing method to add_paths 
+    if not paths:
+        paths = get_path('PATH')
+    
+    compilers = [c for c in spack.compilers.find_compilers(*args.add_paths)
+                if c.spec not in spack.compilers.all_compilers()]
+
+
+    if compilers:
+        spack.compilers.add_compilers_to_config('user', *compilers)
+        n = len(compilers)
+        tty.msg("Added %d new compiler%s to %s" % (
+            n, 's' if n > 1 else '', spack.config.get_config_scope_filename('user', 'compilers')))
+        colify(reversed(sorted(c.spec for c in compilers)), indent=4)
+    else:
+        tty.msg("Found no new compilers")
 
 
 def compiler_remove(args):
-- 
cgit v1.2.3-70-g09d2