=OgyddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlmZmZddlmZmZddlmZmZddlmZmZddlmZmZddlmZdd lm Z dd l!m"Z"dd l m#Z#dd l$m%Z%m&Z&m'Z'm(Z(gd Z)Gdde*Z+GddZ,GddZ-Gdde-Z.Gdde/Z0Gdde0Z1GddZ2Gdde2e3Z4Gddej5Z6Gd d!Z7Gd"d#Z8Gd$d%e"Z9Gd&d'Z:Gd(d)Z;Gd*d+Z<Gd,d-e9Z=Gd.d/e8Z>d0Z?d1Z@d2ejfd3ZAd4ZBe jCeejDd56ZE d2e(e1e4ffd7ZFd8ZGd9ZHd2e&eIe%eIffd:ZJd;ZKd<ZLdS)=N) _adapters_meta)FreezableDefaultDictPair) method_cache pass_none)always_iterableunique_everseen)PackageMetadata SimplePath)suppress) import_module)MetaPathFinder)starmap)ListMappingOptionalUnion) DistributionDistributionFinderr PackageNotFoundError distribution distributions entry_pointsfilesmetadatapackages_distributionsrequiresversionc,eZdZ dZedZdS)rcd|jS)Nz"No package metadata was found for nameselfs B/opt/alt/python311/lib64/python3.11/importlib/metadata/__init__.py__str__zPackageNotFoundError.__str__1s?DI???c|j\}|SN)argsr&r$s r'r$zPackageNotFoundError.name4s) r)N)__name__ __module__ __qualname__r(propertyr$r)r'rr.sD$@@@Xr)rceZdZ ejdZedZe ddZ e dZ dS) Sectionedzm [sec1] # comments ignored a = 1 b = 2 [sec2] a = 2 cNd|||jDS)Nc3~K|]8}|j |tj|jV9dS)N)value)r$_replacerparser7).0sections r' z*Sectioned.section_pairs..esS  |'   4:gm#<#<  = =''''  r))filter_)readvalid)clstexts r' section_pairszSectioned.section_pairscs5  88D#)8<<    r)Nc#4Kt|ttj|}d}|D]V}|do|d}|r|d}Dt||VWdS)N[]z[])filtermapstrstrip splitlines startswithendswithr)rAr=linesr$r7 section_matchs r'r>zSectioned.readkswCIt/@/@ A ABB $ $E!,,S11IennS6I6IM {{4((tU## # # # #  $ $r)c2|o|d S)N#)rK)lines r'r?zSectioned.validvs0DOOC0000r)r+) r.r/r0textwrapdedentlstrip_sample classmethodrB staticmethodr>r?r2r)r'r4r4:s8ho    fhh   [ $$$\$11\111r)r4cHeZdZ ejejdedZdZ dS)DeprecatedTuplezAEntryPoint tuple interface is deprecated. Access members by name. stacklevelc^|||Sr+)_warn_key)r&items r' __getitem__zDeprecatedTuple.__getitem__s" yy{{4  r)N) r.r/r0 functoolspartialwarningswarnDeprecationWarningr^rar2r)r'rYrY{sQ  I  K    E!!!!!r)rYceZdZU ejdZ eed<eed<eed<dZe ded<dZ d Z e d Z e d Ze d Zd ZdZdZdZdZdZdZdZdZdS) EntryPointzH(?P[\w.]+)\s*(:\s*(?P[\w.]+)\s*)?((?P\[.*\])\s*)?$r$r7groupNrdistcPt||||dS)Nr$r7rivarsupdate)r&r$r7ris r'__init__zEntryPoint.__init__s) T t5>>>>>r)c, |j|j}t|d}t d|dpdd}tjt||S)Nmoduleattr.) patternmatchr7rrirFsplitrbreducegetattr)r&rwrrattrss r'loadzEntryPoint.loads|  ""4:..u{{84455tekk&117R>>sCCDD777r)cj|j|j}|dS)Nrrrvrwr7rir&rws r'rrzEntryPoint.modules+ ""4:..{{8$$$r)cj|j|j}|dS)Nrsr~rs r'rszEntryPoint.attrs+ ""4:..{{6"""r)c|j|j}tjd|dpdS)Nz\w+extrasrt)rvrwr7refindallrirs r'rzEntryPoint.extrass< ""4:..z&%++h"7"7"=2>>>r)cLt|||S)Nrjrm)r&rjs r'_forzEntryPoint._fors$ T t$$$ r)ch d}tj|tt|j|fS)NzJConstruction of dict of EntryPoints is deprecated in favor of EntryPoints.)rdrerfiterr$)r&msgs r'__iter__zEntryPoint.__iter__s;  $   c-...TY%&&&r)c fd|D}tttj||S)Nc38K|]}t|VdSr+rz)r:paramr&s r'r<z%EntryPoint.matches..s-::%u%%::::::r))allrGoperatoreqvalues)r&paramsr{s` r'matcheszEntryPoint.matchessG &;:::6:::3x{FMMOOU;;<< ")))???888%%X%##X#??X? ' ' '===.111***+++BBB   !!!!!r)rhceZdZ dZejejdedZ de ffd Z e ee ddZd ZxZS) DeprecatedListr2zAEntryPoints list interface is deprecated. Cast to list if needed.rZr[ method_namecfd}|fS)Ncp|tt|i|Sr+)r^rzsuper)r&r,kwargs __class__rs r'wrappedz7DeprecatedList._wrap_deprecated_method..wrappedCs3 JJLLL07577K00$A&AA Ar)r2)rrrs` r'_wrap_deprecated_methodz&DeprecatedList._wrap_deprecated_methodBs5 B B B B B BG##r)zM__setitem__ __delitem__ append reverse extend pop remove __iadd__ insert sortct|ts#|t|}|t||zSr+) isinstancetupler^rrs r'__add__zDeprecatedList.__add__QsI%'' ! JJLLL%LLE~~eDkkE1222r)ct|ts#|t|}t||Sr+)rrr^rrs r'rzDeprecatedList.__eq__WsF%'' ! JJLLL%LLET{{!!%(((r))r.r/r0 __slots__rbrcrdrerfr^rHrlocalsrorGrxrr __classcell__rs@r'rrs>I I  K    E$S$$$$$$ FHHOO  # ##(577  333 )))))))r)rceZdZ dZfdZdZedZedZe dZ e dZ xZ S) EntryPointsr2cF t|tr=tjdtdt |S tt| |S#t$rt|wxYw)NzGAccessing entry points by index is deprecated. Cast to tuple if needed.rZr[r#) rintrdrerfrranextrselect StopIterationKeyErrorr&r$rs r'razEntryPoints.__getitem__fs  dC  - M+"      77&&t,, , !T[[d[334455 5 ! ! !4..  !s /BB c < tfd|DS)Nc36K|]}|jdi|VdSNr2)r)r:eprs r'r<z%EntryPoints.select..|s:EE"  0D0DV0D0DE2EEEEEEr)rr&rs `r'rzEntryPoints.selectws- EEEEEEEEEEr)c d|DS)Nch|] }|j Sr2r#r:rs r' z$EntryPoints.names..s'''B'''r)r2r%s r'nameszEntryPoints.names~s ('$''''r)c d|DS)Nch|] }|j Sr2)rirs r'rz%EntryPoints.groups..s(((R(((r)r2r%s r'groupszEntryPoints.groupss )(4((((r)cX|fd||DS)Nc3BK|]}|VdSr+)r)r:rrjs r'r<z-EntryPoints._from_text_for..s-@@R2774==@@@@@@r)) _from_text)r@rArjs `r'_from_text_forzEntryPoints._from_text_fors4s@@@@3>>$+?+?@@@@@@r)cNdt|pdDS)Nc3lK|]/}t|jj|jj|jV0dS)rlN)rhr7r$)r:r`s r'r<z)EntryPoints._from_text..sP   DJO4:3C49 U U U      r)rt)r4rB)rAs r'rzEntryPoints._from_texts5  !// ;;    r))r.r/r0rrarr1rrrVrrWrrrs@r'rr_sI!!!!!"FFF((X( ))X)AA[A  \     r)rceZdZ ejejdedZfdZ d fd Z fdZ fdZ fd Z fd ZxZS) Deprecatedz:SelectableGroups dict interface is deprecated. Use select.rZr[cn|t|Sr+)r^rrars r'razDeprecated.__getitem__s( ww""4(((r)Ncp|t||Sr+)r^rget)r&r$defaultrs r'rzDeprecated.gets( ww{{4)))r)cl|tSr+)r^rrr&rs r'rzDeprecated.__iter__s& ww!!!r)cX|tj|Sr+)r^r __contains__)r&r,rs r'rzDeprecated.__contains__s$ #uww#T**r)cl|tSr+)r^rkeysrs r'rzDeprecated.keyss" ww||~~r)cl|tSr+)r^rrrs r'rzDeprecated.valuess$ ww~~r)r+)r.r/r0rbrcrdrerfr^rarrrrrrrs@r'rrs, I  D    E)))))******"""""+++++         r)rcxeZdZ edZefdZedZedZdZ xZ S)SelectableGroupsctjd}t||}tj||}|d|DS)Nrikeyc3>K|]\}}|t|fVdSr+r)r:riepss r'r<z(SelectableGroups.load..s3GGE;s++,GGGGGGr))r attrgettersorted itertoolsgroupby)r@rby_grouporderedgroupeds r'r|zSelectableGroups.loadsU&w//(+++#GX66sGGwGGGGGGr)c tt|}ttj|Sr+)rrrrrchain from_iterable)r&rrs r'_allzSelectableGroups._allsC z4((//119?88@@AAAr)c|jjSr+)rrr%s r'rzSelectableGroups.groupss yr)c |jjSr+)rrr%s r'rzSelectableGroups.namess yr)c .|s|S|jjdi|Sr)rrrs r'rzSelectableGroups.selects* Kty))&)))r)) r.r/r0rVr|r1rrrrrrs@r'rrs HH[H BBBBXB  X X*******r)rc$eZdZ ddZdZdZdS) PackagePathutf-8c||5}|cdddS#1swxYwYdS)Nencodinglocateopenr>)r&rstreams r' read_textzPackagePath.read_texts [[]]    2 2 !f;;== ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !sA  AAc|d5}|cdddS#1swxYwYdS)Nrbr)r&rs r' read_binaryzPackagePath.read_binarys [[]]   % % !;;== ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !sA  A A c8 |j|Sr+)rj locate_filer%s r'rzPackagePath.locates5y$$T***r)N)r)r.r/r0rrrr2r)r'rrsI,!!!!!!!+++++r)rceZdZdZdZdS)FileHashcL|d\|_}|_dS)N=) partitionmoder7)r&spec_s r'rpzFileHash.__init__ s"#'>>##6#6  1djjjr)c(d|jd|jdS)Nz)rr7r%s r'rzFileHash.__repr__sB$)BBTZBBBBr)N)r.r/r0rprr2r)r'r r  s7777CCCCCr)r ceZdZ ejdZejdZedefdZ edZ e dZ e dZ edejfd Zed Zed Zed Zed ZedZdZdZedZdZdZedZe dZdS)rcdSr+r2r&filenames r'rzDistribution.read_texts   r)cdSr+r2r&paths r'r zDistribution.locate_files   r)r$c |std t||S#t$rt |wxYw)Nz A distribution name is required.r#) ValueErrorrdiscoverrr)r@r$s r' from_namezDistribution.from_name%sk  A?@@ @ - $ //00 0 - - -&t,, , -s "7Ac  |ddr|rtdptjdi|tjfd|DS)Ncontextz cannot accept context and kwargsc3.K|]}|VdSr+r2)r:resolverr!s r'r<z(Distribution.discover..Es>- - "*HHW  - - - - - - r)r2)poprrContextrrr_discover_resolvers)r@rr!s @r'rzDistribution.discover7s **Y--  Av A?@@ @A/7AA&AA,,- - - - .1.E.E.G.G- - -    r)cF ttj|Sr+)PathDistributionpathlibPath)rs r'atzDistribution.atIs!   T 2 2333r)cP dtjD}td|S)Nc38K|]}t|ddVdS)find_distributionsNr)r:finders r'r<z3Distribution._discover_resolvers..Us@  .make_filesH &&F,0:(4...dFK+3=#h---FKFKMr)cbtttj|Sr+)listrcsvreader)rMrJs r' make_filesz&Distribution.files..make_filess% 3:e+<+<==>> >r))NN)r _read_files_distinfo_read_files_egginfo)r&rOrJs` @r'rzDistribution.files~s{         ? ? ? ?  ?z$3355S9Q9Q9S9STTTr)cZ |d}|o|S)NRECORD)rrJr9s r'rPz!Distribution._read_files_distinfos/ ~~h''))))r)c |d}|o&tdj|S)Nz SOURCES.txtz"{}")rrGformatrJr9s r'rQz Distribution._read_files_egginfos; ~~m,,=FM4??+<+<===r)cv |p|}|ot|Sr+)_read_dist_info_reqs_read_egg_info_reqsrL)r&reqss r'rzDistribution.requiress8D((**Hd.F.F.H.H"T "r)c6|jdS)Nz Requires-Dist)rget_allr%s r'rWz!Distribution._read_dist_info_reqss}$$_555r)cf|d}t|j|S)Nz requires.txt)rr _deps_from_requires_text)r&sources r'rXz Distribution._read_egg_info_reqss.//7y677???r)c\|t|Sr+)%_convert_egg_info_reqs_to_simple_reqsr4r>)r@r^s r'r]z%Distribution._deps_from_requires_texts"889O9OPPPr)c#K dfd}d}|D]/}||j}|j|z||jzV0dS)Nc|od|dS)Nz extra == ""r2r#s r'make_conditionzJDistribution._convert_egg_info_reqs_to_simple_reqs..make_conditions00000 0r)c |pd}|d\}}}|r|rd|d}ttd||g}|rdd|zndS)Nrt:(rz; z and )rrLrFjoin)r;extrasepmarkers conditionsrds r' quoted_markerzIDistribution._convert_egg_info_reqs_to_simple_reqs..quoted_markersmG")"3"3C"8"8 E3 ) )(g...fTG^^E5J5J+KLLMMJ6@H4',,z2222b Hr)c dd|vzS)N @r2)reqs r' url_req_spacezIDistribution._convert_egg_info_reqs_to_simple_reqs..url_req_spaces  #*% %r))r7r$)sectionsrmrrr;spacerds @r'r`z2Distribution._convert_egg_info_reqs_to_simple_reqss  1 1 1 I I I I I & & &  F FG!M'-00E-%'-- *E*EE E E E E F Fr)N)r.r/r0abcabstractmethodrr rVrHrrrWr+r&r1rr rr$rAr rrrPrQrrWrXr]r`r2r)r'rrs(       -S---[-"  [ "44\4&&\&B%/BBBXB %%X%--X-((X(TTXTUUXU0***>>>##X# 666@@@QQ[Q F F\ F F Fr)rc^eZdZ GddZejefdZdS)rc2eZdZ dZ dZedZdS)DistributionFinder.ContextNc Jt||dSr+rm)r&rs r'rpz#DistributionFinder.Context.__init__s" JJ  f % % % % %r)c^ t|dtjS)Nr)rnrr0rr%s r'rzDistributionFinder.Context.paths% ::>>&#(33 3r))r.r/r0r$rpr1rr2r)r'r%rysO   & & &  4 4  4 4 4r)r%cdSr+r2)r&r!s r'r.z%DistributionFinder.find_distributionss   r)N)r.r/r0r%rurvr.r2r)r'rrso44444444@ )0      r)rceZdZ ejfdZdZdZdZdZ dZ e dZ e dZxZS) FastPathcFt|Sr+)r__new__)r@rootrs r'rzFastPath.__new__swws###r)c||_dSr+)r)r&rs r'rpzFastPath.__init__s  r)c6tj|j|Sr+)r)r*r)r&childs r'joinpathzFastPath.joinpaths|DIu---r)ctt5tj|jpdcdddS#1swxYwYtt5|cdddS#1swxYwYgS)Nru)r Exceptionoslistdirr zip_childrenr%s r'childrenzFastPath.childrens i  0 0:di.3// 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 i  ' '$$&& ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' s!=AAA==BBctj|j}|j}|j|_t d|DS)Nc3bK|]*}|tjddV+dS)rrN)rx posixpathrj)r:rs r'r<z(FastPath.zip_children..*s7QQ%U[[::1=QQQQQQr))zipfiler*rnamelistrdictfromkeys)r&zip_pathrs r'rzFastPath.zip_children%sQ< ** &&(( ) }}QQ5QQQQQQr)c\||j|Sr+)lookupmtimesearchr-s r'rzFastPath.search,s${{4:&&--d333r)ctt5tj|jjcdddS#1swxYwY|jdSr+)rOSErrorrstatrst_mtimer cache_clearr%s r'rzFastPath.mtime/s g   / /749%%. / / / / / / / / / / / / / / / / !!!!!sAAAc t|Sr+)Lookup)r&rs r'rzFastPath.lookup5sd||r))r.r/r0rb lru_cacherrprrrrr1rrrrrs@r'r~r~ sY$$$$$...RRR444""X" \r)r~c eZdZdefdZdZdS)rrctj|j}|d}t t|_t t|_ | D]7}|}|dr| dd dd}t|}|j||||r|dkr| dd dd}t|}|j |||9|j|j dS)Nz.eggz .dist-infoz .egg-inforur-zegg-info)rrbasenamerlowerrLrrLinfoseggsr rpartitionrr?r@appendrlegacy_normalizefreeze) r&rbase base_is_eggrlowr$ normalizedlegacy_normalizeds r'rpzLookup.__init__;sw **0022mmF++ )$// (.. ]]__ J JE++--C||788 J~~c**1-77<X* , , , , ,r)rcPeZdZ dZdZdZedZedZdZ dS)r?Nc||_|dS|||_|||_dSr+)r$r@rrrr-s r'rpzPrepared.__init__fsB < F....!%!6!6t!.s@- - &*DKK ! !- - - - - - r))r?rrrrGr~)r@r$pathsrs @r'rz MetadataPathFinder._search_pathss[?D>>,,- - - - .1(E.B.B- - -    r)cBtjdSr+)r~rr)r@s r'invalidate_cachesz$MetadataPathFinder.invalidate_cachess$$&&&&&r)N) r.r/r0rVrr%r.rrr2r)r'rrsw(:(B(B(D(D , , ,[ ,  [ ''['''r)rc~eZdZdefdZdZejje_dZe fdZ e dZ xZ S)r(rc ||_dSr+)_pathrs r'rpzPathDistribution.__init__s  r)ctttttt 5|j|dcdddS#1swxYwYdS)Nrr) rFileNotFoundErrorIsADirectoryErrorrNotADirectoryErrorPermissionErrorrrrrs r'rzPathDistribution.read_texts          M M:&&x00::G:LL M M M M M M M M M M M M M M M M M Ms.A((A,/A,c |jj|z Sr+)rparentrs r'r zPathDistribution.locate_filesz 4''r)c tjt|j}t t j||ptj Sr+) rrrrHrr r?r@_name_from_stemrrA)r&stemrs r'rAz!PathDistribution._normalized_namesa wDJ00 )Ih( ) )$*>*>t*D*D E E (ww' r)c tj|\}}|dvrdS|d\}}}|S)Nrr)rrsplitextr)rrextr$rjrests r'rz PathDistribution._name_from_stemsQ ((.. # 1 1 1 F",,S11c4 r))r.r/r0r rprr__doc__r r1rArWrrrs@r'r(r(sZMMM%.6I(((     X  \r)r(c8 t|Sr+)rrdistribution_names r'rrs  ! !"3 4 44r)c & tjdi|Sr)rr)rs r'rrs   * *6 * **r)r3cB t|jSr+)rrrrs r'rrs!  ! !"3 4 4 ==r)c, t|jSr+)rr rs r'r r s ) * * 22r)rArc tjdtt D}t |jdi|S)Nc3$K|] }|jV dSr+)r)r:rjs r'r<zentry_points..s6(("((((((r)r2)rrr_uniquerrr|r)rrs r'rrso / ' '((&-moo&>&>(((  C   % % , 6 6v 6 66r)c, t|jSr+)rrrs r'rrs ) * * 00r)c, t|jSr+)rrrs r'rrs ) * * 33r)c tjt}tD]I}t |pt |D](}|||jd)Jt|Sr;) collections defaultdictrLr_top_level_declared_top_level_inferredrrr) pkg_to_distrjpkgs r'rr's)$//K;;&t,,I0CD0I0I ; ;C   # #DM&$9 : : : : ;   r)cT|dpdS)Nz top_level.txtrt)rrxrs r'rr8s% NN? + + 1r 8 8 : ::r)c>dt|jDS)Nch|]L}|jdk t|jdkr |jdn|djMS)z.pyrrrt)suffixlenparts with_suffixr$)r:fs r'rz&_top_level_inferred..=sZ    8u  !'llQ&& AMM",=,=,B   r))r rrs r'rr<s-   ,,   r))MrrrurMr0r7r)rrrRrdrbrrrrtrr _collectionsrr _functoolsrr _itertoolsr r r r contextlibr importlibr importlib.abcrrtypingrrrr__all__ModuleNotFoundErrorrr4rYrhrLrrrrr PurePosixPathrr rrr~rr?rr(rrrr rcrrrrrrHrrrr2r)r'rs 44444444////////88888888........######((((((111111111111        .   >1>1>1>1>1>1>1>1B!!!!!!!!4A!A!A!A!A!A!A!A!HC)C)C)C)C)TC)C)C)L: : : : : .: : : z4 4 4 4 4 4 4 4 n%*%*%*%*%*z4%*%*%*P + + + + +'' + + + CCCCCCCCEFEFEFEFEFEFEFEFP- - - - - - - - `,,,,,,,,^!,!,!,!,!,!,!,!,HD'''''+'''622222|222j555+++>5#8>>>>333 ) .//    7eK1A$AB7777.111444T#Y 7";;;r)