예제 #1
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)
    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_channels(p)
    common.add_parser_prefix(p)
    common.add_parser_quiet(p)
    p.add_argument(
        'package_names',
        metavar='package_name',
        action="store",
        nargs='*',
        help="package names to remove from environment",
    )
    p.set_defaults(func=execute)
예제 #2
0
파일: main_create.py 프로젝트: dmj111/conda
def configure_parser(sub_parsers):
    p = sub_parsers.add_parser(
        'create',
        formatter_class = RawDescriptionHelpFormatter,
        description = descr,
        help = descr,
        epilog  = example,
    )
    common.add_parser_yes(p)
    p.add_argument(
        '-f', "--file",
        action = "store",
        help = "filename to read package specs from",
    )
    common.add_parser_channels(p)
    common.add_parser_prefix(p)
    common.add_parser_quiet(p)
    p.add_argument(
        'package_specs',
        metavar = 'package_spec',
        action = "store",
        nargs = '*',
        help = "specification of package to install into new environment",
    )
    p.set_defaults(func=execute)
예제 #3
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)
    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_channels(p)
    common.add_parser_prefix(p)
    common.add_parser_quiet(p)
    p.add_argument(
        'package_names',
        metavar = 'package_name',
        action = "store",
        nargs = '*',
        help = "package names to remove from environment",
    )
    p.set_defaults(func=execute)
예제 #4
0
파일: main_run.py 프로젝트: mrstu/conda
def configure_parser(sub_parsers):
    p = sub_parsers.add_parser(
        'run',
        description=descr,
        help=descr,
        epilog=examples,
    )
    common.add_parser_prefix(p)
    common.add_parser_quiet(p)
    common.add_parser_json(p)
    p.add_argument(
        'package',
        metavar='COMMAND',
        action="store",
        nargs='?',
        help="Package to launch."
    )
    p.add_argument(
        'arguments',
        metavar='ARGUMENTS',
        action='store',
        nargs='*',
        help="Additional arguments to application."
    )
    p.set_defaults(func=execute)
예제 #5
0
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)
예제 #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(),
    )
    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)
예제 #7
0
파일: main_remove.py 프로젝트: artemh/conda
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)
예제 #8
0
def configure_parser(sub_parsers):
    p = sub_parsers.add_parser(
        'install',
        formatter_class = RawDescriptionHelpFormatter,
        description = descr,
        help = help,
        epilog = example,
    )
    common.add_parser_yes(p)
    p.add_argument(
        '-f', "--force",
        action = "store_true",
        help = "force install (even when package already installed), "
               "implies --no-deps",
    )
    p.add_argument(
        "--file",
        action = "store",
        help = "read package versions from FILE",
    )
    p.add_argument(
        "--no-deps",
        action = "store_true",
        help = "do not install dependencies",
    )
    p.add_argument(
        '-m', "--mkdir",
        action = "store_true",
        help = "create prefix directory if necessary",
    )
    p.add_argument(
        "--no-pip",
        action = "store_false",
        default=True,
        dest="pip",
        help = "do not use pip to install if conda fails",
    )
    p.add_argument(
        "--use-local",
        action="store_true",
        default=False,
        dest='use_local',
        help = "use locally built packages",
    )
    common.add_parser_channels(p)
    common.add_parser_prefix(p)
    common.add_parser_quiet(p)
    p.add_argument(
        'packages',
        metavar = 'package_spec',
        action = "store",
        nargs = '*',
        help = "package versions to install into conda environment",
    )
    p.set_defaults(func=execute)
예제 #9
0
파일: main_remove.py 프로젝트: mrstu/conda
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)
예제 #10
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)
예제 #11
0
def configure_parser(sub_parsers):
    p = sub_parsers.add_parser(
        'remove',
        formatter_class=RawDescriptionHelpFormatter,
        description=_description,
        help=_help,
        epilog=_example,
    )

    common.add_parser_prefix(p)
    common.add_parser_json(p)
    common.add_parser_quiet(p)
    common.add_parser_yes(p)

    p.set_defaults(func=execute)
예제 #12
0
def configure_parser(sub_parsers):
    p = sub_parsers.add_parser(
        'remove',
        formatter_class=RawDescriptionHelpFormatter,
        description=_description,
        help=_help,
        epilog=_example,
    )

    common.add_parser_prefix(p)
    common.add_parser_json(p)
    common.add_parser_quiet(p)
    common.add_parser_yes(p)

    p.set_defaults(func=execute)
