#NEWLINE# def check_for_dep_in_outputs( dep , verbose , G ) : #NEWLINE# #INDENT# '\n    Function to help construct_graph() identify dependencies\n\n    Args:\n        A dependency\n        A flag indication verbosity\n        A (populated) NetworkX DiGraph\n\n    Returns:\n        A list of targets that build given dependency\n\n    ' #NEWLINE# if verbose : #NEWLINE# #INDENT# print ( 'checking dep {}' . format ( dep ) ) #NEWLINE# #UNINDENT# ret_list = [ ] #NEWLINE# for node in G . nodes ( data = True ) : #NEWLINE# #INDENT# if ( 'output' not in node [ 1 ] ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# for out in node [ 1 ] [ 'output' ] : #NEWLINE# #INDENT# if fnmatch . fnmatch ( out , dep ) : #NEWLINE# #INDENT# ret_list . append ( node [ 0 ] ) #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return ret_list