'Used to convert arguments to specs.  If spec_like is a spec, returns
it.  If it\'s a string, tries to parse a string.  If that fails, tries
to parse a local spec from it (i.e. name is assumed to be self\'s name).'

def _autospec(self, spec_like):

    if isinstance(spec_like, spack.spec.Spec):
        return spec_like
    try:
        spec = spack.spec.Spec(spec_like)
        if (not spec.name):
            raise SpecError('anonymous    package    --    this    will    always    be    handled')
        return spec
    except SpecError:
        return parse_anonymous_spec(spec_like, self.name)
