#NEWLINE# def main( ) : #NEWLINE# #INDENT# del sys . argv [ 0 ] #NEWLINE# if ( not sys . argv ) : #NEWLINE# #INDENT# sys . argv [ : 0 ] = [ 'setup.py' , '--open' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if sys . argv [ 0 ] . startswith ( '-' ) : #NEWLINE# #INDENT# sys . argv [ : 0 ] = [ 'setup.py' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( len ( sys . argv ) == 1 ) : #NEWLINE# #INDENT# sys . argv [ 1 : 1 ] = [ '--open' ] #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# sys . argv . insert ( 1 , 'bdist_mpkg_pyglet' ) #NEWLINE# if os . path . isdir ( sys . argv [ 0 ] ) : #NEWLINE# #INDENT# sys . argv [ 0 ] = os . path . join ( sys . argv [ 0 ] , 'setup.py' ) #NEWLINE# #UNINDENT# ( path , name ) = os . path . split ( os . path . abspath ( sys . argv [ 0 ] ) ) #NEWLINE# if path : #NEWLINE# #INDENT# os . chdir ( path ) #NEWLINE# #UNINDENT# sys . path . insert ( 0 , path ) #NEWLINE# sys . argv [ 0 ] = name #NEWLINE# g = dict ( globals ( ) ) #NEWLINE# g [ '__file__' ] = sys . argv [ 0 ] #NEWLINE# g [ '__name__' ] = '__main__' #NEWLINE# execfile ( sys . argv [ 0 ] , name , g )