zmc
2023-12-22 9fdbf60165db0400c2e8e6be2dc6e88138ac719a
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
U
H=®dÎã@s¦ddlmZddlZddlmZddlmZddlmZddl    m
Z
ddl m Z ddl mZerˆdd    lmZmZmZmZmZdd
lmZe e¡ZGd d „d eƒZdS) é)Úabsolute_importN)Ú OrderedDict)Úcanonicalize_name)ÚInstallationError)ÚWheel)Úcompatibility_tags)ÚMYPY_CHECK_RUNNING)ÚDictÚIterableÚListÚOptionalÚTuple)ÚInstallRequirementc@s\eZdZddd„Zdd„Zdd„Zdd    „Zd
d „Zdd d„Zdd„Z    dd„Z
e dd„ƒZ d S)ÚRequirementSetTcCstƒ|_||_g|_dS)z!Create a RequirementSet.
        N)rÚ requirementsÚcheck_supported_wheelsÚunnamed_requirements)Úselfr©rúPD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\pip/_internal/req/req_set.pyÚ__init__szRequirementSet.__init__cCs4tdd„|j ¡Dƒdd„d}d dd„|Dƒ¡S)Ncss|]}|js|VqdS©N)Ú
comes_from©Ú.0ÚreqrrrÚ    <genexpr>$sz)RequirementSet.__str__.<locals>.<genexpr>cSs
t|jƒSr©rÚname©rrrrÚ<lambda>%óz(RequirementSet.__str__.<locals>.<lambda>©Úkeyú css|]}t|jƒVqdSr©Ústrrrrrrr's)ÚsortedrÚvaluesÚjoin)rrrrrÚ__str__!s
þzRequirementSet.__str__cCsBt|j ¡dd„d}d}|j|jjt|ƒd dd„|Dƒ¡dS)    NcSs
t|jƒSrrrrrrr -r!z)RequirementSet.__repr__.<locals>.<lambda>r"z4<{classname} object; {count} requirement(s): {reqs}>z, css|]}t|jƒVqdSrr%rrrrr4sz*RequirementSet.__repr__.<locals>.<genexpr>)Ú    classnameÚcountÚreqs)r'rr(ÚformatÚ    __class__Ú__name__Úlenr))rrÚ format_stringrrrÚ__repr__)sþýzRequirementSet.__repr__cCs|jr
t‚|j |¡dSr)rÚAssertionErrorrÚappend)rÚ install_reqrrrÚadd_unnamed_requirement7s
z&RequirementSet.add_unnamed_requirementcCs"|js
t‚t|jƒ}||j|<dSr)rr4rr)rr6Ú project_namerrrÚadd_named_requirement<s
 
z$RequirementSet.add_named_requirementNc    CsÀ| |¡s$t d|j|j¡gdfS|jrf|jjrft|jjƒ}t     
¡}|j rf|  |¡sft d |j¡ƒ‚|jr||dks|tdƒ‚|js–| |¡|gdfSz| |j¡}Wntk
r¾d}YnX|dkoî|oî|j oî|j|jkoî|jj|jjk}|r
t d |||j¡ƒ‚|s$| |¡|g|fS|js4|js<g|fS|jo\|joZ|jj|jjk }|rtt d |j¡ƒ‚d|_|jrˆd|_ttt|jƒt|jƒBƒƒ|_t d    ||j¡|g|fS)
a&Add install_req as a requirement to install.
 
        :param parent_req_name: The name of the requirement that needed this
            added. The name is used because when multiple unnamed requirements
            resolve to the same name, we could otherwise end up with dependency
            links that point outside the Requirements set. parent_req must
            already be added. Note that None implies that this is a user
            supplied requirement, vs an inferred one.
        :param extras_requested: an iterable of extras used to evaluate the
            environment markers.
        :return: Additional requirements to scan. That is either [] if
            the requirement is not applicable, or [install_req] if the
            requirement is applicable and has just been added.
        z6Ignoring %s: markers '%s' don't match your environmentNz-{} is not a supported wheel on this platform.z+a user supplied req shouldn't have a parentz7Double requirement given: {} (already in {}, name={!r})zhCould not satisfy constraints for '{}': installation from path or url cannot be constrained to a versionFTzSetting %s extras to: %s)Ú match_markersÚloggerÚinforÚmarkersÚlinkÚis_wheelrÚfilenamerÚ get_supportedrÚ    supportedrr.Ú user_suppliedr4r7Úget_requirementÚKeyErrorÚ
constraintÚextrasrÚ    specifierr9ÚpathÚtupler'ÚsetÚdebug)    rr6Úparent_req_nameÚextras_requestedÚwheelÚtagsÚ existing_reqÚhas_conflicting_requirementÚdoes_not_satisfy_constraintrrrÚadd_requirementCs’
þ ÿÿÿ
 
ÿ
ÿþ
ýûÿÿ
 
þþþÿÿþzRequirementSet.add_requirementcCs t|ƒ}||jko|j|j Sr)rrrF©rrr8rrrÚhas_requirement¶s
 þzRequirementSet.has_requirementcCs2t|ƒ}||jkr|j|StdjftƒŽƒ‚dS)Nz!No project with the name {name!r})rrrEr.ÚlocalsrUrrrrD¿s
 
zRequirementSet.get_requirementcCs|jt|j ¡ƒSr)rÚlistrr()rrrrÚall_requirementsÈszRequirementSet.all_requirements)T)NN) r0Ú
__module__Ú __qualname__rr*r3r7r9rTrVrDÚpropertyrYrrrrrs
 
 
s        r)Ú
__future__rÚloggingÚ collectionsrZpip._vendor.packaging.utilsrÚpip._internal.exceptionsrÚpip._internal.models.wheelrZpip._internal.utilsrÚpip._internal.utils.typingrÚtypingr    r
r r r Zpip._internal.req.req_installrÚ    getLoggerr0r;ÚobjectrrrrrÚ<module>s