fixed flake errors
This commit is contained in:
parent
7db4170062
commit
412618d531
@ -76,7 +76,6 @@
|
|||||||
will be responsible for compiler detection.
|
will be responsible for compiler detection.
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
import imp
|
|
||||||
import inspect
|
import inspect
|
||||||
|
|
||||||
from llnl.util.lang import memoized, list_modules, key_ordering
|
from llnl.util.lang import memoized, list_modules, key_ordering
|
||||||
@ -206,15 +205,12 @@ def detect(self):
|
|||||||
"""
|
"""
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return self.__str__()
|
return self.__str__()
|
||||||
|
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
|
||||||
|
|
||||||
def _cmp_key(self):
|
def _cmp_key(self):
|
||||||
t_keys = ''.join(str(t._cmp_key()) for t in
|
t_keys = ''.join(str(t._cmp_key()) for t in
|
||||||
sorted(self.targets.values()))
|
sorted(self.targets.values()))
|
||||||
@ -285,7 +281,7 @@ def find_compilers(self, *paths):
|
|||||||
|
|
||||||
# ensure all the version calls we made are cached in the parent
|
# ensure all the version calls we made are cached in the parent
|
||||||
# process, as well. This speeds up Spack a lot.
|
# process, as well. This speeds up Spack a lot.
|
||||||
clist = reduce(lambda x, y: x+y, compiler_lists)
|
clist = reduce(lambda x, y: x + y, compiler_lists)
|
||||||
return clist
|
return clist
|
||||||
|
|
||||||
def find_compiler(self, cmp_cls, *path):
|
def find_compiler(self, cmp_cls, *path):
|
||||||
@ -326,7 +322,7 @@ def find_compiler(self, cmp_cls, *path):
|
|||||||
|
|
||||||
# prefer the one with more compilers.
|
# prefer the one with more compilers.
|
||||||
prev_paths = [prev.cc, prev.cxx, prev.f77, prev.fc]
|
prev_paths = [prev.cc, prev.cxx, prev.f77, prev.fc]
|
||||||
newcount = len([p for p in paths if p is not None])
|
newcount = len([p for p in paths if p is not None])
|
||||||
prevcount = len([p for p in prev_paths if p is not None])
|
prevcount = len([p for p in prev_paths if p is not None])
|
||||||
|
|
||||||
# Don't add if it's not an improvement over prev compiler.
|
# Don't add if it's not an improvement over prev compiler.
|
||||||
@ -343,6 +339,7 @@ def to_dict(self):
|
|||||||
d['version'] = self.version
|
d['version'] = self.version
|
||||||
return d
|
return d
|
||||||
|
|
||||||
|
|
||||||
@key_ordering
|
@key_ordering
|
||||||
class Arch(object):
|
class Arch(object):
|
||||||
"""Architecture is now a class to help with setting attributes.
|
"""Architecture is now a class to help with setting attributes.
|
||||||
@ -383,11 +380,9 @@ def __str__(self):
|
|||||||
else:
|
else:
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
|
||||||
def __contains__(self, string):
|
def __contains__(self, string):
|
||||||
return string in str(self)
|
return string in str(self)
|
||||||
|
|
||||||
|
|
||||||
def _cmp_key(self):
|
def _cmp_key(self):
|
||||||
if isinstance(self.platform, Platform):
|
if isinstance(self.platform, Platform):
|
||||||
platform = self.platform.name
|
platform = self.platform.name
|
||||||
@ -430,7 +425,7 @@ def _operating_system_from_dict(os_name, plat=None):
|
|||||||
if isinstance(os_name, dict):
|
if isinstance(os_name, dict):
|
||||||
name = os_name['name']
|
name = os_name['name']
|
||||||
version = os_name['version']
|
version = os_name['version']
|
||||||
return plat.operating_system(name+version)
|
return plat.operating_system(name + version)
|
||||||
else:
|
else:
|
||||||
return plat.operating_system(os_name)
|
return plat.operating_system(os_name)
|
||||||
|
|
||||||
|
@ -248,7 +248,7 @@ def set_build_environment_variables(pkg, env, dirty=False):
|
|||||||
ci = join_path(item, 'case-insensitive')
|
ci = join_path(item, 'case-insensitive')
|
||||||
if os.path.isdir(ci):
|
if os.path.isdir(ci):
|
||||||
env_paths.append(ci)
|
env_paths.append(ci)
|
||||||
|
|
||||||
for item in reversed(env_paths):
|
for item in reversed(env_paths):
|
||||||
env.prepend_path('PATH', item)
|
env.prepend_path('PATH', item)
|
||||||
env.set_path(SPACK_ENV_PATH, env_paths)
|
env.set_path(SPACK_ENV_PATH, env_paths)
|
||||||
|
Loading…
Reference in New Issue
Block a user