def matches_requirement(req, wheels):
try:<EOL><INDENT>from pkg_resources import Distribution, Requirement<EOL><DEDENT>except ImportError:<EOL><INDENT>raise RuntimeError("<STR_LIT>")<EOL><DEDENT>req = Requirement.parse(req)<EOL>selected = []<EOL>for wf in wheels:<EOL><INDENT>f = wf.parsed_filename<EOL>dist = Distribution(project_name=f.group("<STR_LIT:name>"), version=f.group("<STR_LIT>"))<EOL>if dist in req:<EOL><INDENT>selected.append(wf)<EOL><DEDENT><DEDENT>return selected<EOL>
List of wheels matching a requirement.

    :param req: The requirement to satisfy
    :param wheels: List of wheels to search.