@staticmethod
def setup_subparser(parser, cmd=None):
    """
        Set up a subparser for 'install'
        """
    group = parser.add_argument_group('Install arguments' if cmd ==
        'install' else 'Update arguments')
    group.add_argument('packages', help=
        'List of packages to install/update', action='append', default=[],
        nargs='*', metavar='PACKAGES')
    group.add_argument('--print-tree', help='Print dependency tree', action
        ='store_true')
    group.add_argument('--no-deps', help=
        'Skip dependencies (may cause builds to fail!)', action='store_true')
    group.add_argument('--verify', help='Verify installs were successful',
        action='store_true')
    if cmd == 'install':
        group.add_argument('--static', help=
            'Build package(s) statically (implies source build)', action=
            'store_true')
        group.add_argument('--deps-only', help=
            'Only install the dependencies, not the requested packages',
            action='store_true')
        group.add_argument('-u', '--update', help=
            'If packages are already installed, update them instead.',
            action='store_true')
    elif cmd == 'update':
        group.add_argument('-a', '--all', help=
            'Update all packages installed to current prefix, including dependencies.'
            , action='store_true')
