#NEWLINE# def __init__( self , attrs = None ) : #NEWLINE# #INDENT# if ( attrs is None ) : #NEWLINE# #INDENT# attrs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# if ( not ( 'bento_info' in attrs ) ) : #NEWLINE# #INDENT# bento_info = 'bento.info' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# bento_info = attrs [ 'bento.info' ] #NEWLINE# #UNINDENT# self . pkg = PackageDescription . from_file ( bento_info ) #NEWLINE# package_options = PackageOptions . from_file ( bento_info ) #NEWLINE# attrs = _setup_cmd_classes ( attrs ) #NEWLINE# d = pkg_to_distutils_meta ( self . pkg ) #NEWLINE# attrs . update ( d ) #NEWLINE# Distribution . __init__ ( self , attrs ) #NEWLINE# self . packages = self . pkg . packages #NEWLINE# self . py_modules = self . pkg . py_modules #NEWLINE# if hasattr ( self , 'entry_points' ) : #NEWLINE# #INDENT# if ( self . entry_points is None ) : #NEWLINE# #INDENT# self . entry_points = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# console_scripts = [ e . full_representation ( ) for e in self . pkg . executables . values ( ) ] #NEWLINE# if ( 'console_scripts' in self . entry_points ) : #NEWLINE# #INDENT# self . entry_points [ 'console_scripts' ] . extend ( console_scripts ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . entry_points [ 'console_scripts' ] = console_scripts #NEWLINE# #UNINDENT# #UNINDENT# source_root = os . getcwd ( ) #NEWLINE# build_root = os . path . join ( source_root , 'build' ) #NEWLINE# root = create_root_with_source_tree ( source_root , build_root ) #NEWLINE# self . top_node = root . _ctx . srcnode #NEWLINE# self . build_node = root . _ctx . bldnode #NEWLINE# self . run_node = root . _ctx . srcnode #NEWLINE# self . global_context = global_context_factory ( package_options ) #NEWLINE# mods = set_main ( self . pkg , self . top_node , self . build_node ) #NEWLINE# self . _setup_hooks ( self . pkg , self . global_context , mods )