def process_line(<EOL>line,  <EOL>filename,  <EOL>line_number,  <EOL>finder=None,  <EOL>comes_from=None,  <EOL>options=None,  <EOL>session=None,  <EOL>wheel_cache=None,  <EOL>use_pep517=None,  <EOL>constraint=False  <EOL>):<EOL>
parser = build_parser(line)<EOL>defaults = parser.get_default_values()<EOL>defaults.index_url = None<EOL>if finder:<EOL><INDENT>defaults.format_control = finder.format_control<EOL><DEDENT>args_str, options_str = break_args_options(line)<EOL>if sys.version_info < (<NUM_LIT:2>, <NUM_LIT:7>, <NUM_LIT:3>):<EOL><INDENT>options_str = options_str.encode('<STR_LIT:utf8>')  <EOL><DEDENT>opts, _ = parser.parse_args(<EOL>shlex.split(options_str), defaults)  <EOL>line_comes_from = '<STR_LIT>' % (<EOL>'<STR_LIT:-c>' if constraint else '<STR_LIT>', filename, line_number,<EOL>)<EOL>if args_str:<EOL><INDENT>isolated = options.isolated_mode if options else False<EOL>if options:<EOL><INDENT>cmdoptions.check_install_build_global(options, opts)<EOL><DEDENT>req_options = {}<EOL>for dest in SUPPORTED_OPTIONS_REQ_DEST:<EOL><INDENT>if dest in opts.__dict__ and opts.__dict__[dest]:<EOL><INDENT>req_options[dest] = opts.__dict__[dest]<EOL><DEDENT><DEDENT>yield install_req_from_line(<EOL>args_str, line_comes_from, constraint=constraint,<EOL>use_pep517=use_pep517,<EOL>isolated=isolated, options=req_options, wheel_cache=wheel_cache<EOL>)<EOL><DEDENT>elif opts.editables:<EOL><INDENT>isolated = options.isolated_mode if options else False<EOL>yield install_req_from_editable(<EOL>opts.editables[<NUM_LIT:0>], comes_from=line_comes_from,<EOL>use_pep517=use_pep517,<EOL>constraint=constraint, isolated=isolated, wheel_cache=wheel_cache<EOL>)<EOL><DEDENT>elif opts.requirements or opts.constraints:<EOL><INDENT>if opts.requirements:<EOL><INDENT>req_path = opts.requirements[<NUM_LIT:0>]<EOL>nested_constraint = False<EOL><DEDENT>else:<EOL><INDENT>req_path = opts.constraints[<NUM_LIT:0>]<EOL>nested_constraint = True<EOL><DEDENT>if SCHEME_RE.search(filename):<EOL><INDENT>req_path = urllib_parse.urljoin(filename, req_path)<EOL><DEDENT>elif not SCHEME_RE.search(req_path):<EOL><INDENT>req_path = os.path.join(os.path.dirname(filename), req_path)<EOL><DEDENT>parsed_reqs = parse_requirements(<EOL>req_path, finder, comes_from, options, session,<EOL>constraint=nested_constraint, wheel_cache=wheel_cache<EOL>)<EOL>for req in parsed_reqs:<EOL><INDENT>yield req<EOL><DEDENT><DEDENT>elif opts.require_hashes:<EOL><INDENT>options.require_hashes = opts.require_hashes<EOL><DEDENT>elif finder:<EOL><INDENT>if opts.index_url:<EOL><INDENT>finder.index_urls = [opts.index_url]<EOL><DEDENT>if opts.no_index is True:<EOL><INDENT>finder.index_urls = []<EOL><DEDENT>if opts.extra_index_urls:<EOL><INDENT>finder.index_urls.extend(opts.extra_index_urls)<EOL><DEDENT>if opts.find_links:<EOL><INDENT>value = opts.find_links[<NUM_LIT:0>]<EOL>req_dir = os.path.dirname(os.path.abspath(filename))<EOL>relative_to_reqs_file = os.path.join(req_dir, value)<EOL>if os.path.exists(relative_to_reqs_file):<EOL><INDENT>value = relative_to_reqs_file<EOL><DEDENT>finder.find_links.append(value)<EOL><DEDENT>if opts.pre:<EOL><INDENT>finder.allow_all_prereleases = True<EOL><DEDENT>if opts.trusted_hosts:<EOL><INDENT>finder.secure_origins.extend(<EOL>("<STR_LIT:*>", host, "<STR_LIT:*>") for host in opts.trusted_hosts)<EOL><DEDENT><DEDENT>
Process a single requirements line; This can result in creating/yielding
    requirements, or updating the finder.

    For lines that contain requirements, the only options that have an effect
    are from SUPPORTED_OPTIONS_REQ, and they are scoped to the
    requirement. Other options from SUPPORTED_OPTIONS may be present, but are
    ignored.

    For lines that do not contain requirements, the only options that have an
    effect are from SUPPORTED_OPTIONS. Options from SUPPORTED_OPTIONS_REQ may
    be present, but are ignored. These lines may contain multiple options
    (although our docs imply only one is supported), and all our parsed and
    affect the finder.

    :param constraint: If True, parsing a constraints file.
    :param options: OptionParser options that we may update