#NEWLINE# def _from_legacy( self ) : #NEWLINE# #INDENT# assert ( self . _legacy and ( not self . _data ) ) #NEWLINE# result = { #NEWLINE# #INDENT# 'metadata_version' : self . METADATA_VERSION , #NEWLINE# 'generator' : self . GENERATOR , #NEWLINE# #UNINDENT# } #NEWLINE# lmd = self . _legacy . todict ( True ) #NEWLINE# for k in ( 'name' , 'version' , 'license' , 'summary' , 'description' , 'classifier' ) : #NEWLINE# #INDENT# if ( k in lmd ) : #NEWLINE# #INDENT# if ( k == 'classifier' ) : #NEWLINE# #INDENT# nk = 'classifiers' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# nk = k #NEWLINE# #UNINDENT# result [ nk ] = lmd [ k ] #NEWLINE# #UNINDENT# #UNINDENT# kw = lmd . get ( 'Keywords' , [ ] ) #NEWLINE# if ( kw == [ '' ] ) : #NEWLINE# #INDENT# kw = [ ] #NEWLINE# #UNINDENT# result [ 'keywords' ] = kw #NEWLINE# keys = ( ( 'requires_dist' , 'run_requires' ) , ( 'setup_requires_dist' , 'build_requires' ) ) #NEWLINE# for ( ok , nk ) in keys : #NEWLINE# #INDENT# if ( ( ok in lmd ) and lmd [ ok ] ) : #NEWLINE# #INDENT# result [ nk ] = [ { #NEWLINE# #INDENT# 'requires' : lmd [ ok ] , #NEWLINE# #UNINDENT# } ] #NEWLINE# #UNINDENT# #UNINDENT# result [ 'provides' ] = self . provides #NEWLINE# author = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# maintainer = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# return result