Example #1
0
def configure_parser(sub_parsers):
    p = sub_parsers.add_parser(
        "list",
        description=descr,
        help=descr,
        formatter_class=RawDescriptionHelpFormatter,
        epilog=examples,
        add_help=False,
    )
    common.add_parser_help(p)
    common.add_parser_prefix(p)
    common.add_parser_json(p)
    common.add_parser_show_channel_urls(p)
    p.add_argument(
        "-c", "--canonical", action="store_true", help="Output canonical names of packages only. Implies --no-pip. "
    )
    p.add_argument("-f", "--full-name", action="store_true", help="Only search for full names, i.e., ^<regex>$.")
    p.add_argument(
        "-e",
        "--export",
        action="store_true",
        help="""Output requirement string only (output may be used by conda create
                  --file).""",
    )
    p.add_argument("-r", "--revisions", action="store_true", help="List the revision history and exit.")
    p.add_argument(
        "--no-pip", action="store_false", default=True, dest="pip", help="Do not include pip-only installed packages."
    )
    p.add_argument("regex", action="store", nargs="?", help="List only packages matching this regular expression.")
    p.set_defaults(func=execute)
Example #2
0
def configure_parser(sub_parsers):
    p = sub_parsers.add_parser(
        'list',
        description=descr,
        help=descr,
        formatter_class=RawDescriptionHelpFormatter,
        epilog=examples,
        add_help=False,
    )
    common.add_parser_help(p)
    common.add_parser_prefix(p)
    common.add_parser_json(p)
    common.add_parser_show_channel_urls(p)
    p.add_argument(
        '-c',
        "--canonical",
        action="store_true",
        help="Output canonical names of packages only. Implies --no-pip. ",
    )
    p.add_argument(
        '-f',
        "--full-name",
        action="store_true",
        help="Only search for full names, i.e., ^<regex>$.",
    )
    p.add_argument(
        "--explicit",
        action="store_true",
        help="List explicitly all installed conda packaged with URL "
        "(output may be used by conda create --file).",
    )
    p.add_argument(
        '-e',
        "--export",
        action="store_true",
        help="Output requirement string only (output may be used by "
        " conda create --file).",
    )
    p.add_argument(
        '-r',
        "--revisions",
        action="store_true",
        help="List the revision history and exit.",
    )
    p.add_argument("--no-pip",
                   action="store_false",
                   default=True,
                   dest="pip",
                   help="Do not include pip-only installed packages.")
    p.add_argument(
        'regex',
        action="store",
        nargs="?",
        help="List only packages matching this regular expression.",
    )
    p.set_defaults(func=execute)