Ë
    nûàg„  ã                  óö   — 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      ú]/var/www/skyplay_api_hub/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                óZ  — t        t        j                  | «      «      }t        t        |«      }t        t        |«      }t        t        t        |«      «      }|D ],  }|dt        |j                  «      z      j                  |«       Œ. t        d„ |j                  «       D «       «      }||fS )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  óŒ   K  — | ]<  \  }}|t        t        j                  d „ t        t        |«      D «       «      «      f–— Œ> y­w)c              3  ó2   K  — | ]  }t        |«      –— Œ y ­w©N)r   )Ú.0r"   s     r   ú	<genexpr>z?_move_install_requirements_markers.<locals>.<genexpr>.<genexpr>R   s   è ø€ ÒB¨!œs 1ŸvÑBùs   ‚N)Úlistr   ÚfromkeysÚmapÚ
_clean_req)r(   Úkr!   s      r   r)   z5_move_install_requirements_markers.<locals>.<genexpr>P   s>   è ø€ ò ñ ˆAˆqð 
Œ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ð # OÐ3Ð3r   c                óN   — | j                   rdt        | j                   «      z   S dS )z;Return the 'extras_require' suffix for a given requirement.r$   Ú )r1   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   r1   )r:   r"   s     r   r-   r-   ^   s   € ä”C˜“HÓ€AØ€A„HØ€Hr   c                ó   — | j                    S r'   )r1   r9   s    r   r0   r0   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ÚlinesrB   s       r   Ú_write_requirementsrG   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   rG   ÚsortedÚwriteÚformatÚvarsÚwrite_or_delete_fileÚgetvalue)ÚcmdÚbasenameÚfilenameÚdistÚdatar   r   Úextras           r   Úwrite_requirementsrY   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)rK   rL   rG   rJ   Úsetup_requiresrQ   rR   )rS   rT   rU   rW   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   rK   Úcollectionsr   Úcollections.abcr   Ú	itertoolsr   Útypingr   Újaraco.textr   Úpackaging.requirementsr	   r8   r   r   r   r   r   r   r   r   r   r-   r0   rG   rY   r\   r>   r   r   ú<module>rh      s¶   ðñõ #ã 	Ý #Ý #Ý !Ý å #Ý .å Ý ñ ˆTƒ]€Ø��D�‰>€ðHØ ðHØ2JðHà+óHðØ,ðà,óð$4Ø ð4Ø2Uð4à+ó4ò@7ò
òòò
HóNr   