ReddlZddlZddlZddlZddlmZddlmZmZm Z m Z m Z m Z ddl mZddlmZddlmZejeZejdededfd Zejded fd ZGd d ZdS) N) TracebackType)DictIteratorOptionalSetTypeUnion)Link)InstallRequirement) TempDirectorychangesreturnc+Ktj}t}i}|D],\}} ||||<n#t$r|||<YnwxYw|||<- dV|D])\}}||ur||= t |t sJ|||<*dS#|D])\}}||ur||= t |t sJ|||<*wxYwN)osenvironobjectitemsKeyError isinstancestr)r targetnon_existent_marker saved_valuesname new_valueoriginal_values /builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/req/req_tracker.pyupdate_env_context_managerrsS ZF!((24L"==??!!i 5!'L   5 5 5!4L    5 t  . %1$6$6$8$8 . . D.!4444LL!.#66666-t  . .L$6$6$8$8 . . D.!4444LL!.#66666-t  .s AAA!B%%AC%RequirementTrackerc#Ktjd}tj5}|f|t dj}|t|t d|t|5}|Vdddn #1swxYwYddddS#1swxYwYdS)NPIP_REQ_TRACKERz req-tracker)kind)r"z Initialized build tracking at %s) rrget contextlib ExitStack enter_contextr pathrloggerdebugr )rootctxtrackers rget_requirement_trackerr.)sN :>>+ , ,D    3 <$$] %F%F%FGGLD   8NNN O O O LL;T B B B  % % MMM                s6A8C-B>2 C>C CC CCCceZdZdeddfdZddZdeeedeedee ddfd Z d e defd Z d e ddfd Zd e ddfdZddZejd e dedfdZdS)r r+rNcz||_t|_td|jdS)NzCreated build tracker: %s)_rootset_entriesr)r*)selfr+s r__init__zRequirementTracker.__init__7s1 14  0$*=====cFtd|j|S)NzEntered build tracker: %s)r)r*r1)r4s r __enter__zRequirementTracker.__enter__<s 0$*=== r6exc_typeexc_valexc_tbc.|dSr)cleanup)r4r9r:r;s r__exit__zRequirementTracker.__exit__@s r6linkctj|j}t j|j|Sr) hashlibsha224url_without_fragmentencode hexdigestrr(joinr1)r4r?hasheds r _entry_pathzRequirementTracker._entry_pathHsD 9 @ @ B BCCMMOOw||DJ///r6reqc\|jsJ||j} t|5}|}dddn #1swxYwYd|j|}t |#t $rYnwxYw||jvsJt|dd5}|t|dddn #1swxYwY|j |t d||j dS)z,Add an InstallRequirement to build tracking.Nz{} is already being built: {}wzutf-8)encodingzAdded %s to build tracker %r)r?rHopenreadformat LookupErrorFileNotFoundErrorr3writeraddr)r*r1)r4rI entry_pathfpcontentsmessages rrSzRequirementTracker.addLsx%%ch//  'j!! %R7799 % % % % % % % % % % % % % % % 6<r rHr rSrZr=r%contextmanagerrr^r6rr r 6sW>S>T>>>> 4 ./-('   000000F)FdFFFF8J,JJJJJ>>>> +r6)r%rAloggingrtypesrtypingrrrrrr pip._internal.models.linkr pip._internal.req.req_installr pip._internal.utils.temp_dirr getLoggerr_r)rcrrr.r rdr6rrlsY ================******<<<<<<666666  8 $ $ .#.(4.....2  *>!?    FFFFFFFFFFr6