Ë
    ¨Õ°j~  ã                  óö   — d Z ddlmZ ddlZddlmZ ddlmZ ddlm	Z	 ddl
mZ ddlmZ dd	lmZ d
dlmZ d
dlmZ  ed«      Zeedf   Z	 	 	 	 	 	 dd„Z	 	 	 	 dd„Z	 	 	 	 	 	 dd„Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zy)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                ó0   — t        |«      }t        | |«      S )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      úU/var/www/mission/venv/lib/python3.12/site-packages/setuptools/command/_requirestxt.pyÚ_preparer      s   € ô *¨.Ó9€FÜ-Ð.>ÀÓGÐGó    c                óú   — t        t        t        t           f   t        «      }| j                  «       D ]D  \  }}||    t        j                  |«      D ]"  }||t        |«      z      j                  |«       Œ$ ŒF |S )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   '   sz   € ô œœh¤{Ñ3Ð3Ñ4´TÓ:€FØ$×*Ñ*Ó,ò ;‰
ˆ�àˆwŠÜ—‘˜Q“ò 	;ˆAØ�7œ[¨›^Ñ+Ñ,×7Ñ7¸Õ:ñ	;ð;ð €Mr   c                óÎ  — t        t        j                  | «      «      }t        t        |«      }t        t        |«      }t        t        t        |«      «      }|D ],  }|dt        |j                  «      z      j                  |«       Œ. |j                  «       D ��ci c]9  \  }}|t        t        j                  d„ t        t        |«      D «       «      «      “Œ; }	}}||	fS c c}}w )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  ó2   K  — | ]  }t        |«      –— Œ y ­w©N)r   )Ú.0r"   s     r   ú	<genexpr>z5_move_install_requirements_markers.<locals>.<genexpr>R   s   è ø€ ÒA¨œc !ŸfÑAùs   ‚)Úlistr   r   ÚfilterÚ
_no_markerr   Úmapr   Úmarkerr   r   r   ÚfromkeysÚ
_clean_req)
r   r   Ú	inst_reqsÚsimple_reqsÚcomplex_reqsÚsimple_install_requiresr"   Úkr!   Ú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ð:ð #×(Ñ(Ó*÷ñ ˆAˆqð 	
Œ4”—‘ÑA¬c´*¸aÓ.@ÔAÓAÓBÑBð€Oñ ð # OÐ3Ð3ùós   Â>C!c                óN   — | j                   rdt        | j                   «      z   S dS )z;Return the 'extras_require' suffix for a given requirement.r$   Ú )r-   r   ©Úreqs    r   r   r   Y   s    € à$'§J¢Jˆ3”�S—Z‘Z“Ñ Ð6°BÐ6r   c                ó<   — t        t        | «      «      }d|_        |S )z=Given a Requirement, remove environment markers and return itN)r	   r   r-   )r9   r"   s     r   r/   r/   ^   s   € ä”C˜“HÓ€AØ€A„HØ€Hr   c                ó   — | j                    S r&   )r-   r8   s    r   r+   r+   e   s   € Ø�z‰zˆ>Ðr   c                ób   — t        |xs d«      }d„ }t        ||«      }| j                  |«       y )N© c                ó   — | dz   S )Nú
r=   )Úlines    r   Ú	append_crz&_write_requirements.<locals>.append_crl   s   € Ø�d‰{Ðr   )r   r,   Ú
writelines)ÚstreamÚreqsÚlinesrA   s       r   Ú_write_requirementsrF   i   s1   € Ü˜š
 Ó#€Eòô �	˜5Ó!€EØ
×Ñ�eÕr   c           	     ó„  — | j                   }t        j                  «       }t        |j                  xs d|j
                  xs i «      \  }}t        ||«       t        |«      D ]:  }|j                   dj                  di t        «       ¤Ž«       t        |||   «       Œ< | j                  d||j                  «       «       y )Nr=   z
[{extra}]
Úrequirements)ÚdistributionÚioÚStringIOr   r   r   rF   ÚsortedÚwriteÚformatÚvarsÚwrite_or_delete_fileÚgetvalue)ÚcmdÚbasenameÚfilenameÚdistÚdatar   r   Úextras           r   Úwrite_requirementsrX   s   s¬   € Ø×Ñ€DÜ�;‰;‹=€DÜ'/Ø×ÑÒ#  T×%8Ñ%8Ò%>¸Bó(Ñ$Ð�nô ˜Ð.Ô/Ü˜Ó'ò 9ˆØ�
‰
Ð)�?×)Ñ)Ñ3¬D«FÑ3Ô4Ü˜D .°Ñ"7Õ8ð9ð ×Ñ˜^¨X°t·}±}³ÕGr   c                ó®   — t        j                  «       }t        || j                  j                  «       | j                  d||j                  «       «       y )Nzsetup-requirements)rJ   rK   rF   rI   Úsetup_requiresrP   rQ   )rR   rS   rT   rV   s       r   Úwrite_setup_requirementsr[   €   s<   € Ü�;‰;‹=€DÜ˜˜c×.Ñ.×=Ñ=Ô>Ø×ÑÐ1°8¸T¿]¹]»_ÕMr   )r   r   r   úMapping[str, _StrOrIter]Úreturnú&tuple[list[str], dict[str, list[str]]])r   r\   r]   z'defaultdict[str, _Ordered[Requirement]])r   r   r   z#Mapping[str, _Ordered[Requirement]]r]   r^   )Ú__doc__Ú
__future__r   rJ   Úcollectionsr   Úcollections.abcr   Ú	itertoolsr   Útypingr   Újaraco.textr   Úpackaging.requirementsr	   r7   r   r   r   r   r   r   r   r   r   r/   r+   rF   rX   r[   r=   r   r   ú<module>rg      s¶   ðñõ #ã 	Ý #Ý #Ý !Ý å #Ý .å Ý ñ ˆTƒ]€Ø��D�‰>€ðHØ ðHØ2JðHà+óHðØ,ðà,óð$4Ø ð4Ø2Uð4à+ó4ò@7ò
òòò
HóNr   