def configure_parser(sub_parsers, name="remove"):
    p = sub_parsers.add_parser(
        name,
        formatter_class=RawDescriptionHelpFormatter,
        description=descr % name,
        help=help % name,
        epilog=example % name,
    )
    common.add_parser_yes(p)
    common.add_parser_json(p)
    p.add_argument("--all", action="store_true", help="%s all packages, i.e. the entire environment" % name)
    p.add_argument("--features", action="store_true", help="%s features (instead of packages)" % name)
    common.add_parser_no_pin(p)
    common.add_parser_channels(p)
    common.add_parser_prefix(p)
    common.add_parser_quiet(p)
    common.add_parser_use_index_cache(p)
    common.add_parser_use_local(p)
    common.add_parser_offline(p)
    p.add_argument(
        "--force-pscheck",
        action="store_true",
        help=("force removal (when package process is running)" if config.platform == "win" else argparse.SUPPRESS),
    )
    p.add_argument(
        "package_names",
        metavar="package_name",
        action="store",
        nargs="*",
        help="package names to %s from environment" % name,
    ).completer = common.InstalledPackages
    p.set_defaults(func=execute)
Beispiel #2
0
def configure_parser(sub_parsers, name='remove'):
    if name == 'remove':
        p = sub_parsers.add_parser(
            name,
            formatter_class=RawDescriptionHelpFormatter,
            description=descr % name.capitalize(),
            help=help % name.capitalize(),
            epilog=example % name,
            add_help=False,
        )
    else:
        p = sub_parsers.add_parser(
            name,
            formatter_class=RawDescriptionHelpFormatter,
            description=uninstall_help,
            help=uninstall_help,
            epilog=example % name,
            add_help=False,
        )
    common.add_parser_help(p)
    common.add_parser_yes(p)
    common.add_parser_json(p)
    p.add_argument(
        "--all",
        action="store_true",
        help="%s all packages, i.e., the entire environment." %
        name.capitalize(),
    )
    p.add_argument(
        "--features",
        action="store_true",
        help="%s features (instead of packages)." % name.capitalize(),
    )
    p.add_argument(
        "--force",
        action="store_true",
        help=
        "Forces removal of a package without removing packages that depend on it. "
        "Using this option will usually leave your environment in a broken and "
        "inconsistent state.",
    )
    common.add_parser_no_pin(p)
    common.add_parser_channels(p)
    common.add_parser_prefix(p)
    common.add_parser_quiet(p)
    # Putting this one first makes it the default
    common.add_parser_no_use_index_cache(p)
    common.add_parser_use_index_cache(p)
    common.add_parser_use_local(p)
    common.add_parser_offline(p)
    common.add_parser_pscheck(p)
    p.add_argument(
        'package_names',
        metavar='package_name',
        action="store",
        nargs='*',
        help="Package names to %s from the environment." % name,
    ).completer = common.InstalledPackages
    p.set_defaults(func=execute)
Beispiel #3
0
def configure_parser(sub_parsers):
    p = sub_parsers.add_parser(
        'search',
        description=descr,
        help=descr,
        epilog=example,
    )
    common.add_parser_prefix(p)
    p.add_argument(
        "--canonical",
        action="store_true",
        help="Output canonical names of packages only.",
    )
    p.add_argument(
        '-f', "--full-name",
        action="store_true",
        help="Only search for full name, ie. ^<regex>$.",
    )
    p.add_argument(
        "--names-only",
        action="store_true",
        help="Output only package names.",
    )
    common.add_parser_known(p)
    common.add_parser_use_index_cache(p)
    p.add_argument(
        '-o', "--outdated",
        action="store_true",
        help="Only display installed but outdated packages.",
    )
    p.add_argument(
        '--platform',
        action='store',
        dest='platform',
        help="""Search the given platform. Should be formatted like 'osx-64', 'linux-32',
        'win-64', and so on. The default is to search the current platform.""",
        choices=Platforms(),
        default=None,
        )
    p.add_argument(
        "--spec",
        action="store_true",
        help="""Treat the regex argument as a package specification instead
        (package_name[=version[=build]]).""",
    )
    p.add_argument(
        'regex',
        metavar='regex',
        action="store",
        nargs="?",
        help="""Package specification or regular expression to search for (default: display
        all packages).""",
    ).completer = common.Packages
    common.add_parser_offline(p)
    common.add_parser_channels(p)
    common.add_parser_json(p)
    common.add_parser_use_local(p)
    p.set_defaults(func=execute)
