ó
    µ'Ôi„  ã                  óü   • S r SSKJr  SSKrSSKJr  SSKJr  SSKJ	r	  SSK
Jr  SSKJr  SS	KJr  S
SKJr  S
SKJr  \" S5      r\\S4   r      SS jr    SS jr      SS jrS rS rS rS rS rS rg)aS  Helper code used to generate ``requires.txt`` files in the egg-info directory.

The ``requires.txt`` file has an specific format:
    - Environment markers need to be part of the section headers and
      should not be part of the requirement spec itself.

See https://setuptools.pypa.io/en/latest/deprecated/python_eggs.html#requires-txt
é    )ÚannotationsN)Údefaultdict)ÚMapping)Úfilterfalse)ÚTypeVar)Úyield_lines)ÚRequirementé   )Ú_reqs)Ú
_StrOrIterÚ_Tc                ó.   • [        U5      n[        X5      $ )z‡Given values for ``install_requires`` and ``extras_require``
create modified versions in a way that can be written in ``requires.txt``
)Ú_convert_extras_requirementsÚ"_move_install_requirements_markers)Úinstall_requiresÚextras_requireÚextrass      Ú^/var/www/surfInsights/venv3-11/lib/python3.13/site-packages/setuptools/command/_requirestxt.pyÚ_preparer      s   € ô *¨.Ó9€FÜ-Ð.>ÓGÐGó    c                ó   • [         [        [        [           4   " [        5      nU R                  5        HE  u  p#X     [        R                  " U5       H"  nX[        U5      -      R                  U5        M$     MG     U$ )z�
Convert requirements in `extras_require` of the form
`"extra": ["barbazquux; {marker}"]` to
`"extra:{marker}": ["barbazquux"]`.
)
r   ÚstrÚ_Orderedr	   ÚdictÚitemsr   ÚparseÚ_suffix_forÚ
setdefault)r   ÚoutputÚsectionÚvÚrs        r   r   r   '   sj   € ô œœh¤{Ñ3Ð3Ò4´TÓ:€FØ$×*Ñ*Ö,‰
ˆàŠÜ—’˜Q–ˆAØœ[¨›^Ñ+Ñ,×7Ñ7¸Ö:ó  ñ -ð €Mr   c                ó^  • [        [        R                  " U 5      5      n[        [        U5      n[        [        U5      n[        [        [        U5      5      nU H-  nUS[        UR                  5      -      R                  U5        M/     [        S UR                  5        5       5      nXW4$ )a  
The ``requires.txt`` file has an specific format:
    - Environment markers need to be part of the section headers and
      should not be part of the requirement spec itself.

Move requirements in ``install_requires`` that are using environment
markers ``extras_require``.
Ú:c              3  ó�   #   • U  H<  u  pU[        [        R                  S  [        [        U5       5       5      5      4v •  M>     g7f)c              3  ó8   #   • U  H  n[        U5      v •  M     g 7f©N)r   )Ú.0r"   s     r   Ú	<genexpr>Ú?_move_install_requirements_markers.<locals>.<genexpr>.<genexpr>R   s   é € ÐBÒ/A¨!œs 1Ÿv˜vÒ/Aùs   ‚N)Úlistr   ÚfromkeysÚmapÚ
_clean_req)r(   Úkr!   s      r   r)   Ú5_move_install_requirements_markers.<locals>.<genexpr>P   s;   é € ð ò +‰DˆAð 
ŒD”—‘ÑB¬s´:¸qÔ/AÓBÓBÓCÕDÚ*ùs   ‚AA)r+   r   r   ÚfilterÚ
_no_markerr   r-   r   Úmarkerr   r   r   )r   r   Ú	inst_reqsÚsimple_reqsÚcomplex_reqsÚsimple_install_requiresr"   Úexpanded_extrass           r   r   r   9   s›   € ô ”U—[’[Ð!1Ó2Ó3€IÜœ YÓ/€KÜœz¨9Ó5€LÜ"¤3¤s¨KÓ#8Ó9ÐãˆØ�sœS §¡›]Ñ*Ñ+×6Ñ6°qÖ9ñ ô ñ ð #×(Ñ(Ô*óó €Oð #Ð3Ð3r   c                óX   • U R                   (       a  S[        U R                   5      -   $ S$ )z;Return the 'extras_require' suffix for a given requirement.r$   Ú )r3   r   ©Úreqs    r   r   r   Y   s    € à$'§J§Jˆ3”�S—Z‘Z“Ñ Ð6°BÐ6r   c                ó<   • [        [        U 5      5      nSUl        U$ )z=Given a Requirement, remove environment markers and return itN)r	   r   r3   )r<   r"   s     r   r.   r.   ^   s   € ä”C˜“HÓ€AØ€A„HØ€Hr   c                ó$   • U R                   (       + $ r'   )r3   r;   s    r   r2   r2   e   s   € Ø�z‰zŒ>Ðr   c                ój   • [        U=(       d    S5      nS n[        X25      nU R                  U5        g )N© c                ó   • U S-   $ )NÚ
r@   )Úlines    r   Ú	append_crÚ&_write_requirements.<locals>.append_crl   s   € Ø�d‰{Ðr   )r   r-   Ú
writelines)ÚstreamÚreqsÚlinesrD   s       r   Ú_write_requirementsrJ   i   s/   € Ü˜Ÿ
 Ó#€Eòô �	Ó!€EØ
