From ca3cc5b23e94b8168ba768ad343822b39aac4a25 Mon Sep 17 00:00:00 2001
From: Mario Melara <maamelara@gmail.com>
Date: Tue, 20 Oct 2015 13:37:06 -0700
Subject: Refactored architecture class. Now it will automagically create a
 dict upon instantiation.

---
 lib/spack/spack/architecture.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

(limited to 'lib')

diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py
index 1a9f9de2cb..760c9cddd1 100644
--- a/lib/spack/spack/architecture.py
+++ b/lib/spack/spack/architecture.py
@@ -49,7 +49,6 @@ class Architecture(object):
     """
     
     def __init__(self, front=None, back=None):
-        
         """ Constructor for the architecture class. Should return a dictionary of name (grabbed from uname) 
             and a strategy for searching for that architecture's compiler. 
             The target passed to it should be a dictionary of names and strategies.
@@ -63,6 +62,7 @@ class Architecture(object):
                 This will tell Spack whether to look in the $PATH
                 or $MODULES location for compilers
             """
+            #TODO: Look for other strategies
             d = {}
             for n in names:
                 if n:
@@ -76,21 +76,20 @@ class Architecture(object):
         
         self.arch_dict = add_compiler_strategy(names)
 
-def get_sys_type_from_spack_globals(): #TODO: Figure out how this function works
+def get_sys_type_from_spack_globals():
     """Return the SYS_TYPE from spack globals, or None if it isn't set."""
     if not hasattr(spack, "sys_type"):
         return None 
     elif hasattr(spack.sys_type, "__call__"):
-        return Architecture(spack.sys_type())
+        return Architecture(spack.sys_type()) #If in __init__.py there is a sys_type() then call that
     else:
-        return Architecture(spack.sys_type)
+        return Architecture(spack.sys_type) # Else use the attributed which defaults to None
 
 # This is livermore dependent. Hard coded for livermore
 #def get_sys_type_from_environment():
 #    """Return $SYS_TYPE or None if it's not defined."""
 #    return os.environ.get('SYS_TYPE')
 
-
 def get_mac_sys_type():
     """Return a Mac OS SYS_TYPE or None if this isn't a mac.
        Front-end config
-- 
cgit v1.2.3-70-g09d2