#NEWLINE# def find_modules( self ) : #NEWLINE# #INDENT# 'Finds individually-specified Python modules, ie. those listed by\n        module name in \'self.py_modules\'.  Returns a list of tuples (package,\n        module_base, filename): \'package\' is a tuple of the path through\n        package-space to the module; \'module_base\' is the bare (no\n        packages, no dots) module name, and \'filename\' is the path to the\n        ".py" file (relative to the distribution root) that implements the\n        module.\n        ' #NEWLINE# packages = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# modules = [ ] #NEWLINE# for module in self . py_modules : #NEWLINE# #INDENT# path = module . split ( '.' ) #NEWLINE# package = '.' . join ( path [ 0 : ( - 1 ) ] ) #NEWLINE# module_base = path [ ( - 1 ) ] #NEWLINE# try : #NEWLINE# #INDENT# ( package_dir , checked ) = packages [ package ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# package_dir = self . get_package_dir ( package ) #NEWLINE# checked = 0 #NEWLINE# #UNINDENT# if ( not checked ) : #NEWLINE# #INDENT# init_py = self . check_package ( package , package_dir ) #NEWLINE# packages [ package ] = ( package_dir , 1 ) #NEWLINE# if init_py : #NEWLINE# #INDENT# modules . append ( ( package , '__init__' , init_py ) ) #NEWLINE# #UNINDENT# #UNINDENT# module_file = os . path . join ( package_dir , ( module_base + '.py' ) ) #NEWLINE# if ( not self . check_module ( module , module_file ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# modules . append ( ( package , module_base , module_file ) ) #NEWLINE# #UNINDENT# return modules