Beispiel #4
0
def configure_parser(sub_parsers, name='remove'):
    if name == 'remove':
        p = sub_parsers.add_parser(
            name,
            formatter_class=RawDescriptionHelpFormatter,
            description=descr % name.capitalize(),
            help=help % name.capitalize(),
            epilog=example % name,
            add_help=False,
        )
    else:
        p = sub_parsers.add_parser(
            name,
            formatter_class=RawDescriptionHelpFormatter,
            description=uninstall_help,
            help=uninstall_help,
            epilog=example % name,
            add_help=False,
        )
    common.add_parser_help(p)
    common.add_parser_yes(p)
    common.add_parser_json(p)
    p.add_argument(
        "--all",
        action="store_true",
        help="%s all packages, i.e., the entire environment." % name.capitalize(),
    )
    p.add_argument(
        "--features",
        action="store_true",
        help="%s features (instead of packages)." % name.capitalize(),
    )
    p.add_argument(
        "--force",
        action="store_true",
        help="Forces removal of a package without removing packages that depend on it. "
             "Using this option will usually leave your environment in a broken and "
             "inconsistent state.",
    )
    common.add_parser_no_pin(p)
    common.add_parser_channels(p)
    common.add_parser_prefix(p)
    common.add_parser_quiet(p)
    # Putting this one first makes it the default
    common.add_parser_no_use_index_cache(p)
    common.add_parser_use_index_cache(p)
    common.add_parser_use_local(p)
    common.add_parser_offline(p)
    common.add_parser_pscheck(p)
    p.add_argument(
        'package_names',
        metavar='package_name',
        action="store",
        nargs='*',
        help="Package names to %s from the environment." % name,
    ).completer = common.InstalledPackages
    p.set_defaults(func=execute)
Beispiel #5
0
def configure_parser(sub_parsers):
    p = sub_parsers.add_parser(
        'search',
        formatter_class=RawDescriptionHelpFormatter,
        description=descr,
        help=descr,
        epilog=example,
    )
    common.add_parser_prefix(p)
    p.add_argument(
        "--canonical",
        action="store_true",
        help="output canonical names of packages only",
    )
    common.add_parser_known(p)
    common.add_parser_use_index_cache(p)
    p.add_argument(
        '-o',
        "--outdated",
        action="store_true",
        help="only display installed but outdated packages",
    )
    p.add_argument(
        '-v',
        "--verbose",
        action="store_true",
        help="Show available packages as blocks of data",
    )
    p.add_argument(
        '--platform',
        action='store',
        dest='platform',
        help=
        """Search the given platform. Should be formatted like 'osx-64', 'linux-32',
        'win-64', and so on. The default is to search the current platform.""",
        choices=Platforms(),
        default=None,
    )
    p.add_argument(
        "--spec",
        action="store_true",
        help="Treat regex argument as a package specification instead "
        "(package_name[=version[=build]])",
    )
    p.add_argument(
        'regex',
        action="store",
        nargs="?",
        help="package specification or regular expression to search for "
        "(default: display all packages)",
    )
    common.add_parser_channels(p)
    common.add_parser_json(p)
    common.add_parser_use_local(p)
    p.set_defaults(func=execute)
Beispiel #6
0
def configure_parser(sub_parsers, name='remove'):
    if name == 'remove':
        p = sub_parsers.add_parser(
            name,
            formatter_class=RawDescriptionHelpFormatter,
            description=descr % name.capitalize(),
            help=help % name.capitalize(),
            epilog=example % name,
            add_help=False,
        )
    else:
        p = sub_parsers.add_parser(
            name,
            formatter_class=RawDescriptionHelpFormatter,
            description=uninstall_help,
            help=uninstall_help,
            epilog=example % name,
            add_help=False,
        )
    common.add_parser_help(p)
    common.add_parser_yes(p)
    common.add_parser_json(p)
    p.add_argument(
        "--all",
        action="store_true",
        help="%s all packages, i.e., the entire environment." % name.capitalize(),
    )
    p.add_argument(
        "--features",
        action="store_true",
        help="%s features (instead of packages)." % name.capitalize(),
    )
    common.add_parser_no_pin(p)
    common.add_parser_channels(p)
    common.add_parser_prefix(p)
    common.add_parser_quiet(p)
    common.add_parser_use_index_cache(p)
    common.add_parser_use_local(p)
    common.add_parser_offline(p)
    p.add_argument(
        "--force-pscheck",
        action="store_true",
        help=("Force removal (when package process is running) (deprecated)"
              if config.platform == 'win' else argparse.SUPPRESS)
    )
    p.add_argument(
        'package_names',
        metavar='package_name',
        action="store",
        nargs='*',
        help="Package names to %s from the environment." % name,
    ).completer = common.InstalledPackages
    p.set_defaults(func=execute)
