zmc
2023-10-12 ed135d79df12a2466b52dae1a82326941211dcc9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
U
H=®dj"ã@sjdZddlmZmZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl m Z ddl mZddlmZmZddlmZmZmZmZddlmZmZmZmZmZmZmZdd    lm Z dd
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-rFddl0m1Z1m2Z2m3Z3m4Z4ddlm5Z5ddl)m6Z7dgZ8e 9e:¡Z;Gdd„deƒZ<dS)z(Base Command class, and related routinesé)Úabsolute_importÚprint_functionN)Ú
cmdoptions)ÚCommandContextMixIn)ÚConfigOptionParserÚUpdatingDefaultsHelpFormatter)ÚERRORÚPREVIOUS_BUILD_DIR_ERRORÚ UNKNOWN_ERRORÚVIRTUALENV_NOT_FOUND)Ú
BadCommandÚ CommandErrorÚInstallationErrorÚNetworkConnectionErrorÚPreviousBuildDirErrorÚSubProcessErrorÚUninstallationError)Ú
deprecated)Úcheck_path_owner)ÚBrokenStdoutLoggingErrorÚ setup_logging)Úget_progÚnormalize_path)Úglobal_tempdir_managerÚtempdir_registry)ÚMYPY_CHECK_RUNNING)Úrunning_under_virtualenv)ÚListÚOptionalÚTupleÚAny)ÚValues)ÚTempDirectoryTypeRegistryÚCommandcsVeZdZdZdZd‡fdd„    Zdd„Zdd„Zd    d
„Zd d „Z    d d„Z
dd„Z ‡Z S)r#NFcs˜tt|ƒ ¡|jd tƒ|¡tƒd||j|dœ}||_||_    t
f|Ž|_ d|_ d |j  ¡¡}t |j |¡|_t tj|j ¡}|j  |¡| ¡dS)Nz{} {}F)ÚusageÚprogÚ    formatterÚadd_help_optionÚnameÚ descriptionÚisolatedz
{} Options)Úsuperr#Ú__init__r$ÚformatrrÚ__doc__r(ÚsummaryrÚparserrÚ
capitalizeÚoptparseÚ OptionGroupÚcmd_optsrÚmake_option_groupÚ general_groupÚadd_option_groupÚ add_options)Úselfr(r/r*Ú    parser_kwÚ optgroup_nameÚgen_opts©Ú    __class__©úUD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\pip/_internal/cli/base_command.pyr,>s* ù
 þ zCommand.__init__cCsdS©Nr?)r9r?r?r@r8^szCommand.add_optionscCst|dƒrt‚dS)zf
        This is a no-op so that commands by default do not do the pip version
        check.
        Úno_indexN)ÚhasattrÚAssertionError)r9Úoptionsr?r?r@Úhandle_pip_version_checkbsz Command.handle_pip_version_checkcCst‚dSrA)ÚNotImplementedError)r9rEÚargsr?r?r@Úrunlsz Command.runcCs |j |¡SrA)r0Ú
parse_args©r9rHr?r?r@rJpszCommand.parse_argsc
Cs>z.| ¡| |¡W5QR£W¢ SQRXW5t ¡XdSrA)ÚloggingÚshutdownÚ main_contextÚ_mainrKr?r?r@Úmainus
$z Command.mainc Cs| tƒ¡|_| tƒ¡| |¡\}}|j|j|_t|j|j|j    d}t
j dd…dkrˆ|j sˆd}t  ¡dkrzd|}t|ddd|jr˜dtjd    <|jr°d
 |j¡tjd <|jrÖ|jsÖtƒsÖt d ¡t
 t¡|jr
t|jƒ|_t|jƒs
t d |j¡d|_t |ddƒr(tdddddd|j!krHt d¡t
 t"¡z¾z(| $||¡}t%|t&ƒsjt'‚|WW¢–St(k
rÄ}z.t t)|ƒ¡tj*dddt+WY¢W¢VSd}~XYnBt,t-t.t/t0fk
r}z.t t)|ƒ¡tj*dddt"WY¢W¢þSd}~XYnìt1k
rb}z*t d|¡tj*dddt"WY¢W¢¶Sd}~XYn¤t2k
r¦t3dt
j4d|t5j6kršt7j8t
j4dt"YW¢fSt9k
rÚt d¡tj*dddt"YW¢2St:k
rtjdddt;YW¢SXW5| #|¡XdS)N)Ú    verbosityÚno_colorÚ user_log_fileé)rTézÁpip 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-supportÚCPythonzPython 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. )Ú replacementÚgone_inÚ1Ú PIP_NO_INPUTú ÚPIP_EXISTS_ACTIONz2Could not find an activated virtualenv (required).zèThe 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.Ú    build_dirzBThe -b/--build/--build-dir/--build-directory option is deprecated.zOuse the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-cleanz20.3i )ÚreasonrWrXÚissueÚresolverzs--unstable-feature=resolver is no longer supported, and has been replaced with --use-feature=2020-resolver instead.zException information:T)Úexc_infoz%sz ERROR: Pipe to stdout was broken)ÚfilezOperation cancelled by userz
Exception:)<Ú enter_contextrrrJÚverboseÚquietrQrrRÚlogÚsysÚ version_infoÚno_python_version_warningÚplatformÚpython_implementationrÚno_inputÚosÚenvironÚ exists_actionÚjoinÚ require_venvÚignore_require_venvrÚloggerÚcriticalÚexitr Ú    cache_dirrrÚwarningÚgetattrÚunstable_featuresrrFrIÚ
isinstanceÚintrDrÚstrÚdebugr    rrr rrr rÚprintÚstderrrLÚDEBUGÚ    tracebackÚ    print_excÚKeyboardInterruptÚ BaseExceptionr
)r9rHrEÚ level_numberÚmessageÚstatusÚexcr?r?r@rO}s¤ ýÿþÿ ü
 ÿ
  úö ÿ
   ÿ   
 z Command._main)F) Ú__name__Ú
__module__Ú __qualname__r$rrr,r8rFrIrJrPrOÚ __classcell__r?r?r=r@r#:s 
)=r.Ú
__future__rrrLÚlogging.configr2rmrjrgrZpip._internal.clirÚ!pip._internal.cli.command_contextrÚpip._internal.cli.parserrrÚpip._internal.cli.status_codesrr    r
r Úpip._internal.exceptionsr r rrrrrÚpip._internal.utils.deprecationrÚpip._internal.utils.filesystemrÚpip._internal.utils.loggingrrÚpip._internal.utils.miscrrÚpip._internal.utils.temp_dirrrÚpip._internal.utils.typingrÚpip._internal.utils.virtualenvrÚtypingrrrr r!r"ZTempDirRegistryÚ__all__Ú    getLoggerr‰rsr#r?r?r?r@Ú<module>s6  $