+
     h  c                  s    R t ^ RIHt ^ RIt^ RIHt ^ RIHt ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHt ^R	IHt ^R
IHt ]! R4      t]]R3,          tR R ltR R ltR R ltR tR tR tR tR tR tR# )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               $    V ^8  d   QhRRRRRR/# )   install_requiresr   extras_requireMapping[str, _StrOrIter]return&tuple[list[str], dict[str, list[str]]] format   "D/usr/lib/python3.14/site-packages/setuptools/command/_requirestxt.py__annotate__r      s)     H H H2JH+H    c                s.    \        V4      p\        W4      # )zGiven 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)r   r   Zextrass   && r   _preparer      s     *.9F-.>GGr   c               s     V ^8  d   QhRRRR/# )r   r   r   r   z'defaultdict[str, _Ordered[Requirement]]r   r   r   r   r   r   '   s      ,,r   c                s(   \         \        \        \        ,          3,          ! \        4      pV P                  4        FQ  w  r#W,           \        P                  ! V4       F*  pW\        V4      ,           ,          P                  V4       K,  	  KS  	  V# )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   ZoutputZsectionvrs   &    r   r   r   '   sj     h{334T:F$**,
QA[^+,77:   - Mr   c               r
   )r   r   r   r   z#Mapping[str, _Ordered[Requirement]]r   r   r   r   r   r   r   r   9   s$     4 4 42U4+4r   c                sn   \        \        P                  ! V 4      4      p\        \        V4      p\        \        V4      p\        \        \        V4      4      pV F5  pVR\        VP                  4      ,           ,          P                  V4       K7  	  \        R VP                  4        4       4      pWW3# )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  s   "   T F<  w  rV\        \        P                  R  \        \        V4       4       4      4      3x  K>  	  R# 5i)c              3  s8   "   T F  p\        V4      x  K  	  R # 5iN)r   ).0r#      & r   	<genexpr>Z?_move_install_requirements_markers.<locals>.<genexpr>.<genexpr>R   s     B/A!s1vv/As   N)listr   Zfromkeysmap
_clean_req)r&   Zkr"   s   &  r   r(   Z5_move_install_requirements_markers.<locals>.<genexpr>P   s;       +DA 
DBs:q/ABBCD*s   AA)r)   r   r   Zfilter
_no_markerr   r*   r   markerr!   r   r   )r   r   Z	inst_reqsZsimple_reqsZcomplex_reqsZsimple_install_requiresr#   Zexpanded_extrass   &&      r   r   r   9   s     U[[!123IY/Kz95L"3sK#89sS]*+66q9    #((* O #33r   c                sb    V P                   '       d   R\        V P                   4      ,           # R# )z;Return the 'extras_require' suffix for a given requirement.r$    )r-   r   req   &r   r    r    Y   s"    $'JJJ3SZZ 6B6r   c                s<    \        \        V 4      4      pRVn        V# )z=Given a Requirement, remove environment markers and return itN)r   r   r-   )r0   r#   r'   r   r+   r+   ^   s    CHAAHHr   c                s$    V P                   '       * # r%   )r-   r/   r1   r   r,   r,   e   s    zz>r   c                sn    \        T;'       g    R4      pR  p\        W24      pV P                  V4       R# )c                s    V R ,           # )Z
r   )Zliner1   r   	append_crZ&_write_requirements.<locals>.append_crl   s    d{r   Nr   )r   r*   Z
writelines)ZstreamZreqsZlinesr2   s   &&  r   _write_requirementsr3   i   s1    

#E 	!E
er   c           	     s   V P                   p\        P                  ! 4       p\        VP                  ;'       g    RVP
                  ;'       g    / 4      w  rV\        WE4       \        V4       F>  pVP                  R P                  ! R/ \        4       B 4       \        WFV,          4       K@  	  V P                  RW$P                  4       4       R# )z
[{extra}]
ZrequirementsNr   )distributionioStringIOr   r   r   r3   ZsortedZwriter   Zvarswrite_or_delete_filegetvalue)cmdbasenamefilenameZdistdatar   r   Zextras   &&&     r   write_requirementsr=   s   s    D;;=D'/##T%8%8%>%>B($ /'

?))3DF34D"78 ( ^X}}Gr   c                s    \         P                  ! 4       p\        W0P                  P                  4       V P                  R W#P                  4       4       R# )zsetup-requirementsN)r5   r6   r3   r4   Zsetup_requiresr7   r8   )r9   r:   r;   r<   s   &&& r   write_setup_requirementsr>      s8    ;;=D..==>18]]_Mr   )Z__doc__Z
__future__r    r5   Zcollectionsr   Zcollections.abcr   Z	itertoolsr   Ztypingr   Zjaraco.textr   Zpackaging.requirementsr   r.   r   r   r	   r   r   r   r   r   r    r+   r,   r3   r=   r>   r   r   r   <module>r?      ss    # 	 # # !  # .   T]D>H$4@7

HNr   