<s> """<STR_LIT>""" <EOL> __revision__ = "<STR_LIT>" <EOL> import os <EOL> from distutils . core import Command <EOL> from distutils import log <EOL> from stat import ST_MODE <EOL> class install_scripts ( Command ) : <EOL> description = "<STR_LIT>" <EOL> user_options = [ <EOL> ( '<STR_LIT>' , '<STR_LIT:d>' , "<STR_LIT>" ) , <EOL> ( '<STR_LIT>' , '<STR_LIT:b>' , "<STR_LIT>" ) , <EOL> ( '<STR_LIT>' , '<STR_LIT:f>' , "<STR_LIT>" ) , <EOL> ( '<STR_LIT>' , None , "<STR_LIT>" ) , <EOL> ] <EOL> boolean_options = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> def initialize_options ( self ) : <EOL> self . install_dir = None <EOL> self . force = <NUM_LIT:0> <EOL> self . build_dir = None <EOL> self . skip_build = None <EOL> def finalize_options ( self ) : <EOL> self . set_undefined_options ( '<STR_LIT>' , ( '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> self . set_undefined_options ( '<STR_LIT>' , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ) <EOL> def run ( self ) : <EOL> if not self . skip_build : <EOL> self . run_command ( '<STR_LIT>' ) <EOL> self . outfiles = self . copy_tree ( self . build_dir , self . install_dir ) <EOL> if hasattr ( os , '<STR_LIT>' ) : <EOL> for file in self . get_outputs ( ) : <EOL> if self . dry_run : <EOL> log . info ( "<STR_LIT>" , file ) <EOL> else : <EOL> mode = ( ( os . stat ( file ) [ ST_MODE ] ) | <NUM_LIT:0> <NUM_LIT> ) & <NUM_LIT:0> <NUM_LIT> <EOL> log . info ( "<STR_LIT>" , file , mode ) <EOL> os . chmod ( file , mode ) <EOL> def get_inputs ( self ) : <EOL> return self . distribution . scripts or [ ] <EOL> def get_outputs ( self ) : <EOL> return self . outfiles or [ ] </s>
