def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'clean', formatter_class = RawDescriptionHelpFormatter, description = descr, help = descr, epilog = example, ) common.add_parser_yes(p) p.add_argument( "-i", "--index-cache", action = "store_true", help = "remove index cache", ) p.add_argument( "-l", "--lock", action = "store_true", help = "remove all conda lock files", ) p.add_argument( "-t", "--tarballs", action = "store_true", help = "remove cached package tarballs", ) p.set_defaults(func=execute)
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)
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)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'clean', formatter_class = RawDescriptionHelpFormatter, description = descr, help = descr, epilog = example, ) common.add_parser_yes(p) p.add_argument( "-i", "--index-cache", action = "store_true", help = "remove index cache", ) p.add_argument( "-l", "--lock", action = "store_true", help = "remove all conda lock files", ) p.add_argument( "-t", "--tarballs", action = "store_true", help = "remove cached package tarballs", ) p.add_argument( '-p', '--packages', action='store_true', help="""remove unused cached packages. Warning: this does not check for symlinked packages.""", ) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'clean', formatter_class=RawDescriptionHelpFormatter, description=descr, help=descr, epilog=example, ) common.add_parser_yes(p) p.add_argument( "-i", "--index-cache", action="store_true", help="remove index cache", ) p.add_argument( "-l", "--lock", action="store_true", help="remove all conda lock files", ) p.add_argument( "-t", "--tarballs", action="store_true", help="remove cached package tarballs", ) p.set_defaults(func=execute)
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)
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)
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)
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)
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)
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)
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)
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)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'clean', description=descr, help=descr, epilog=example, ) common.add_parser_yes(p) common.add_parser_json(p) p.add_argument( "-a", "--all", action="store_true", help="Remove index cache, lock files, tarballs, " "unused cache packages, and source cache.", ) p.add_argument( "-i", "--index-cache", action="store_true", help="Remove index cache.", ) p.add_argument( "-l", "--lock", action="store_true", help="Remove all conda lock files.", ) p.add_argument( "-t", "--tarballs", action="store_true", help="Remove cached package tarballs.", ) p.add_argument( '-p', '--packages', action='store_true', help="""Remove unused cached packages. Warning: this does not check for symlinked packages.""", ) p.add_argument( '-s', '--source-cache', action='store_true', help="""Remove files from the source cache of conda build.""", ) p.set_defaults(func=execute)
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)
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)
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)
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)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'clean', formatter_class=RawDescriptionHelpFormatter, description=descr, help=descr, epilog=example, ) common.add_parser_yes(p) common.add_parser_json(p) p.add_argument( "-i", "--index-cache", action="store_true", help="remove index cache", ) p.add_argument( "-l", "--lock", action="store_true", help="remove all conda lock files", ) p.add_argument( "-t", "--tarballs", action="store_true", help="remove cached package tarballs", ) p.add_argument( '-p', '--packages', action='store_true', help="""remove unused cached packages. Warning: this does not check for symlinked packages.""", ) p.set_defaults(func=execute)
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)
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)
return True ok = True curpid = os.getpid() for n in psutil.get_pid_list(): if n == curpid: # The Python that conda is running is OK continue try: p = psutil.Process(n) except psutil._error.NoSuchProcess: continue try: if os.path.realpath(p.exe).startswith(os.path.realpath(root_dir)): processcmd = ' '.join(p.cmdline) print "WARNING: the process %s (%d) is running" % (processcmd, n) ok = False except (psutil._error.AccessDenied, WindowsError): pass if not ok: print("WARNING: Continuing installation while the above processes are " "running is not recommended.\n" "Close all Anaconda programs before installing or updating things with conda.") return ok if __name__ == '__main__': p = conda_argparse.ArgumentParser() add_parser_yes(p) args = p.parse_args() main(args, windowsonly=False)
print("""\ WARNING: Continuing installation while the above processes are running is not recommended. Please, close all Anaconda programs before installing or updating things with conda. """) return ok def main(args, windowsonly=True): # Returns True for force, otherwise None if sys.platform == 'win32' or not windowsonly: if args.yes: check_processes() else: while not check_processes(): choice = confirm(args, message="Continue (yes/no/force)", choices=('yes', 'no', 'force'), default='no') if choice == 'no': sys.exit(1) if choice == 'force': return True if __name__ == '__main__': p = conda_argparse.ArgumentParser() add_parser_yes(p) args = p.parse_args() main(args, windowsonly=False)
description=uninstall_help, help=uninstall_help, epilog=example % name, add_help=False, ) common.add_parser_help(p) ======= p = sub_parsers.add_parser( name, formatter_class=RawDescriptionHelpFormatter, description=descr % name, help=help % name, epilog=example % name, ) >>>>>>> conda/feature/instruction-arguments common.add_parser_yes(p) common.add_parser_json(p) p.add_argument( "--all", action="store_true", <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD help="%s all packages, i.e., the entire environment." % name.capitalize(), ======= help="%s all packages, i.e. the entire environment" % name, >>>>>>> conda/feature/instruction-arguments =======