<s> import glob <EOL> import os <EOL> import shutil <EOL> class PCLReferenceAssembliesPackage ( Package ) : <EOL> def __init__ ( self ) : <EOL> Package . __init__ ( self , <EOL> name = '<STR_LIT>' , <EOL> version = '<STR_LIT>' , <EOL> sources = [ '<STR_LIT>' ] ) <EOL> def build ( self ) : <EOL> pass <EOL> def install ( self ) : <EOL> dest = os . path . join ( self . staged_prefix , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" ) <EOL> if not os . path . exists ( dest ) : <EOL> os . makedirs ( dest ) <EOL> shutil . rmtree ( dest , ignore_errors = True ) <EOL> self . sh ( "<STR_LIT>" % ( self . workspace , dest ) ) <EOL> for f in glob . glob ( "<STR_LIT>" % dest ) : <EOL> self . write_xml ( f ) <EOL> def write_xml ( self , directory ) : <EOL> data = { <EOL> os . path . join ( directory , "<STR_LIT>" ) : <EOL> """<STR_LIT>""" , <EOL> os . path . join ( directory , "<STR_LIT>" ) : <EOL> """<STR_LIT>""" , <EOL> os . path . join ( directory , "<STR_LIT>" ) : <EOL> """<STR_LIT>""" , <EOL> os . path . join ( directory , "<STR_LIT>" ) : <EOL> """<STR_LIT>""" , <EOL> os . path . join ( directory , "<STR_LIT>" ) : <EOL> """<STR_LIT>""" , <EOL> os . path . join ( directory , "<STR_LIT>" ) : <EOL> """<STR_LIT>""" , <EOL> } <EOL> for filename , content in data . iteritems ( ) : <EOL> f = open ( filename , "<STR_LIT:w>" ) <EOL> f . write ( content + "<STR_LIT:\n>" ) <EOL> f . close ( ) <EOL> PCLReferenceAssembliesPackage ( ) </s>