Beispiel #7
0
def configure_parser(sub_parsers, name='remove'):
    if name == 'remove':
        p = sub_parsers.add_parser(
            name,
            formatter_class=RawDescriptionHelpFormatter,
            description=descr % name.capitalize(),
            help=help % name.capitalize(),
            epilog=example % name,
            add_help=False,
        )
    else:
        p = sub_parsers.add_parser(
            name,
            formatter_class=RawDescriptionHelpFormatter,
            description=uninstall_help,
            help=uninstall_help,
            epilog=example % name,
            add_help=False,
        )
    common.add_parser_help(p)
    common.add_parser_yes(p)
    common.add_parser_json(p)
    p.add_argument(
        "--all",
        action="store_true",
        help="%s all packages, i.e., the entire environment." %
        name.capitalize(),
    )
    p.add_argument(
        "--features",
        action="store_true",
        help="%s features (instead of packages)." % name.capitalize(),
    )
    common.add_parser_no_pin(p)
    common.add_parser_channels(p)
    common.add_parser_prefix(p)
    common.add_parser_quiet(p)
    common.add_parser_use_index_cache(p)
    common.add_parser_use_local(p)
    common.add_parser_offline(p)
    p.add_argument(
        "--force-pscheck",
        action="store_true",
        help=("Force removal (when package process is running) (deprecated)"
              if config.platform == 'win' else argparse.SUPPRESS))
    p.add_argument(
        'package_names',
        metavar='package_name',
        action="store",
        nargs='*',
        help="Package names to %s from the environment." % name,
    ).completer = common.InstalledPackages
    p.set_defaults(func=execute)
Beispiel #8
0
def configure_parser(sub_parsers):
    p = sub_parsers.add_parser(
        'search',
        formatter_class = RawDescriptionHelpFormatter,
        description = descr,
        help = descr,
        epilog = example,
    )
    common.add_parser_prefix(p)
    p.add_argument(
        "--canonical",
        action  = "store_true",
        help    = "output canonical names of packages only",
    )
    common.add_parser_known(p)
    common.add_parser_use_index_cache(p)
    p.add_argument(
        '-o', "--outdated",
        action  = "store_true",
        help    = "only display installed but outdated packages",
    )
    p.add_argument(
        '-v', "--verbose",
        action  = "store_true",
        help    = "Show available packages as blocks of data",
    )
    p.add_argument(
        '--platform',
        action='store',
        dest='platform',
        help="""Search the given platform. Should be formatted like 'osx-64', 'linux-32',
        'win-64', and so on. The default is to search the current platform.""",
        choices=Platforms(),
        default=None,
        )
    p.add_argument(
        "--spec",
        action  = "store_true",
        help    = "Treat regex argument as a package specification instead "
                  "(package_name[=version[=build]])",
    )
    p.add_argument(
        'regex',
        action  = "store",
        nargs   = "?",
        help    = "package specification or regular expression to search for "
                  "(default: display all packages)",
    )
    common.add_parser_channels(p)
    common.add_parser_json(p)
    common.add_parser_use_local(p)
    p.set_defaults(func=execute)
Beispiel #9
0
def configure_parser(sub_parsers):
    p = sub_parsers.add_parser(
        'remove',
        formatter_class = RawDescriptionHelpFormatter,
        description = descr,
        help = help,
        epilog = example,
    )
    common.add_parser_yes(p)
    common.add_parser_json(p)
    p.add_argument(
        "--all",
        action = "store_true",
        help = "remove all packages, i.e. the entire environment",
    )
    p.add_argument(
        "--features",
        action = "store_true",
        help = "remove features (instead of packages)",
    )
    common.add_parser_no_pin(p)
    common.add_parser_channels(p)
    common.add_parser_prefix(p)
    common.add_parser_quiet(p)
    common.add_parser_use_index_cache(p)
    common.add_parser_use_local(p)
    p.add_argument(
        "--force-pscheck",
        action = "store_true",
        help = ("force removal (when package process is running)"
                if config.platform == 'win' else argparse.SUPPRESS)
    )
    p.add_argument(
        'package_names',
        metavar = 'package_name',
        action = "store",
        nargs = '*',
        help = "package names to remove from environment",
    )
    p.set_defaults(func=execute)
