def setup_parser_common(parser):
from rez.build_process_ import get_build_process_types<EOL>from rez.build_system import get_valid_build_systems<EOL>process_types = get_build_process_types()<EOL>parser.add_argument(<EOL>"<STR_LIT>", type=str, choices=process_types, default="<STR_LIT>",<EOL>help="<STR_LIT>")<EOL>package = get_current_developer_package()<EOL>clss = get_valid_build_systems(os.getcwd(), package=package)<EOL>if clss:<EOL><INDENT>if len(clss) == <NUM_LIT:1>:<EOL><INDENT>cls_ = clss[<NUM_LIT:0>]<EOL>title = "<STR_LIT>" % cls_.name()<EOL>group = parser.add_argument_group(title)<EOL>cls_.bind_cli(parser, group)<EOL><DEDENT>types = [x.name() for x in clss]<EOL><DEDENT>else:<EOL><INDENT>types = None<EOL><DEDENT>parser.add_argument(<EOL>"<STR_LIT>", "<STR_LIT>", dest="<STR_LIT>", choices=types,<EOL>help="<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>")<EOL>parser.add_argument(<EOL>"<STR_LIT>", nargs='<STR_LIT:+>', type=int, metavar="<STR_LIT>",<EOL>help="<STR_LIT>")<EOL>parser.add_argument(<EOL>"<STR_LIT>", "<STR_LIT>", dest="<STR_LIT>", metavar="<STR_LIT>",<EOL>help="<STR_LIT>"<EOL>"<STR_LIT>")<EOL>parser.add_argument(<EOL>"<STR_LIT>", "<STR_LIT>", dest="<STR_LIT>", metavar="<STR_LIT>",<EOL>help="<STR_LIT>"<EOL>"<STR_LIT>")<EOL>
Parser setup common to both rez-build and rez-release.