U n aX@sfdZddlmZmZddlZddlZddlZddlZddlZddl Z ddl Z ddl m Z ddl mZddlmZmZddlmZmZmZmZmZddlmZmZmZmZmZdd lmZdd l m!Z!dd l"m#Z#m$Z$dd l%m&Z&m'Z'dd l(m)Z)m*Z*ddl+m,Z,ddl-m.Z.e,rBddl/m0Z0m1Z1m2Z2m3Z3ddlm4Z4ddl(m5Z6dgZ7e8e9Z:GdddeZ;dS)z(Base Command class, and related routines)absolute_importprint_functionN) cmdoptions)CommandContextMixIn)ConfigOptionParserUpdatingDefaultsHelpFormatter)ERRORPREVIOUS_BUILD_DIR_ERRORSUCCESS UNKNOWN_ERRORVIRTUALENV_NOT_FOUND) BadCommand CommandErrorInstallationErrorPreviousBuildDirErrorUninstallationError) deprecated)check_path_owner)BrokenStdoutLoggingError setup_logging)get_prognormalize_path)global_tempdir_managertempdir_registry)MYPY_CHECK_RUNNING)running_under_virtualenv)ListOptionalTupleAny)Values)TempDirectoryTypeRegistryCommandcsNeZdZdZdZdfdd ZddZddZd d Zd d Z d dZ Z S)r"NFcstt||jdt|td||j|d}||_||_ t f||_ d|_ d|j }t|j ||_ttj|j }|j |dS)Nz{} {}F)usageprog formatteradd_help_optionname descriptionisolatedz {} Options)superr"__init__r#formatrr__doc__r'summaryrparserr capitalizeoptparse OptionGroupcmd_optsrmake_option_group general_groupadd_option_group)selfr'r.r) parser_kw optgroup_namegen_opts __class___C:\Users\vtejo\AppData\Local\Temp\pip-unpacked-wheel-6mt8ur68\pip\_internal\cli\base_command.pyr+=s(   zCommand.__init__cCst|drtdS)zf This is a no-op so that commands by default do not do the pip version check. no_indexN)hasattrAssertionError)r7optionsr=r=r>handle_pip_version_check[sz Command.handle_pip_version_checkcCstdSN)NotImplementedError)r7rBargsr=r=r>runesz Command.runcCs |j|SrD)r/ parse_argsr7rFr=r=r>rHiszCommand.parse_argsc Cs>z.|||W5QRW SQRXW5tXdSrD)loggingshutdown main_context_mainrIr=r=r>mainns $z Command.mainc Cs|t|_|t||\}}|j|j|_t|j|j|j d}t j dddkr|j sd}t dkrzd|}t|ddd|jrdtjd <|jrd |jtjd <|jr|jststd t t|jr t|j|_t|js td |jd|_zz*|!||}t"|t#r4|WWSWnt$k r}z.tt%|tj&dddt'WYWRSd}~XYn>t(t)t*fk r}z.tt%|tj&dddt+WYWSd}~XYnt,k r"}z*td|tj&dddt+WYWSd}~XYnt-k rft.dt j/d|t0j1krZt2j3t j/dt+YWfSt4k rtdtj&dddt+YW2St5k rtjdddt6YWSXW5| |Xt7S)N) verbosityno_color user_log_file)rRzpip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-supportCPythonzPython 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. ) replacementgone_in1 PIP_NO_INPUT PIP_EXISTS_ACTIONz2Could not find an activated virtualenv (required).zThe directory '%s' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.zException information:T)exc_infoz%sz ERROR: Pipe to stdout was broken)filezOperation cancelled by userz Exception:)8 enter_contextrrrHverbosequietrOrrPlogsys version_infono_python_version_warningplatformpython_implementationrno_inputosenviron exists_actionjoin require_venvignore_require_venvrloggercriticalexitr cache_dirrrwarningrCrG isinstanceintrstrdebugr rrr rrrprintstderrrJDEBUG traceback print_excKeyboardInterrupt BaseExceptionr r )r7rFrB level_numbermessagestatusexcr=r=r>rMvs                z Command._main)F) __name__ __module__ __qualname__r#rlr+rCrGrHrNrM __classcell__r=r=r;r>r"9s )s6