zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
U
H=®d pã@s ddlmZddlZddlZddlZddlZddlZddlZddlm    Z    ddl
m Z ddl m Z ddlmZddlmZddlmZdd    lmZmZdd
lmZmZdd lmZmZdd lmZdd lm Z ddl!m"Z"ddl#m$Z$ddl%m&Z&ddl'm(Z(ddl)m*Z*ddl+m,Z,ddl-m.Z.m/Z/m0Z0m1Z1m2Z2ddl3m4Z4ddl5m6Z6ddl7m8Z8ddl9m:Z:m;Z;e6rºddlm<Z<ddl=m>Z>m?Z?m@Z@ddlAmBZBddlmCZCddlDmEZEddl9mFZFe GeH¡ZIdd „ZJGd!d"„d"eƒZKd.d$d%„ZLd&d'„ZMd/d(d)„ZNd*d+„ZOd,d-„ZPdS)0é)Úabsolute_importN)Ú SUPPRESS_HELP)Ú pkg_resources)Úcanonicalize_name)Ú
WheelCache)Ú
cmdoptions)Úmake_target_python)ÚRequirementCommandÚ with_cleanup)ÚERRORÚSUCCESS)Ú CommandErrorÚInstallationError©Údistutils_scheme)Úcheck_install_conflicts)Úinstall_given_reqs)Úget_requirement_tracker)Útoday_is_later_than)Ú
deprecated)Úparse_distutils_args©Útest_writable_dir)Ú
ensure_dirÚget_installed_versionÚget_pip_versionÚ(protect_pip_from_modification_on_windowsÚ write_output)Ú TempDirectory)ÚMYPY_CHECK_RUNNING)Úvirtualenv_no_global)ÚbuildÚ should_build_for_install_command)ÚValues)ÚIterableÚListÚOptional)Ú FormatControl)ÚConflictDetails)ÚInstallRequirement)ÚBinaryAllowedPredicatecs‡fdd„}|S)Ncs&|jr
dSt|jƒ}ˆ |¡}d|kS)NTÚbinary)Ú
use_pep517rÚnameÚget_allowed_formats)ÚreqÚcanonical_nameÚallowed_formats©Úformat_control©úUD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\pip/_internal/commands/install.pyÚcheck_binary_allowed7s
 
 
z6get_check_binary_allowed.<locals>.check_binary_allowedr4)r3r6r4r2r5Úget_check_binary_allowed5s r7c@s@eZdZdZdZdd„Zedd„ƒZdd„Zd    d
„Z    d d „Z
d S)ÚInstallCommandaI
    Install packages from:
 
    - PyPI (and other indexes) using requirement specifiers.
    - VCS project urls.
    - Local project directories.
    - Local or remote source archives.
 
    pip also supports installing from "requirements files", which provide
    an easy way to specify a whole environment to be installed.
    a%
      %prog [options] <requirement specifier> [package-index-options] ...
      %prog [options] -r <requirements file> [package-index-options] ...
      %prog [options] [-e] <vcs project url> ...
      %prog [options] [-e] <local project path> ...
      %prog [options] <archive url/path> ...cCsz|j t ¡¡|j t ¡¡|j t ¡¡|j t ¡¡|j t ¡¡|jjdddddddt |j¡|jjddd    d
