Ë CÈR…öŒÑãóþ—dZddlmZddlZddlZddlZddlZddlZddl m Z ddl m Z ddl mZddlmZd „Zej$d „«Zej)e«d „«Zd „Zd „Zd„Zdd„Zdd„Z dd„Zdd„Zy)z2 Tools for converting old- to new-style metadata. é)Ú annotationsN)ÚMessage)ÚParser)ÚIteratoré)Ú Requirementcó.—|xr|jd« S)NÚ#)Ú startswith)Ústrs ú3/usr/lib/python3.12/site-packages/wheel/metadata.pyÚ _nonblankrs€Ø Ò *�s—~‘~ cÓ*Ð*Ð*ócó\—tjjtt|««S)a� Yield valid lines of a string or iterable. >>> list(yield_lines('')) [] >>> list(yield_lines(['foo', 'bar'])) ['foo', 'bar'] >>> list(yield_lines('foo\nbar')) ['foo', 'bar'] >>> list(yield_lines('\nfoo\n#bar\nbaz #comment')) ['foo', 'baz #comment'] >>> list(yield_lines(['foo\nbar', 'baz', 'bing\n\n\n'])) ['foo', 'bar', 'baz', 'bing'] )Ú itertoolsÚchainÚ from_iterableÚmapÚ yield_lines)Úiterables r rrs €ô �?‰?× (Ñ (¬¬[¸(Ó)CÓ DÐDrcón—ttttj|j «««S©N)Úfilterrrr ÚstripÚ splitlines)Útexts r Ú_r(s!€ä ”)œS¤§¡¨D¯O©OÓ,=Ó>Ó ?Ð?rc#óþK—d}g}t|«D]a}|jd«r=|jd«r |s|r||f–—|ddj«}g}ŒEt d|«‚|j |«Œc||f–—y­w)arSplit a string or iterable thereof into (section, content) pairs Each ``section`` is a stripped version of the section header ("[section]") and each ``content`` is a list of stripped lines excluding blank lines and comment-only lines. If there are any such lines before the first section header, they're returned in a first ``section`` of ``None``. NÚ[Ú]réÿÿÿÿzInvalid section heading)rr ÚendswithrÚ ValueErrorÚappend)ÚsÚsectionÚcontentÚlines r Úsplit_sectionsr)-sˆèø€ð€GØ€GܘA–ˆØ �?‰?˜3Ô Ø�}‰}˜SÔ!Ù™gØ! 7Ð*Ò*ؘq ˜*×*Ñ*Ó,�Ø‘ä Ð!:¸DÓAÐAà �N‰N˜4Õ ðð �7Ð Óùs‚A;A=cóL—tjdd|«j«S)z°Convert an arbitrary string to a standard 'extra' name Any runs of non-alphanumeric characters are replaced with a single '_', and the result is always lowercased. z[^A-Za-z0-9.-]+r)ÚreÚsubÚlower)Úextras r Ú safe_extrar/Fs!€ô �6‰6Ð# S¨%Ó 0× 6Ñ 6Ó 8Ð8rcó0—tjdd|«S)zŽConvert an arbitrary string to a standard distribution name Any runs of non-alphanumeric/. characters are replaced with a single '-'. z[^A-Za-z0-9.]+Ú-)r+r,)Únames r Ú safe_namer3Ns€ô �6‰6Ð" C¨Ó .Ð.rcóð—t|dd«rd|jzSg}|jD]*}|j|j|j z«Œ,|rddj t|««zSy)zFReturn the version specifier for a requirement in PEP 345/566 fashion.ÚurlNz @ Ú Ú,Ú)Úgetattrr5Ú specifierr$ÚoperatorÚversionÚjoinÚsorted)Ú requirementÚ requires_distÚspecs r Úrequires_to_requires_distrBUsn€äˆ{˜E 4Ô(Ø�{—‘Ñ&Ð&à€MØ×%Ô%ˆØ×јTŸ]™]¨T¯\©\Ñ9Õ:ð&ñØ�S—X‘Xœf ]Ó3Ó4Ñ4Ð4àrc#óæK—|D]h}t|«}t|«}djtd„|jD«««}|rd|›d�}t |j «|z|z–—Œjy­w)z=Yield Requires-Dist: strings for parsed requirements strings.r7c3ó2K—|]}t|«–—Œy­wr)r/)Ú.0Úes r Ú z'convert_requirements..isèø€Ð RÑ8Q°1¤¨A§Ñ8Qùs‚rr N)rrBr=r>Úextrasr3r2)Ú requirementsÚreqÚparsed_requirementrArHs r Úconvert_requirementsrLdsrèø€ãˆÜ(¨Ó-ÐÜ(Ð);Ó<ˆØ—‘œ&Ñ RÐ8J×8QÒ8QÓ RÓRÓSˆÙ ؘ˜ �]ˆFäÐ*×/Ñ/Ó0°6Ñ9¸DÑ@Ó@ñùs‚A/A1c#óK—|j«D]k\}}d}|xsd}d|vr|jdd«\}}t|«}|rd|f–—|rd|zdz}|d|zz }|rd|z}t|«D] }d ||zf–—Œ Œmy ­w) a, Convert requirements from a setup()-style dictionary to ('Requires-Dist', 'requirement') and ('Provides-Extra', 'extra') tuples. extras_require is a dictionary of {extra: [requirements]} as passed to setup(), using the empty extra {'': [requirements]} to hold install_requires. r8Ú:rúProvides-ExtraÚ(z) and z extra == '%s'z ; ú Requires-DistN)ÚitemsÚsplitr/rL)Úextras_requirer.ÚdependsÚ conditionÚnew_reqs r Úgenerate_requirementsrXps­èø€ð)×.Ñ.Ö0‰ˆˆw؈ Ø’ ˜ˆØ �%‰<Ø$Ÿ{™{¨3°Ó2Ñ ˆE�9ä˜5Ó!ˆÙ Ø" EÐ)Ò )ÙØ )™O¨hÑ6� Ø ˜¨5Ñ0Ñ 0ˆIá Ø  Ñ)ˆIä+¨GÖ4ˆGØ! 7¨YÑ#6Ð6Ó 6ñ5ñ!1ùs‚BBc ó —t|d¬«5}t«j|«}ddd«jdd«|d=|d=tj j |d«}tj j|«rvt|d¬«5}|j«}ddd«tt«d „¬ «}|D]4\}} t|| i«D]\} } | | f|j«vsŒ| || <Œ!Œ6|d } | rq|d j«} d j | d j«tj d j | dd««d f«}|j#|«|d =|S#1swY�ŒQxYw#1swYŒàxYw)zN Convert .egg-info directory with PKG-INFO to the Metadata 2.1 format zutf-8)ÚencodingNzMetadata-Versionz2.1rOrQz requires.txtcó—|dxsdS)Nrr8©)Úxs r Úz%pkginfo_to_metadata..žs€ÈQÈqÉTÊZÐUWÈZr)ÚkeyÚ DescriptionÚ rr)ÚopenrÚparseÚreplace_headerÚosÚpathr=ÚexistsÚreadr>r)rXrRrÚlstripÚtextwrapÚdedentÚ set_payload)Ú egg_info_pathÚ pkginfo_pathÚheadersÚpkg_infoÚ requires_pathÚ requires_fileÚrequiresÚparsed_requirementsr.Úreqsr_ÚvalueÚ descriptionÚdescription_linesÚdedented_descriptions r Úpkginfo_to_metadatarzŽs~€ô ˆl WÕ -°Ü“8—>‘> 'Ó*ˆ÷ .ð ×ÑÐ.°Ô6àÐ!Ð"Ø�Ð!Ü—G‘G—L‘L °Ó?€MÜ ‡w�w‡~�~�mÔ$Ü �-¨'Õ 2°mØ$×)Ñ)Ó+ˆH÷3ô%¤^°HÓ%=ÑCWÔXÐÛ.‰KˆE�4Ü3°U¸D°MÖB‘ ��Uؘ�< x§~¡~Ó'7Ò7Ø$)�H˜S’MñCð/ð ˜=Ñ)€KÙØ$ ]Ñ3×>Ñ>Ó@ÐØ#Ÿy™yð" !Ñ$×+Ñ+Ó-Ü—‘ § ¡ Ð*;¸A¸BÐ*?Ó @ÓAØð ó Ðð ×ÑÐ1Ô2Ø �]Ð #à €O÷C .Ñ -ú÷3Ð 2úsŽE7ÂFÅ7FÆF )r?rÚreturnr )rIz list[str]r{z Iterator[str])rTzdict[str, list[str]]r{zIterator[tuple[str, str]])rmr rnr r{r)Ú__doc__Ú __future__rÚ functoolsrÚos.pathrer+rjÚ email.messagerÚ email.parserrÚtypingrÚvendored.packaging.requirementsrrÚsingledispatchrÚregisterr rr)r/r3rBrLrXrzr\rr Úr†s ðñõ#ãÛÛÛ ÛÝ!ÝÝå8ò+ð ×ÑñEóðEð" ×Ñ�cÓñ@óð@òò29ò/ó ó Að7Ø(ð7àó7ô<%r