def setoption(parser, metadata=None):
    """Set argument parser option."""
    parser.add_argument('-v', action='version',
                        version=__version__)
    subparsers = parser.add_subparsers(help='sub commands help')
    create_cmd = subparsers.add_parser('create')
    create_cmd.add_argument('name',
                            help='Specify Python package name.')
    create_cmd.add_argument('-d', dest='description', action='store',
                            help='Short description about your package.')
    create_cmd.add_argument('-a', dest='author', action='store',
                            required=True,
                            help='Python package author name.')
    create_cmd.add_argument('-e', dest='email', action='store',
                            required=True,
                            help='Python package author email address.')
    create_cmd.add_argument('-l', dest='license',
                            choices=metadata.licenses().keys(),
                            default='GPLv3+',
                            help='Specify license. (default: %(default)s)')
    create_cmd.add_argument('-s', dest='status',
                            choices=metadata.status().keys(),
                            default='Alpha',
                            help=('Specify development status. '
                                  '(default: %(default)s)'))
    create_cmd.add_argument('--no-check', action='store_true',
                            help='No checking package name in PyPI.')
    create_cmd.add_argument('--with-samples', action='store_true',
                            help='Generate package with sample code.')
    group = create_cmd.add_mutually_exclusive_group(required=True)
    group.add_argument('-U', dest='username', action='store',
                       help='Specify GitHub username.')
    group.add_argument('-u', dest='url', action='store', type=valid_url,
                       help='Python package homepage url.')
    create_cmd.add_argument('-o', dest='outdir', action='store',
                            default=os.path.abspath(os.path.curdir),
                            help='Specify output directory. (default: $PWD)')
    list_cmd = subparsers.add_parser('list')
    list_cmd.add_argument('-l', dest='licenses', action='store_true',
                          help='show license choices.')