def build_specs(self, function_tuples):
    function_tuples.sort(key=(lambda f: {'node': (- 2), 'node_compiler': (- 1)}.get(f[0], 0)))
    self._specs = {}
    for (name, args) in function_tuples:
        action = getattr(self, name, None)
        if (not action):
            msg = ('%s(%s)' % (name, ', '.join((str(a) for a in args))))
            tty.debug(msg)
            continue
        assert (action and callable(action))
        pkg = args[0]
        if spack.repo.path.is_virtual(pkg):
            continue
        action(*args)
    for spec in self._specs.values():
        repo = spack.repo.path.repo_for_pkg(spec)
        spec.namespace = repo.namespace
    self.reorder_flags()
    roots = [spec.root for spec in self._specs.values()]
    roots = dict(((id(r), r) for r in roots))
    for root in roots.values():
        spack.spec.Spec.inject_patches_variant(root)
    for s in self._specs.values():
        spack.spec.Spec.ensure_external_path_if_external(s)
    for s in self._specs.values():
        _develop_specs_from_env(s, ev.active_environment())
    for s in self._specs.values():
        s._mark_concrete()
    for s in self._specs.values():
        spack.spec.Spec.ensure_no_deprecated(s)
    return self._specs
def build_specs(self, function_tuples):
    function_tuples.sort(key=(lambda f: {'node': (- 2), 'node_compiler': (- 1)}.get(f[0], 0)))
    self._specs = {}
    for (name, args) in function_tuples:
        action = getattr(self, name, None)
        if (not action):
            msg = ('%s(%s)' % (name, ', '.join((str(a) for a in args))))
            tty.debug(msg)
            continue
        assert (action and callable(action))
        pkg = args[0]
        if spack.repo.path.is_virtual(pkg):
            continue
        action(*args)
    for spec in self._specs.values():
        repo = spack.repo.path.repo_for_pkg(spec)
        spec.namespace = repo.namespace
    self.reorder_flags()
    roots = [spec.root for spec in self._specs.values()]
    roots = dict(((id(r), r) for r in roots))
    for root in roots.values():
        spack.spec.Spec.inject_patches_variant(root)
    for s in self._specs.values():
        spack.spec.Spec.ensure_external_path_if_external(s)
    for s in self._specs.values():
        _develop_specs_from_env(s, ev.active_environment())
    for s in self._specs.values():
        s._mark_concrete()
    for s in self._specs.values():
        spack.spec.Spec.ensure_no_deprecated(s)
    return self._specs