Beispiel #10
0
def configure_parser(sub_parsers):
    p = sub_parsers.add_parser(
        'remove',
        formatter_class=RawDescriptionHelpFormatter,
        description=descr,
        help=help,
        epilog=example,
    )
    common.add_parser_yes(p)
    common.add_parser_json(p)
    p.add_argument(
        "--all",
        action="store_true",
        help="remove all packages, i.e. the entire environment",
    )
    p.add_argument(
        "--features",
        action="store_true",
        help="remove features (instead of packages)",
    )
    common.add_parser_no_pin(p)
    common.add_parser_channels(p)
    common.add_parser_prefix(p)
    common.add_parser_quiet(p)
    common.add_parser_use_index_cache(p)
    common.add_parser_use_local(p)
    p.add_argument("--force-pscheck",
                   action="store_true",
                   help=("force removal (when package process is running)"
                         if config.platform == 'win' else argparse.SUPPRESS))
    p.add_argument(
        'package_names',
        metavar='package_name',
        action="store",
        nargs='*',
        help="package names to remove from environment",
    )
    p.set_defaults(func=execute)
Beispiel #11
0
        help="%s features (instead of packages)" % name,
>>>>>>> origin/feature/instruction-arguments
=======
        help="%s features (instead of packages)" % name,
>>>>>>> princeofdarkness76/feature/instruction-arguments
=======
        help="%s features (instead of packages)" % name,
>>>>>>> origin/feature/instruction-arguments
    )
    common.add_parser_no_pin(p)
    common.add_parser_channels(p)
    common.add_parser_prefix(p)
    common.add_parser_quiet(p)
    # Putting this one first makes it the default
    common.add_parser_no_use_index_cache(p)
    common.add_parser_use_index_cache(p)
    common.add_parser_use_local(p)
    common.add_parser_offline(p)
<<<<<<< HEAD
    common.add_parser_pscheck(p)
=======
    p.add_argument(
        "--force-pscheck",
        action="store_true",
        help=("force removal (when package process is running)"
                if config.platform == 'win' else argparse.SUPPRESS)
    )
>>>>>>> conda/feature/instruction-arguments
    p.add_argument(
        'package_names',
        metavar='package_name',
Beispiel #12
0
def configure_parser(sub_parsers):
    p = sub_parsers.add_parser(
        'search',
        description=descr,
        help=descr,
        epilog=example,
    )
    common.add_parser_prefix(p)
    p.add_argument(
        "--canonical",
        action="store_true",
        help="Output canonical names of packages only.",
    )
    p.add_argument(
        '-f', "--full-name",
        action="store_true",
        help="Only search for full name, ie. ^<regex>$.",
    )
    p.add_argument(
        "--names-only",
        action="store_true",
        help="Output only package names.",
    )
    common.add_parser_known(p)
    common.add_parser_use_index_cache(p)
    p.add_argument(
        '-o', "--outdated",
        action="store_true",
        help="Only display installed but outdated packages.",
    )
    p.add_argument(
        '--platform',
        action='store',
        dest='platform',
        help="""Search the given platform. Should be formatted like 'osx-64', 'linux-32',
        'win-64', and so on. The default is to search the current platform.""",
        choices=Platforms(),
        default=None,
        )
    p.add_argument(
        "--spec",
        action="store_true",
        help="""Treat the regex argument as a package specification instead
        (package_name[=version[=build]]).""",
    )
    p.add_argument(
        "--reverse-dependency",
        action="store_true",
        help="""Perform a reverse dependency search. When using this flag, the --full-name
flag is recommended. Use 'conda info package' to see the dependencies of a
package.""",
    )
    p.add_argument(
        'regex',
        metavar='regex',
        action="store",
        nargs="?",
        help="""Package specification or Python regular expression to search for (default: display
        all packages).""",
    ).completer = common.Packages
    common.add_parser_offline(p)
    common.add_parser_channels(p)
    common.add_parser_json(p)
    common.add_parser_use_local(p)
    p.set_defaults(func=execute)