'Creates an InstallRequirement from a name, which might be a
requirement, directory containing \'setup.py\', filename, or URL.'

@classmethod
def from_line(cls, name, comes_from=None):

    url = None
    name = name.strip()
    req = name
    path = os.path.normpath(os.path.abspath(name))
    if is_url(name):
        url = name
        req = None
    elif (os.path.isdir(path) and ((os.path.sep in name) or name.startswith('.'))):
        if (not is_installable_dir(path)):
            raise InstallationError(("Directory    %r    is    not    installable.    File    'setup.py'    not    found." % name))
        url = path_to_url(name)
        req = None
    elif is_archive_file(path):
        if (not os.path.isfile(path)):
            logger.warn(('Requirement    %r    looks    like    a    filename,    but    the    file    does    not    exist' % name))
        url = path_to_url(name)
        req = None
    return cls(req, comes_from, url=url)