d |jjd dd t    d |jjdddddd|jjdddddd|j t 
¡¡|j t  ¡¡|jjdddd    dd |jjdddddgdd|jjddd    d d |jjd!d"d#d    d$d |j t  ¡¡|j t  ¡¡|j t ¡¡|j t ¡¡|j t ¡¡|j t ¡¡|jjd%d    d&d'd(d)|jjd*d d&d+d,|jjd-d d.d'd/d)|jjd0d d1d'd2d)|j t ¡¡|j t ¡¡|j t ¡¡|j t ¡¡|j t ¡¡t tj|j¡}|j d3|¡|j d3|j¡dS)4Nz-tz--targetÚ
target_dirÚdirz¥Install packages into <dir>. By default this will not replace existing files/folders in <dir>. Use --upgrade to replace existing packages in <dir> with new versions.)ÚdestÚmetavarÚdefaultÚhelpz--userÚ use_user_siteÚ
store_truez¸Install to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%\Python on Windows. (See the Python documentation for site.USER_BASE for full details.))r;Úactionr>z    --no-userÚ store_falsez--rootÚ    root_pathz=Install everything relative to this alternate root directory.z--prefixÚ prefix_pathzIInstallation prefix where lib, bin and other top-level folders are placedz-Uz    --upgradeÚupgradez‚Upgrade all specified packages to the newest available version. The handling of dependencies depends on the upgrade-strategy used.z--upgrade-strategyÚupgrade_strategyzonly-if-neededÚeageraGDetermines how dependency upgrading should be handled [default: %default]. "eager" - dependencies are upgraded regardless of whether the currently installed version satisfies the requirements of the upgraded package(s). "only-if-needed" -  are upgraded only when they do not satisfy the requirements of the upgraded package(s).)r;r=Úchoicesr>z--force-reinstallÚforce_reinstallz;Reinstall all packages even if they are already up-to-date.z-Iz--ignore-installedÚignore_installedz°Ignore the installed packages, overwriting them. This can break your system if the existing package is of a different version or was installed with a different package manager!z    --compileÚcompileTz'Compile Python source files to bytecode)rAr;r=r>z --no-compilez.Do not compile Python source files to bytecode)rAr;r>z--no-warn-script-locationÚwarn_script_locationz0Do not warn when installing scripts outside PATHz--no-warn-conflictsÚwarn_about_conflictsz%Do not warn about broken dependenciesr)Úcmd_optsÚ
add_optionrÚ requirementsÚ constraintsÚno_depsÚpreÚeditableÚadd_target_python_optionsrÚ    build_dirÚsrcÚignore_requires_pythonÚno_build_isolationr,Ú no_use_pep517Úinstall_optionsÚglobal_optionsÚ    no_binaryÚ only_binaryÚ prefer_binaryÚrequire_hashesÚ progress_barÚmake_option_groupÚ index_groupÚparserÚinsert_option_group)ÚselfÚ
index_optsr4r4r5Ú add_optionsVsâû
üüûûü    ûüü
ûüûûþzInstallCommand.add_optionsc) s6|jr|jdk    rtdƒ‚t |¡d}|jr2|j}tj|dd|jpHg}t     
dt ƒ¡t |j|j |j|j|jd|_d}d}|jrØd|_tj |j¡|_tj |j¡r¾tj |j¡s¾tdƒ‚tdd    }|j}| |¡|jpàg}| |¡}t|ƒ}    |j|||    |jd
}
|jp|j } t|j |j!ƒ} | t"ƒ¡} t|j| d dd }zt| #|||
|¡}t$||jƒ|j%||| ||
|jd }|j&||
|| |j|j|j|j'||j(d
}| )|
¡|j*||j d}z| +d¡}Wnt,k
rèd}Yn X|j-dk}t.|dt/|
j!ƒ‰‡fdd„|j0 1¡Dƒ}t2|| ggd\}}dd„|Dƒ}|r\t3d 4d 5|¡¡ƒ‚dd„|Dƒ}|rŒt6d 4d 5|¡¡dddd| 7|¡}d}|j8 o¨|j9}|rº| :|¡}|j;}|jrÌd}t<||||j||j ||j|j=d    }t>|j||j|j |jd }t? @|¡} |jAtB Cd!¡d"g}!|D]R}"|"jD}#z$tE|"jD| d#}$|$rX|#d$|$7}#WntFk
rpYnX|! G|#¡q,|dk    rž|jH|d%|jIkd&d' 5|!¡}%|%r¸tJd(|%ƒWnRtKk
r }&z2|jLd)k}'tM|&|'|jƒ}(t    jN|(|'d*tOWY¢Sd}&~&XYnX|jr2|s tP‚| Q|j||j¡tRS)+Nz'Can not combine '--user' and '--target'zto-satisfy-onlyT)Ú check_targetzUsing %s)rDr9rCÚ isolated_modez=Target path exists but is not a directory, will not continue.Útarget)Úkind)ÚoptionsÚsessionÚ target_pythonrXÚinstall)ÚdeleterlÚglobally_managed)Útemp_build_dirrmÚ req_trackerrnÚfinderr?)
ÚpreparerrurmÚ wheel_cacher?rJrXrIrFr,)Úcheck_supported_wheelsÚpipF)Ú modifying_pipcsg|]}t|ˆƒr|‘qSr4)r"©Ú.0Úr©r6r4r5Ú
<listcomp>Xs ÿÿz&InstallCommand.run.<locals>.<listcomp>)rwÚ build_optionsr\cSsg|]}|jr|j‘qSr4©r,r-r{r4r4r5rhsÿzPCould not build wheels for {} which use PEP 517 and cannot be installed directlyz, cSsg|]}|js|j‘qSr4rr{r4r4r5rwsÿzrCould not build wheels for {} which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these.z+to fix the wheel build issue reported abovez21.0i° )ÚreasonÚ replacementÚgone_inÚissue)ÚrootÚhomeÚprefixrLr?Ú    pycompile)Úuserr‡r†rˆÚisolatedr-)Úkey)Ú working_setú-z 2020-resolver)Ú new_resolverú zSuccessfully installed %sé)Úexc_info)Sr?r9r rÚcheck_install_build_globalrErFÚcheck_dist_restrictionr[ÚloggerÚdebugrÚdecide_user_installrDrCrjrJÚosÚpathÚabspathÚexistsÚisdirrÚ enter_contextr\Úget_default_sessionrÚ_build_package_finderrXÚno_cleanrVrÚ    cache_dirr3rÚget_requirementsÚ'reject_location_related_install_optionsÚmake_requirement_preparerÚ make_resolverrIr,Útrace_basic_infoÚresolveÚget_requirementÚKeyErrorÚ satisfied_byrr7rPÚvaluesr!rÚformatÚjoinrÚget_installation_orderÚignore_dependenciesrMÚ_determine_conflictsrLrrKÚget_lib_location_guessesrÚ
WorkingSetÚsortÚoperatorÚ
attrgetterr-rÚ    ExceptionÚappendÚ_warn_about_conflictsÚfeatures_enabledrÚEnvironmentErrorÚ    verbosityÚcreate_env_error_messageÚerrorr ÚAssertionErrorÚ_handle_target_dirr ))rfrmÚargsrFr[Útarget_temp_dirÚtarget_temp_dir_pathr\rnroruÚ build_deleterwrtÚ    directoryÚreqsrvÚresolverÚrequirement_setÚpip_reqrzÚ reqs_to_buildÚ_Úbuild_failuresÚpep517_build_failure_namesÚlegacy_build_failure_namesÚ
to_installÚ    conflictsÚshould_warn_about_conflictsrLÚ    installedÚ lib_locationsrÚitemsÚresultÚitemÚinstalled_versionÚinstalled_descr½Úshow_tracebackÚmessager4r~r5Úrunæs‚
 
û ÿÿ
 
 
 
ü üÿúö
ÿ
 
ÿÿ
ÿü
    þþÿ
þýö ÿ
þ
÷ û
ÿ
þ
ÿ
ÿ
ÿzInstallCommand.runc sTt|ƒg}td|jd}|d}|d}|d}tj |¡rH| |¡tj |¡rf||krf| |¡tj |¡r|| |¡|D]Î}    t |    ¡D]¾}
|    |krÈtj ||
¡‰t‡fdd„|dd…DƒƒrÈqŽtj ||
¡} tj | ¡r6|söt     
d    | ¡qŽtj  | ¡rt     
d
| ¡qŽtj  | ¡r,t  | ¡n
t | ¡t  tj |    |
¡| ¡qŽq€dS) NÚ)r‡ÚpurelibÚplatlibÚdatac3s|]}| ˆ¡VqdS©N)Ú
startswith)r|Ús©Úddirr4r5Ú    <genexpr>ösz4InstallCommand._handle_target_dir.<locals>.<genexpr>éÿÿÿÿzKTarget directory %s already exists. Specify --upgrade to force replacement.z„Target directory %s already exists and is a link. pip will not automatically replace links, please remove if replacement is desired.)rrr™r˜r›r·Úlistdirr­Úanyr•ÚwarningÚislinkrœÚshutilÚrmtreeÚremoveÚmove) rfr9rÁrEÚ lib_dir_listÚschemeÚ purelib_dirÚ platlib_dirÚdata_dirÚlib_dirrÕÚtarget_item_dirr4râr5r¿ÜsN 
 
 
ýû 
 þz!InstallCommand._handle_target_dircCs0z
