(self, option_order)
return any_display_options
If there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
If there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
If there were any non - global display - only options ( -- help - commands or the metadata display options ) on the command line display the requested info and return true ; else return false .
def handle_display_options(self, option_order):
        """If there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
        """
        from distutils.core import gen_usage

        # User just wants a list of commands -- we'll print it out and stop
        # processing now (ie. if they ran "setup --help-commands foo bar",
        # we ignore "foo bar").
        if self.help_commands:
            self.print_commands()
            print('')
            print(gen_usage(self.script_name))
            return 1

        # If user supplied any of the "display metadata" options, then
        # display that metadata in the order in which the user supplied the
        # metadata options.
        any_display_options = 0
        is_display_option = {}
        for option in self.display_options:
            is_display_option[option[0]] = 1

        for (opt, val) in option_order:
            if val and is_display_option.get(opt):
                opt = translate_longopt(opt)
                value = getattr(self.metadata, "get_"+opt)()
                if opt in ['keywords', 'platforms']:
                    print(','.join(value))
                elif opt in ('classifiers', 'provides', 'requires',
                             'obsoletes'):
                    print('\n'.join(value))
                else:
                    print(value)
                any_display_options = 1

        return any_display_options
def handle_display_options ( self , option_order ) : from distutils . core import gen_usage # User just wants a list of commands -- we'll print it out and stop # processing now (ie. if they ran "setup --help-commands foo bar", # we ignore "foo bar"). if self . help_commands : self . print_commands ( ) print ( '' ) print ( gen_usage ( self . script_name ) ) return 1 # If user supplied any of the "display metadata" options, then # display that metadata in the order in which the user supplied the # metadata options. any_display_options = 0 is_display_option = { } for option in self . display_options : is_display_option [ option [ 0 ] ] = 1 for ( opt , val ) in option_order : if val and is_display_option . get ( opt ) : opt = translate_longopt ( opt ) value = getattr ( self . metadata , "get_" + opt ) ( ) if opt in [ 'keywords' , 'platforms' ] : print ( ',' . join ( value ) ) elif opt in ( 'classifiers' , 'provides' , 'requires' , 'obsoletes' ) : print ( '\n' . join ( value ) ) else : print ( value ) any_display_options = 1 return any_display_options