def build_parser():
 parser = optparse.OptionParser(add_help_option=False)
 option_factories = (SUPPORTED_OPTIONS + SUPPORTED_OPTIONS_REQ)
 for option_factory in option_factories:
  option = option_factory()
  parser.add_option(option)
 def parser_exit(self, msg):
  raise RequirementsFileParseError(msg)
 parser.exit = parser_exit
 return parser

def build_parser ( ) : parser = optparse . OptionParser ( add_help_option = False ) option_factories = ( SUPPORTED_OPTIONS + SUPPORTED_OPTIONS_REQ ) for option_factory in option_factories : option = option_factory ( ) parser . add_option ( option ) def parser_exit ( self , msg ) : raise RequirementsFileParseError ( msg ) parser . exit = parser_exit return parser
return a parser for parsing requirement lines .