t|ƒWStk
r*t d¡YdSXdS)NzwError while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new)rr¶r•Ú    exception)rfrÎr4r4r5r°s
ÿz#InstallCommand._determine_conflictsc    Cs|\}\}}|s|sdSg}|s6| d¡| d¡n,tddddsb| d¡d}| d     |¡¡|D]<}||d
}    ||D]"}
d j||    |
d d } | | ¡q~qf|D]B}||d
}    ||D](\} } }dj||    || | d} | | ¡qÀq¨t d |¡¡dS)Nz¢After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.
z|We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
iäéé)ÚyearÚmonthÚdayz¸Pip will install or upgrade your package(s) and its dependencies without taking into account other packages you already have installed. This may cause an uncaught dependency conflict.
z#https://forms.gle/cWKMoDs8sUVE29hz9zXIf you would like pip to take your other packages into account, please tell us here: {}
rz@{name} {version} requires {requirement}, which is not installed.r‘)r-ÚversionÚ requirementzh{name} {version} requires {requirement}, but you'll have {dep_name} {dep_version} which is incompatible.)r-rûrüÚdep_nameÚ dep_versionÚ
)r·rr¬r•Úcriticalr­)rfÚconflict_detailsrÚ package_setÚmissingÚ conflictingÚpartsÚ    form_linkÚ project_namerûÚ
dependencyrÙrýrþr/r4r4r5r¸sX ÿÿÿÿÿ  ÿú ÿø
z$InstallCommand._warn_about_conflictsN) Ú__name__Ú
__module__Ú __qualname__Ú__doc__Úusagerhr
rÚr¿r°r¸r4r4r4r5r8Bs 
v8 r8FcCs$td|||||d}|d|dgS)NrÛ)rŠr‡r†r‹rˆrÜrÝr)rŠr‡r†r‹rˆrïr4r4r5r±_s
 
