summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMario Melara <maamelara@gmail.com>2016-04-07 14:37:00 -0700
committerMario Melara <maamelara@gmail.com>2016-04-07 14:37:00 -0700
commit07df40320331c118306c40c36deae8d57ca6073c (patch)
tree2d83f61ecd5e6ca06e7f9495b2d52949362e4a74 /lib
parent143a4d7f7688b506811a564768ed49a2a12d1992 (diff)
downloadspack-07df40320331c118306c40c36deae8d57ca6073c.tar.gz
spack-07df40320331c118306c40c36deae8d57ca6073c.tar.bz2
spack-07df40320331c118306c40c36deae8d57ca6073c.tar.xz
spack-07df40320331c118306c40c36deae8d57ca6073c.zip
Cleaned up the concretize_architecture method by removing commented out code
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/concretize.py62
1 files changed, 5 insertions, 57 deletions
diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py
index c5dad93aef..14edcf1f3d 100644
--- a/lib/spack/spack/concretize.py
+++ b/lib/spack/spack/concretize.py
@@ -236,14 +236,6 @@ class DefaultConcretizer(object):
return True #changed
-# """ Future method for concretizing operating system """
-# if isinstance(arch.platform_os, spack.architecture.OperatingSystem):
-# return False
-# else:
-# arch.arch_os = platform.operating_system('default_os')
-# return True
-
-
def _concretize_target(self, spec):
if spec.architecture.target is not None:
if isinstance(spec.architecture.target,spack.architecture.Target):
@@ -258,16 +250,10 @@ class DefaultConcretizer(object):
else:
spec.add_target_from_string(spec.root.architecture.target)
else:
- spec.architecture.target = spec.architecture.platform.target('default')
+ spec.architecture.target = spec.architecture.platform.target('default_target')
return True #changed
-# if isinstance(arch.target, spack.architecture.Target):
-# return False
-# else:
-# arch.target = platform.target('default')
-# return True
-
def concretize_architecture(self, spec):
"""If the spec is empty provide the defaults of the platform. If the
architecture is not a basestring, then check if either the platform,
@@ -283,50 +269,12 @@ class DefaultConcretizer(object):
# Set the architecture to all defaults
spec.architecture = spack.architecture.Arch()
return True
- #If there is a target and it is a tuple and has both filled return
- #False
-# if isinstance(spec.architecture, basestring):
-# spec.split_architecture_string(spec.architecture)
-
- ret = any((
- self._concretize_operating_system(spec),
- self._concretize_target(spec)))
-
-
- # Does not look pretty at all!!!
-# if spec.root.architecture and \
-# not isinstance(spec.root.architecture, basestring):
-# bool_flag = any((
-# self._concretize_platform(spec.root.architecture, platform),
-# self._concretize_operating_system(spec.root.architecture,
-# platform),
-# self._concretize_target(spec.root.target, platform)))
-# spec.architecture =spec.root.architecture
-# return bool_flag
-# else:
-# spec.add_architecture_from_string(spec.root.architecture)
-
+
+ # Concretize the operating_system and target based of the spec
+ ret = any((self._concretize_operating_system(spec),
+ self._concretize_target(spec)))
return ret
- # if there is no target specified used the defaults
-
- #if spec.target is not None:
- # if isinstance(spec.target,spack.architecture.Target):
- # return False
- # else:
- # spec.add_target_from_string(spec.target)
- # return True #changed
-
- #if spec.root.target:
- # if isinstance(spec.root.target,spack.architecture.Target):
- # spec.target = spec.root.target
- # else:
- # spec.add_target_from_string(spec.root.target)
- #else:
- # platform = spack.architecture.sys_type()
- # spec.target = platform.target('default')
-
- #return True #changed
def concretize_variants(self, spec):