diff options
author | Mario Melara <maamelara@gmail.com> | 2015-10-20 13:37:06 -0700 |
---|---|---|
committer | Mario Melara <maamelara@gmail.com> | 2015-10-20 13:37:06 -0700 |
commit | ca3cc5b23e94b8168ba768ad343822b39aac4a25 (patch) | |
tree | 1d09049f83b76093525f821d2b992cf796b3e916 /lib | |
parent | 3ba2842b53752e9a3ec8766f3a1350c6cc7577a2 (diff) | |
download | spack-ca3cc5b23e94b8168ba768ad343822b39aac4a25.tar.gz spack-ca3cc5b23e94b8168ba768ad343822b39aac4a25.tar.bz2 spack-ca3cc5b23e94b8168ba768ad343822b39aac4a25.tar.xz spack-ca3cc5b23e94b8168ba768ad343822b39aac4a25.zip |
Refactored architecture class. Now it will automagically create a dict upon instantiation.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/architecture.py | 9 |
1 files changed, 4 insertions, 5 deletions
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 |