<s> import os <EOL> import shutil <EOL> from . app import app <EOL> class tvos ( app ) : <EOL> description = "<STR_LIT>" <EOL> def finalize_options ( self ) : <EOL> finalized = self . get_finalized_command ( '<STR_LIT>' ) <EOL> for attr in ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) : <EOL> if getattr ( self , attr ) is None : <EOL> setattr ( self , attr , getattr ( finalized , attr ) ) <EOL> self . platform = '<STR_LIT>' <EOL> self . support_project = "<STR_LIT>" <EOL> if self . dir is None : <EOL> self . dir = self . platform <EOL> self . resource_dir = self . dir <EOL> def install_icon ( self ) : <EOL> for size , description in [ ( '<STR_LIT>' , '<STR_LIT>' ) , ( '<STR_LIT>' , '<STR_LIT>' ) ] : <EOL> for layer in [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] : <EOL> icon_file = '<STR_LIT>' % ( self . icon , size , layer . lower ( ) ) <EOL> if not os . path . exists ( icon_file ) : <EOL> icon_file = '<STR_LIT>' % ( self . icon , size ) <EOL> if os . path . exists ( icon_file ) : <EOL> shutil . copyfile ( <EOL> icon_file , <EOL> os . path . join ( <EOL> self . resource_dir , <EOL> self . distribution . get_name ( ) , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' % description , <EOL> '<STR_LIT>' % size , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' % description . lower ( ) ) <EOL> ) <EOL> else : <EOL> print ( "<STR_LIT>" % ( description . lower ( ) , layer . lower ( ) ) ) <EOL> shelf_file = '<STR_LIT>' % self . splash <EOL> if os . path . exists ( shelf_file ) : <EOL> shutil . copyfile ( <EOL> icon_file , <EOL> os . path . join ( <EOL> self . resource_dir , <EOL> self . distribution . get_name ( ) , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> ) <EOL> else : <EOL> print ( "<STR_LIT>" ) <EOL> def install_splash ( self ) : <EOL> try : <EOL> splash_file = '<STR_LIT>' % self . splash <EOL> shutil . copyfile ( <EOL> splash_file , <EOL> os . path . join ( self . resource_dir , self . distribution . get_name ( ) , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> ) <EOL> except KeyError : <EOL> print ( "<STR_LIT>" ) </s>
