def find_wheels(projects, search_dirs):
wheels = []<EOL>for project in projects:<EOL><INDENT>for dirname in search_dirs:<EOL><INDENT>files = glob.glob(os.path.join(dirname, project + '<STR_LIT>'))<EOL>if files:<EOL><INDENT>wheels.append(os.path.abspath(files[<NUM_LIT:0>]))<EOL>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>logger.fatal('<STR_LIT>' % (project,))<EOL><DEDENT><DEDENT>return wheels<EOL>
Find wheels from which we can import PROJECTS.

    Scan through SEARCH_DIRS for a wheel for each PROJECT in turn. Return
    a list of the first wheel found for each PROJECT