#NEWLINE# def find_wheels( projects , search_dirs ) : #NEWLINE# #INDENT# 'Find wheels from which we can import PROJECTS.\n\n    Scan through SEARCH_DIRS for a wheel for each PROJECT in turn. Return\n    a list of the first wheel found for each PROJECT\n    ' #NEWLINE# wheels = [ ] #NEWLINE# for project in projects : #NEWLINE# #INDENT# for dirname in search_dirs : #NEWLINE# #INDENT# files = glob . glob ( os . path . join ( dirname , ( project + '-*.whl' ) ) ) #NEWLINE# if files : #NEWLINE# #INDENT# wheels . append ( os . path . abspath ( files [ 0 ] ) ) #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# logger . fatal ( ( 'Cannot find a wheel for %s' % ( project , ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# return wheels