Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
_requirestxt.cpython-313.pyc44 linesDownload Raw Back to __pycache__
1�

2`j�����SrSSKJr SSKrSSKJr SSKJr SSKJ	r	 SSK3Jr SSKJ
r
 SS	KJr S4SKJr S5SKJr \"S
5r\\S4rSSjrSSjrSSjrSrSrSrSrSrSrg)aSHelper code used to generate ``requires.txt`` files in the egg-info directory.6 7The ``requires.txt`` file has an specific format:8    - Environment markers need to be part of the section headers and9      should not be part of the requirement spec itself.10 11See https://setuptools.pypa.io/en/latest/deprecated/python_eggs.html#requires-txt12�)�annotationsN)�defaultdict)�Mapping)�filterfalse)�TypeVar)�yield_lines)�Requirement�)�_reqs)�13_StrOrIter�_Tc�.�[U5n[X5$)z�Given values for ``install_requires`` and ``extras_require``14create modified versions in a way that can be written in ``requires.txt``15)�_convert_extras_requirements�"_move_install_requirements_markers)�install_requires�extras_require�extrass   �QD:\code\apps\devtools\python\Lib\site-packages\setuptools/command/_requirestxt.py�_preparers��*�.�
9�F�-�.>�G�G�c��[[[[4"[5nUR5HEup#X [R"U5H"nX[U5-RU5 M$ MG U$)z�16Convert requirements in `extras_require` of the form17`"extra": ["barbazquux; {marker}"]` to18`"extra:{marker}": ["barbazquux"]`.19)20r�str�_Orderedr	�dict�itemsr�parse�_suffix_for�21setdefault)r�output�section�v�rs     rrr'sj����h�{�3�3�
4�T�
:�F�$�*�*�,�22�������Q��A��[��^�+�,�7�7��:� �-��Mrc�^�[[R"U55n[[U5n[[U5n[[
[U55nUH-nUS[UR5-RU5 M/ [SUR555nXW4$)a23The ``requires.txt`` file has an specific format:24    - Environment markers need to be part of the section headers and25      should not be part of the requirement spec itself.26 27Move requirements in ``install_requires`` that are using environment28markers ``extras_require``.29�:c3�# �UH<upU[[RS[[U55554v� M> g7f)c3�8# �UHn[U5v� M g7f�N)r)�.0r"s  r�	<genexpr>�?_move_install_requirements_markers.<locals>.<genexpr>.<genexpr>Rs���B�/A�!�s�1�v�v�/A�s�N)�listr�fromkeys�map�30_clean_req)r(�kr!s   rr)�5_move_install_requirements_markers.<locals>.<genexpr>Ps;����+�D�A�31�D����B�s�:�q�/A�B�B�C�D�*�s�AA)r+rr�filter�32_no_markerrr-r�markerrrr)rr�	inst_reqs�simple_reqs�complex_reqs�simple_install_requiresr"�expanded_extrass        rrr9s����U�[�[�!1�2�3�I���Y�/�K��z�9�5�L�"�3�s�K�#8�9��
���s�S����]�*�+�6�6�q�9����#�(�(�*���O�#�3�3rc�X�UR(aS[UR5-$S$)z;Return the 'extras_require' suffix for a given requirement.r$�)r3r��reqs rrrYs ��$'�J�J�3��S�Z�Z�� �6�B�6rc�<�[[U55nSUlU$)z=Given a Requirement, remove environment markers and return itN)r	rr3)r<r"s  rr.r.^s���C��H��A��A�H��Hrc�$�UR(+$r')r3r;s rr2r2es���z�z�>�rc�j�[U=(d S5nSn[X25nURU5 g)N�c��US-$)N�33r@)�lines r�	append_cr�&_write_requirements.<locals>.append_crls���d�{�r)rr-�34writelines)�stream�reqs�linesrDs    r�_write_requirementsrJis/����35��#�E��
�	�!�E�36���e�rc	��URn[R"5n[UR=(d SUR37=(d 05upV[
XE5 [U5H:nURSR"S0[5D65 [
XFU5 M< URSX$R55 g)Nr@z38[{extra}]39�requirements)
�distribution�io�StringIOrrrrJ�sorted�write�format�vars�write_or_delete_file�getvalue)�cmd�basename�filename�dist�datarr�extras        r�write_requirementsr\ss������D�
�;�;�=�D�'/����#��T�%8�%8�%>�B�(�$����/���'���40�41�?�)�)�3�D�F�3�4��D��"7�8�(����^�X�}�}��Grc��[R"5n[X0RR5 URSX#R
55 g)Nzsetup-requirements)rNrOrJrM�setup_requiresrTrU)rVrWrXrZs    r�write_setup_requirementsr_�s8��
�;�;�=�D���.�.�=�=�>����1�8�]�]�_�Mr)rrr�Mapping[str, _StrOrIter]�return�&tuple[list[str], dict[str, list[str]]])rr`raz'defaultdict[str, _Ordered[Requirement]])rrrz#Mapping[str, _Ordered[Requirement]]rarb)�__doc__�42__future__rrN�collectionsr�collections.abcr�	itertoolsr�typingr�jaraco.textr�packaging.requirementsr	r:rrr
rrrrrrr.r2rJr\r_r@rr�<module>rks����#�	�#�#�!��#�.���
�T�]����D��>��H� �H�2J�H�+�H��,��,��$4� �4�2U�4�+�4�@7�43
���44H�Nr
codekingpro/portable-devtools · Team Ai