예제 #13
0
def configure_parser():
    p = ArgumentParser(
        'analysispackage',
        description="analysis package",
    )
    cxgroup = p.add_mutually_exclusive_group()
    cxgroup.add_argument('-c',
                         "--create",
                         action="store_true",
                         help="create analysis package")
    cxgroup.add_argument('-x',
                         "--extract",
                         action="store",
                         help="extact analysis package located at PATH",
                         metavar="PATH")
    cxgroup.add_argument("--metadump",
                         action="store",
                         help="dump metadata of analysis package at PATH",
                         metavar="PATH")
    common.add_parser_prefix(p)
    common.add_parser_quiet(p)
    p.add_argument(
        "--analysispackage-name",
        action="store",
        help="name of analysis package",
        metavar='NAME',
    )
    p.add_argument(
        "--data-path",
        action="store",
        help="path to data to be included in analysis package",
        metavar="PATH",
    )
    p.add_argument(
        "--extra-meta",
        action="store",
        help="path to json file with additional meta-data no",
        metavar="PATH",
    )
    p.add_argument(
        "--no-env",
        action="store_true",
        help="no environment",
    )
    common.add_parser_json(p)
    p.set_defaults(func=execute)
    return p
예제 #14
0
def configure_parser(sub_parsers):
    p = sub_parsers.add_parser(
        'bundle',
        formatter_class=RawDescriptionHelpFormatter,
        description=descr,
        help=descr,
    )
    cxgroup = p.add_mutually_exclusive_group()
    cxgroup.add_argument('-c',
                         "--create",
                         action="store_true",
                         help="create bundle")
    cxgroup.add_argument('-x',
                         "--extract",
                         action="store",
                         help="extact bundle located at PATH",
                         metavar="PATH")
    cxgroup.add_argument("--metadump",
                         action="store",
                         help="dump metadata of bundle at PATH",
                         metavar="PATH")

    common.add_parser_prefix(p)
    common.add_parser_quiet(p)
    p.add_argument(
        "--bundle-name",
        action="store",
        help="name of bundle",
        metavar='NAME',
    )
    p.add_argument("--data-path",
                   action="store",
                   help="path to data to be included in bundle",
                   metavar="PATH")
    p.add_argument(
        "--extra-meta",
        action="store",
        help="path to json file with additional meta-data",
        metavar="PATH",
    )
    p.add_argument(
        "--no-env",
        action="store_true",
        help="no environment",
    )
    common.add_parser_json(p)
    p.set_defaults(func=execute)
예제 #15
0
def configure_parser(sub_parsers):
    p = sub_parsers.add_parser(
        "create", formatter_class=RawDescriptionHelpFormatter, description=descr, help=descr, epilog=example
    )
    common.add_parser_yes(p)
    p.add_argument("-f", "--file", action="store", help="filename to read package specs from")
    p.add_argument("--clone", action="store", help='path existing environment or "share package"', metavar="ENV")
    common.add_parser_channels(p)
    common.add_parser_prefix(p)
    common.add_parser_quiet(p)
    p.add_argument(
        "package_specs",
        metavar="package_spec",
        action="store",
        nargs="*",
        help="specification of package to install into new environment",
    )
    p.set_defaults(func=execute)
예제 #16
0
def configure_parser(sub_parsers):
    p = sub_parsers.add_parser(
        'bundle',
        formatter_class = RawDescriptionHelpFormatter,
        description = descr,
        help = descr,
    )
    cxgroup = p.add_mutually_exclusive_group()
    cxgroup.add_argument('-c', "--create",
                         action = "store_true",
                         help = "create bundle")
    cxgroup.add_argument('-x', "--extract",
                         action = "store",
                         help = "extact bundle located at PATH",
                         metavar = "PATH")
    cxgroup.add_argument("--metadump",
                         action = "store",
                         help = "dump metadata of bundle at PATH",
                         metavar = "PATH")

    common.add_parser_prefix(p)
    common.add_parser_quiet(p)
    p.add_argument("--bundle-name",
                   action = "store",
                   help = "name of bundle",
                   metavar = 'NAME',
                   )
    p.add_argument("--data-path",
                   action = "store",
                   help = "path to data to be included in bundle",
                   metavar = "PATH"
                   )
    p.add_argument("--extra-meta",
                   action = "store",
                   help = "path to json file with additional meta-data",
                   metavar = "PATH",
                   )
    p.add_argument("--no-env",
                   action = "store_true",
                   help = "no environment",
                   )
    common.add_parser_json(p)
    p.set_defaults(func=execute)
