diff options
author | Gregory Becker <becker33@llnl.gov> | 2016-05-18 17:42:11 -0700 |
---|---|---|
committer | Gregory Becker <becker33@llnl.gov> | 2016-05-18 17:42:11 -0700 |
commit | 01d5ffcd87d4801874dc810fb8123447971b867d (patch) | |
tree | 840bd3f2a17fc5a37207fedb061f52c5bd98baff /lib | |
parent | 16431f7a4c80893875b408e68ca36442332148f2 (diff) | |
download | spack-01d5ffcd87d4801874dc810fb8123447971b867d.tar.gz spack-01d5ffcd87d4801874dc810fb8123447971b867d.tar.bz2 spack-01d5ffcd87d4801874dc810fb8123447971b867d.tar.xz spack-01d5ffcd87d4801874dc810fb8123447971b867d.zip |
Fixed the first set of merge bugs
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/architecture.py | 8 | ||||
-rw-r--r-- | lib/spack/spack/cmd/find.py | 2 | ||||
-rw-r--r-- | lib/spack/spack/compilers/__init__.py | 6 | ||||
-rw-r--r-- | lib/spack/spack/concretize.py | 11 | ||||
-rw-r--r-- | lib/spack/spack/spec.py | 2 | ||||
-rw-r--r-- | lib/spack/spack/test/architecture.py | 7 |
6 files changed, 16 insertions, 20 deletions
diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index d7f908cfb1..41778795c3 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -323,8 +323,8 @@ class Arch(object): target = self.target d['platform'] = self.platform.name - d['platform_os'] = self.platform_os.to_dict() - d['target'] = self.target.to_dict() + d['platform_os'] = self.platform_os.to_dict() if self.platform_os else None + d['target'] = self.target.to_dict() if self.target else None return d @@ -362,8 +362,8 @@ def arch_from_dict(d): os_dict = d['platform_os'] target_dict = d['target'] - target = _target_from_dict(target_dict) - platform_os = _operating_system_from_dict(os_dict) + target = _target_from_dict(target_dict) if os_dict else None + platform_os = _operating_system_from_dict(os_dict) if os_dict else None arch.target = target arch.platform_os = platform_os diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index 8b91f45cfd..c2bba13dc8 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -239,5 +239,5 @@ def find(parser, args): mode=args.mode, long=args.long, very_long=args.very_long, - show_flags=args.show_flags) + show_flags=args.show_flags, namespace=args.namespace) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 3432c142bf..8fe7a17116 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -261,11 +261,7 @@ def compilers_for_spec(compiler_spec, scope=None): compilers.append(cls(cspec, operating_system, compiler_paths, mods, alias, **flags)) -##ifdef NEW -# return cls(cspec, *compiler_paths, **flags) -##else /* not NEW */ -# return compilers -##endif /* not NEW */ + return compilers matches = set(find(compiler_spec, scope)) compilers = [] diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 72b184dd8f..f38afd38dc 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -282,11 +282,8 @@ class DefaultConcretizer(object): return False #Find the another spec that has a compiler, or the root if none do -#ifdef NEW other_spec = spec if spec.compiler else find_spec(spec, lambda(x) : x.compiler) -#else /* not NEW */ - other_spec = find_spec(spec, lambda(x) : x.compiler) -#endif /* not NEW */ + if not other_spec: other_spec = spec.root other_compiler = other_spec.compiler @@ -321,6 +318,10 @@ class DefaultConcretizer(object): compiler is used, defaulting to no compiler flags in the spec. Default specs set at the compiler level will still be added later. """ + if not spec.architecture.platform_os: + #Although this usually means changed, this means awaiting other changes + return True + ret = False for flag in spack.spec.FlagMap.valid_compiler_flags(): try: @@ -352,7 +353,7 @@ class DefaultConcretizer(object): # Include the compiler flag defaults from the config files # This ensures that spack will detect conflicts that stem from a change # in default compiler flags. - compiler = spack.compilers.compiler_for_spec(spec.compiler) + compiler = spack.compilers.compiler_for_spec(spec.compiler, spec.architecture.platform_os) for flag in compiler.flags: if flag not in spec.compiler_flags: spec.compiler_flags[flag] = compiler.flags[flag] diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 9d217d17ca..7c04baaa91 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1458,7 +1458,7 @@ class Spec(object): self.architecture = self.architecture or other.architecture elif self.architecture.platform is None or other.architecture.platform is None: self.architecture.platform = self.architecture.platform or other.architecture.platform - elif self.architecture.platform_os is None of other.architecture.platform_os is None: + elif self.architecture.platform_os is None or other.architecture.platform_os is None: self.architecture.platform_os = self.architecture.platform_os or other.architecture.platform_os elif self.architecture.target is None or other.architecture.target is None: self.architecture.target = self.architecture.target or other.architecture.target diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py index 4cba2da9a5..2927e468a0 100644 --- a/lib/spack/spack/test/architecture.py +++ b/lib/spack/spack/test/architecture.py @@ -72,7 +72,7 @@ class ArchitectureTest(MockPackagesTest): """ frontend_os = self.platform.operating_system("frontend") frontend_target = self.platform.target("frontend") - frontend_spec = Spec("libelf=frontend") + frontend_spec = Spec("libelf os=frontend target=frontend") frontend_spec.concretize() self.assertEqual(frontend_os, frontend_spec.architecture.platform_os) self.assertEqual(frontend_target, frontend_spec.architecture.target) @@ -83,7 +83,7 @@ class ArchitectureTest(MockPackagesTest): """ backend_os = self.platform.operating_system("backend") backend_target = self.platform.target("backend") - backend_spec = Spec("libelf=backend") + backend_spec = Spec("libelf os=backend target=backend") backend_spec.concretize() self.assertEqual(backend_os, backend_spec.architecture.platform_os) self.assertEqual(backend_target, backend_spec.architecture.target) @@ -109,8 +109,7 @@ class ArchitectureTest(MockPackagesTest): results = [] for arch in combinations: o,t = arch - arch_spec = "-".join(arch) - spec = Spec("libelf=%s" % arch_spec) + spec = Spec("libelf os=%s target=%s" % (o, t)) spec.concretize() results.append(spec.architecture.platform_os == self.platform.operating_system(o)) results.append(spec.architecture.target == self.platform.target(t)) |