ÿr±cCstdd„tt||dƒDƒƒS)Ncss|]}t|ƒVqdSrßr)r|Údr4r4r5ränsz)site_packages_writable.<locals>.<genexpr>©r†r‹)ÚallÚsetr±rr4r4r5Úsite_packages_writablels
 
ÿÿrcCs¤|dk    r|st d¡dS|rF|r*tdƒ‚tƒr8tdƒ‚t d¡dS|dksRt‚|sZ|rht d¡dStjs|t d    ¡dSt||d
r–t d ¡dSt     d ¡dS) aZDetermine whether to do a user install based on the input options.
 
    If use_user_site is False, no additional checks are done.
    If use_user_site is True, it is checked for compatibility with other
    options.
    If use_user_site is None, the default behaviour depends on the environment,
    which is provided by the other arguments.
    Nz$Non-user install by explicit requestFzVCan not combine '--user' and '--prefix' as they imply different installation locationszZCan not perform a '--user' install. User site-packages are not visible in this virtualenv.z User install by explicit requestTz3Non-user install due to --prefix or --target optionz4Non-user install because user site-packages disabledrz0Non-user install because site-packages writeablezMDefaulting to user installation because normal site-packages is not writeable)
r•r–r r rr¾ÚsiteÚENABLE_USER_SITErÚinfo)r?rDr9rCrjr4r4r5r—ts4 
ÿÿ
 
 
 
 
r—cCsŠdd„}g}|D]0}|j}t|ƒ}|r| d || ¡ƒ|¡¡q|rjt|ƒ}|rj| d || ¡ƒ¡¡|srdStd d |¡¡ƒ‚dS)z’If any location-changing --install-option arguments were passed for
    requirements or on the command-line, then show a deprecation warning.
    cSsdd„|DƒS)NcSsg|]}d | dd¡¡‘qS)z--{}rÊrŽ)r¬Úreplace)r|r-r4r4r5r·szSreject_location_related_install_options.<locals>.format_options.<locals>.<listcomp>r4)Ú option_namesr4r4r5Úformat_optionsµsz?reject_location_related_install_options.<locals>.format_optionsz {!r} from {}z{!r} from command lineNz˜Location-changing options found in --install-option: {}. This is unsupported, use pip-level options like --user, --prefix, --root, and --target instead.z; )r[rr·r¬Úkeysr r­)rPrmrÚ    offendersrür[Úlocation_optionsr4r4r5r£°s6
ÿÿ
ÿÿýÿr£cCsšg}| d¡|s,| d¡| t|ƒ¡n
| d¡|dd7<|jtjkrˆd}d}|st| |d| ¡g¡n
| |¡| d    ¡d
 |¡ ¡dS) z{Format an error message for an EnvironmentError
 
    It may occur anytime during the execution of the install command.
    z5Could not install packages due to an EnvironmentErrorz: Ú.rårÿz"Consider using the `--user` optionzCheck the permissionsz or z.
rÛ)r·ÚstrÚerrnoÚEACCESÚextendÚlowerr­Ústrip)r½rØÚusing_user_siterÚuser_option_partÚpermissions_partr4r4r5r¼Ús&
 
 
 þ
 
r¼)FNNFN)NNNF)QÚ
__future__rrÚloggingr´r˜rêrÚoptparserÚ pip._vendorrZpip._vendor.packaging.utilsrÚpip._internal.cacherZpip._internal.clirZpip._internal.cli.cmdoptionsrÚpip._internal.cli.req_commandr    r
Úpip._internal.cli.status_codesr r Úpip._internal.exceptionsr rÚpip._internal.locationsrÚpip._internal.operations.checkrZpip._internal.reqrÚpip._internal.req.req_trackerrÚpip._internal.utils.datetimerÚpip._internal.utils.deprecationrÚ"pip._internal.utils.distutils_argsrÚpip._internal.utils.filesystemrÚpip._internal.utils.miscrrrrrÚpip._internal.utils.temp_dirrÚpip._internal.utils.typingrÚpip._internal.utils.virtualenvr Úpip._internal.wheel_builderr!r"r#Útypingr$r%r&Ú#pip._internal.models.format_controlr'r(Zpip._internal.req.req_installr)r*Ú    getLoggerr    r•r7r8r±rr—r£r¼r4r4r4r5Ú<module>sp                       
 "û
 
û
<*