예제 #17
0
파일: main_update.py 프로젝트: delicb/conda
def configure_parser(sub_parsers):
    p = sub_parsers.add_parser(
        'update',
        formatter_class = RawDescriptionHelpFormatter,
        description = descr,
        help = descr,
        epilog = example,
    )
    common.add_parser_yes(p)
    common.add_parser_prefix(p)
    common.add_parser_quiet(p)
    p.add_argument(
        'pkg_names',
        metavar = 'package_name',
        action = "store",
        nargs = '*',
        help = "names of packages to update",
    )
    common.add_parser_channels(p)
    p.set_defaults(func=execute)
예제 #18
0
def configure_parser():
    p = ArgumentParser(
        'analysispackage',
        description="analysis package",
    )
    cxgroup = p.add_mutually_exclusive_group()
    cxgroup.add_argument('-c', "--create",
                         action = "store_true",
                         help = "create analysis package")
    cxgroup.add_argument('-x', "--extract",
                         action = "store",
                         help = "extact analysis package located at PATH",
                         metavar = "PATH")
    cxgroup.add_argument("--metadump",
                         action = "store",
                         help = "dump metadata of analysis package at PATH",
                         metavar = "PATH")
    common.add_parser_prefix(p)
    common.add_parser_quiet(p)
    p.add_argument("--analysispackage-name",
                   action = "store",
                   help = "name of analysis package",
                   metavar = 'NAME',
                   )
    p.add_argument("--data-path",
                   action = "store",
                   help = "path to data to be included in analysis package",
                   metavar = "PATH",
                   )
    p.add_argument("--extra-meta",
                   action = "store",
                   help = "path to json file with additional meta-data no",
                   metavar = "PATH",
                   )
    p.add_argument("--no-env",
                   action = "store_true",
                   help = "no environment",
                   )
    common.add_parser_json(p)
    p.set_defaults(func=execute)
    return p
예제 #19
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)
예제 #20
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)
예제 #21
0
def configure_parser(sub_parsers):
    p = sub_parsers.add_parser(
        'install',
        formatter_class = RawDescriptionHelpFormatter,
        description = descr,
        help = help,
        epilog = example,
    )
    common.add_parser_yes(p)
    p.add_argument(
        '-f', "--force",
        action = "store_true",
        help = "force install (even when package already installed), "
               "implies --no-deps",
    )
    p.add_argument(
        "--file",
        action = "store",
        help = "read package versions from FILE",
    )
    p.add_argument(
        "--no-deps",
        action = "store_true",
        help = "do not install dependencies",
    )
    common.add_parser_channels(p)
    common.add_parser_prefix(p)
    common.add_parser_quiet(p)
    p.add_argument(
        'packages',
        metavar = 'package_spec',
        action = "store",
        nargs = '*',
        help = "package versions to install into conda environment",
    )
    p.set_defaults(func=execute)
예제 #22
0
파일: main_create.py 프로젝트: delicb/conda
def configure_parser(sub_parsers):
    p = sub_parsers.add_parser(
        'create',
        formatter_class = RawDescriptionHelpFormatter,
        description = descr,
        help = help,
        epilog  = example,
    )
    common.add_parser_yes(p)
    p.add_argument(
        '-f', "--file",
        action = "store",
        help = "filename to read package specs from",
    )
    p.add_argument(
        "--clone",
        action = "store",
        help = 'path to (or name of) existing local environment',
        metavar = 'ENV',
    )
    p.add_argument(
        "--no-default-packages",
        action = "store_true",
        help = 'ignore create_default_packages in condarc file',
    )
    common.add_parser_channels(p)
    common.add_parser_prefix(p)
    common.add_parser_quiet(p)
    p.add_argument(
        'package_specs',
        metavar = 'package_spec',
        action = "store",
        nargs = '*',
        help = "specification of package to install into new environment",
    )
    p.set_defaults(func=execute)
예제 #23
0
>>>>>>> conda/feature/instruction-arguments
>>>>>>> princeofdarkness76/conda
=======
        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