(subparsers)
return p
Parser for install command
Parser for install command
Parser for install command
def subparser(subparsers):
    """Parser for install command"""
    p = subparsers.add_parser('dependencies',
                              aliases=['deps'],
                              description="Manage dependencies",
                              help='Manage dependencies',
                              formatter_class=ArgumentDefaultsHelpFormatter)

    p.set_defaults(func=_print_help)
    p.add_argument("-y",
                   "--yes",
                   action='store_true',
                   default=False,
                   help="Non-interactive mode. Answers \"yes\" automatically \
                   to binary package installation prompts")
    p.add_argument("--dry-run",
                   action='store_true',
                   default=False,
                   help="Print all commands but do not execute them")

    subsubp = p.add_subparsers(title='subcommands', help='Target sub-command')

    p1 = subsubp.add_parser('install',
                            description="Install software dependencies",
                            help='Install software dependencies')
    p1.add_argument("--target",
                    choices=list(target_map.keys()),
                    default=None,
                    help="Target setup type for installation of dependencies")
    p1.add_argument("--btc",
                    action='store_true',
                    default=False,
                    help="Install bitcoin-satellite")
    p1.set_defaults(func=run, update=False)

    p2 = subsubp.add_parser('update',
                            aliases=['upgrade'],
                            description="Update software dependencies",
                            help='Update software dependencies')
    p2.add_argument("--target",
                    choices=list(target_map.keys()),
                    default=None,
                    help="Target setup type for the update of dependencies")
    p2.add_argument("--btc",
                    action='store_true',
                    default=False,
                    help="Update bitcoin-satellite")
    p2.set_defaults(func=run, update=True)

    p3 = subsubp.add_parser('tbs-drivers',
                            description="Install TBS USB receiver drivers",
                            help='Install TBS USB receiver drivers')
    p3.set_defaults(func=drivers)

    return p
def subparser ( subparsers ) : p = subparsers . add_parser ( 'dependencies' , aliases = [ 'deps' ] , description = "Manage dependencies" , help = 'Manage dependencies' , formatter_class = ArgumentDefaultsHelpFormatter ) p . set_defaults ( func = _print_help ) p . add_argument ( "-y" , "--yes" , action = 'store_true' , default = False , help = "Non-interactive mode. Answers \"yes\" automatically \
                   to binary package installation prompts" ) p . add_argument ( "--dry-run" , action = 'store_true' , default = False , help = "Print all commands but do not execute them" ) subsubp = p . add_subparsers ( title = 'subcommands' , help = 'Target sub-command' ) p1 = subsubp . add_parser ( 'install' , description = "Install software dependencies" , help = 'Install software dependencies' ) p1 . add_argument ( "--target" , choices = list ( target_map . keys ( ) ) , default = None , help = "Target setup type for installation of dependencies" ) p1 . add_argument ( "--btc" , action = 'store_true' , default = False , help = "Install bitcoin-satellite" ) p1 . set_defaults ( func = run , update = False ) p2 = subsubp . add_parser ( 'update' , aliases = [ 'upgrade' ] , description = "Update software dependencies" , help = 'Update software dependencies' ) p2 . add_argument ( "--target" , choices = list ( target_map . keys ( ) ) , default = None , help = "Target setup type for the update of dependencies" ) p2 . add_argument ( "--btc" , action = 'store_true' , default = False , help = "Update bitcoin-satellite" ) p2 . set_defaults ( func = run , update = True ) p3 = subsubp . add_parser ( 'tbs-drivers' , description = "Install TBS USB receiver drivers" , help = 'Install TBS USB receiver drivers' ) p3 . set_defaults ( func = drivers ) return p