find_compilers doesn't use varargs anymore

This commit is contained in:
Massimiliano Culpo 2019-06-07 09:16:29 +02:00
parent d5ab52b95a
commit ea7910a472
No known key found for this signature in database
GPG Key ID: D1ADB1014FF1118C
3 changed files with 8 additions and 8 deletions

View File

@ -79,7 +79,7 @@ def compiler_find(args):
# Just let compiler_find do the # Just let compiler_find do the
# entire process and return an empty config from all_compilers # entire process and return an empty config from all_compilers
# Default for any other process is init_config=True # Default for any other process is init_config=True
compilers = [c for c in spack.compilers.find_compilers(*paths)] compilers = [c for c in spack.compilers.find_compilers(paths)]
new_compilers = [] new_compilers = []
for c in compilers: for c in compilers:
arch_spec = ArchSpec(None, c.operating_system, c.target) arch_spec = ArchSpec(None, c.operating_system, c.target)

View File

@ -185,19 +185,19 @@ def all_compiler_specs(scope=None, init_config=True):
for s in all_compilers_config(scope, init_config)] for s in all_compilers_config(scope, init_config)]
def find_compilers(*path_hints): def find_compilers(path_hints=None):
"""Returns the list of compilers found in the paths given as arguments. """Returns the list of compilers found in the paths given as arguments.
Args: Args:
*path_hints: list of path hints where to look for. If none is path_hints (list or None): list of path hints where to look for.
given a sensible default based on the ``PATH`` environment A sensible default based on the ``PATH`` environment variable
variable will be used will be used if the value is None
Returns: Returns:
List of compilers found List of compilers found
""" """
# Turn the path hints into real paths that are to be searched if path_hints is None:
path_hints = path_hints or get_path('PATH') path_hints = get_path('PATH')
default_paths = fs.search_paths_for_executables(*path_hints) default_paths = fs.search_paths_for_executables(*path_hints)
# To detect the version of the compilers, we dispatch a certain number # To detect the version of the compilers, we dispatch a certain number

View File

@ -1385,7 +1385,7 @@ def bootstrap_compiler(self, **kwargs):
dep.concretize() dep.concretize()
dep.package.do_install(**kwargs) dep.package.do_install(**kwargs)
spack.compilers.add_compilers_to_config( spack.compilers.add_compilers_to_config(
spack.compilers.find_compilers(dep.prefix) spack.compilers.find_compilers([dep.prefix])
) )
def do_install(self, **kwargs): def do_install(self, **kwargs):