'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, isolated=False, options=None, wheel_cache=None, constraint=False):

    from pip.index import Link
    if is_url(name):
        marker_sep = ';    '
    else:
        marker_sep = ';'
    if (marker_sep in name):
        (name, markers) = name.split(marker_sep, 1)
        markers = markers.strip()
        if (not markers):
            markers = None
    else:
        markers = None
    name = name.strip()
    req = None
    path = os.path.normpath(os.path.abspath(name))
    link = None
    extras = None
    if is_url(name):
        link = Link(name)
    else:
        (p, extras) = _strip_extras(path)
        if (os.path.isdir(p) and ((os.path.sep in name) or name.startswith('.'))):
            if (not is_installable_dir(p)):
                raise InstallationError(("Directory    %r    is    not    installable.    File    'setup.py'    not    found." % name))
            link = Link(path_to_url(p))
        elif is_archive_file(p):
            if (not os.path.isfile(p)):
                logger.warning('Requirement    %r    looks    like    a    filename,    but    the    file    does    not    exist', name)
            link = Link(path_to_url(p))
    if link:
        if ((link.scheme == 'file') and re.search('\\.\\./', link.url)):
            link = Link(path_to_url(os.path.normpath(os.path.abspath(link.path))))
        if link.is_wheel:
            wheel = Wheel(link.filename)
            if (not wheel.supported()):
                raise UnsupportedWheel(('%s    is    not    a    supported    wheel    on    this    platform.' % wheel.filename))
            req = ('%s==%s' % (wheel.name, wheel.version))
        else:
            req = link.egg_fragment
    else:
        req = name
    options = (options if options else {})
    res = cls(req, comes_from, link=link, markers=markers, isolated=isolated, options=options, wheel_cache=wheel_cache, constraint=constraint)
    if extras:
        res.extras = pkg_resources.Requirement.parse(('__placeholder__' + extras)).extras
    return res