×Ñ�eÕr   c           	     ó–  • U R                   n[        R                  " 5       n[        UR                  =(       d    SUR
                  =(       d    0 5      u  pV[        XE5        [        U5       H:  nUR                  SR                  " S0 [        5       D65        [        XFU   5        M<     U R                  SX$R                  5       5        g )Nr@   z
[{extra}]
Úrequirements)ÚdistributionÚioÚStringIOr   r   r   rJ   ÚsortedÚwriteÚformatÚvarsÚwrite_or_delete_fileÚgetvalue)ÚcmdÚbasenameÚfilenameÚdistÚdatar   r   Úextras           r   Úwrite_requirementsr\   s   s›   € Ø×Ñ€DÜ�;Š;‹=€DÜ'/Ø×Ñ×#  T×%8Ñ%8×%>¸Bó(Ñ$Ðô ˜Ô/Ü˜Ö'ˆØ�
‰
�?×)Ò)Ñ3¬D«FÑ3Ô4Ü˜D°Ñ"7Ö8ñ (ð ×Ñ˜^¨X·}±}³ÕGr   c                ó¬   • [         R                  " 5       n[        X0R                  R                  5        U R                  SX#R                  5       5        g )Nzsetup-requirements)rN   rO   rJ   rM   Úsetup_requiresrT   rU   )rV   rW   rX   rZ   s       r   Úwrite_setup_requirementsr_   €   s8   € Ü�;Š;‹=€DÜ˜×.Ñ.×=Ñ=Ô>Ø×ÑÐ1°8¿]¹]»_ÕMr   )r   r   r   úMapping[str, _StrOrIter]Úreturnú&tuple[list[str], dict[str, list[str]]])r   r`   ra   z'defaultdict[str, _Ordered[Requirement]])r   r   r   z#Mapping[str, _Ordered[Requirement]]ra   rb   )Ú__doc__Ú
__future__r   rN   Úcollectionsr   Úcollections.abcr   Ú	itertoolsr   Útypingr   Újaraco.textr   Úpackaging.requirementsr	   r:   r   r   r   r   r   r   r   r   r   r.   r2   rJ   r\   r_   r@   r   r   Ú<module>rk      s¶   ðñõ #ã 	Ý #Ý #Ý !Ý å #Ý .å Ý ñ ˆTƒ]€Ø��D�‰>€ðHØ ðHØ2JðHà+ôHðØ,ðà,ôð$4Ø ð4Ø2Uð4à+ô4ò@7ò
òòò
HóNr   