Your IP : 18.221.147.141


Current Path : /opt/alt/python311/lib64/python3.11/distutils/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/distutils/__pycache__/filelist.cpython-311.opt-2.pyc

�

c��f 2���	ddlZddlZddlZddlZddlmZddlmZmZddl	m
Z
Gd�d��Zd�Zej
fd�Zd	�Zdd�ZdS)
�N��convert_path)�DistutilsTemplateError�DistutilsInternalError)�logc�n�eZdZ	dd�Zd�Zejfd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zdd�Z	dd�ZdS)�FileListNc�"�d|_g|_dS�N)�allfiles�files)�self�warn�debug_prints   �9/opt/alt/python311/lib64/python3.11/distutils/filelist.py�__init__zFileList.__init__s����
���
�
�
�c��||_dSr)r)rrs  r�set_allfileszFileList.set_allfiles#s
�� ��
�
�
rc�.�t|��|_dSr)�findallr)r�dirs  rrzFileList.findall&s�������
�
�
rc�:�	ddlm}|rt|��dSdS)Nr)�DEBUG)�distutils.debugr�print)r�msgrs   rrzFileList.debug_print)s<��	�	*�)�)�)�)�)��	��#�J�J�J�J�J�	�	rc�:�|j�|��dSr)r
�append)r�items  rrzFileList.append3s���
���$�����rc�:�|j�|��dSr)r
�extend)r�itemss  rr"zFileList.extend6s���
���%� � � � � rc���tttjj|j����}g|_|D]-}|j�tjj|����.dSr)�sorted�map�os�path�splitr
r�join)r�sortable_files�
sort_tuples   r�sortz
FileList.sort9sa����B�G�M�4�:� >� >�?�?����
�(�	9�	9�J��J���b�g�l�J�7�8�8�8�8�	9�	9rc��tt|j��dz
dd��D])}|j||j|dz
kr|j|=�*dS)N�r���)�range�lenr
)r�is  r�remove_duplicateszFileList.remove_duplicatesCsZ���s�4�:����*�A�r�2�2�	"�	"�A��z�!�}��
�1�q�5� 1�1�1��J�q�M��	"�	"rc��|���}|d}dx}x}}|dvr:t|��dkrtd|z���d�|dd�D��}n�|dvrOt|��dkrtd	|z���t|d��}d
�|dd�D��}nQ|dvr;t|��dkrtd|z���t|d��}ntd
|z���||||fS)Nr)�include�exclude�global-include�global-exclude�z&'%s' expects <pattern1> <pattern2> ...c�,�g|]}t|����S�r��.0�ws  r�
<listcomp>z1FileList._parse_template_line.<locals>.<listcomp>W���;�;�;�A��Q���;�;�;rr/)�recursive-include�recursive-exclude�z,'%s' expects <dir> <pattern1> <pattern2> ...c�,�g|]}t|����Sr<rr=s  rr@z1FileList._parse_template_line.<locals>.<listcomp>]rAr)�graft�prunez#'%s' expects a single <dir_pattern>zunknown action '%s')r)r2rr)r�line�words�action�patternsr�dir_patterns       r�_parse_template_linezFileList._parse_template_lineLsV���
�
�����q���'+�+��+�3���:�:�:��5�z�z�A�~�~�,�>��G�I�I�I�;�;��q�r�r��;�;�;�H�H�
�A�
A�
A��5�z�z�A�~�~�,�D�v�M�O�O�O��u�Q�x�(�(�C�;�;��q�r�r��;�;�;�H�H�
�)�
)�
)��5�z�z�Q���,�;�f�D�F�F�F�&�u�Q�x�0�0�K�K�(�)>��)G�H�H�H���#�{�3�3rc�R�|�|��\}}}}|dkr^|�dd�|��z��|D].}|�|d���st	jd|���/dS|dkr^|�dd�|��z��|D].}|�|d���st	jd	|���/dS|d
kr^|�dd�|��z��|D].}|�|d���st	jd
|���/dS|dkr^|�dd�|��z��|D].}|�|d���st	jd|���/dS|dkrb|�d|�dd�|������|D]/}|�||���st	jd||���0dS|dkrb|�d|�dd�|������|D]/}|�||���st	jd||���0dS|dkrH|�d|z��|�d|���st	jd|��dSdS|dkrH|�d|z��|�d|���st	jd|��dSdStd|z���)Nr6zinclude � r/)�anchorz%warning: no files found matching '%s'r7zexclude z9warning: no previously-included files found matching '%s'r8zglobal-include rz>warning: no files found matching '%s' anywhere in distributionr9zglobal-exclude zRwarning: no previously-included files matching '%s' found anywhere in distributionrBzrecursive-include )�prefixz:warning: no files found matching '%s' under directory '%s'rCzrecursive-exclude zNwarning: no previously-included files matching '%s' found under directory '%s'rFzgraft z+warning: no directories found matching '%s'rGzprune z6no previously-included directories found matching '%s'z'this cannot happen: invalid action '%s')rMrr*�include_patternrr�exclude_patternr)rrHrJrKrrL�patterns       r�process_template_linezFileList.process_template_linehsi��04�/H�/H��/N�/N�,���3��
�Y������Z�#�(�(�8�*<�*<�<�=�=�=�#�
&�
&���+�+�G�A�+�>�>�&��H�D�$�&�&�&��
&�
&�
�y�
 �
 ����Z�#�(�(�8�*<�*<�<�=�=�=�#�
?�
?���+�+�G�A�+�>�>�?��H�4�6=�?�?�?��
?�
?�
�'�
'�
'����.����(�1C�1C�C�D�D�D�#�
D�
D���+�+�G�A�+�>�>�D��H�9�;B�D�D�D��
D�
D�
�'�
'�
'����.����(�1C�1C�C�D�D�D�#�
&�
&���+�+�G�A�+�>�>�&��H�D�$�&�&�&��
&�
&��*�
*�
*�����!�c�c�3�8�8�H�#5�#5�#5�7�
8�
8�
8�#�
+�
+���+�+�G�C�+�@�@�+��H�7�$�c�+�+�+��
+�
+��*�
*�
*�����!�c�c�3�8�8�H�#5�#5�#5�7�
8�
8�
8�#�
+�
+���+�+�G�C�+�@�@�+��H�@�$�c�+�+�+��
+�
+��w�
�
����X��3�4�4�4��'�'��[�'�A�A�
&���F�$�&�&�&�&�&�
&�
&��w�
�
����X��3�4�4�4��'�'��[�'�A�A�
9���*�,7�9�9�9�9�9�
9�
9�)�;�f�D�F�F�
Frr/rc�F�	d}t||||��}|�d|jz��|j�|���|jD]K}|�|��r4|�d|z��|j�|��d}�L|S)NFz%include_pattern: applying regex r'%s'z adding T)�translate_patternrrTrr�searchr
r)rrTrPrQ�is_regex�files_found�
pattern_re�names        rrRzFileList.include_pattern�s���	�2��&�w����I�I�
����@�#�+�,�	-�	-�	-��=� ��L�L�N�N�N��M�	#�	#�D�� � ��&�&�
#�� � ��d�!2�3�3�3��
�!�!�$�'�'�'�"����rc�V�	d}t||||��}|�d|jz��tt	|j��dz
dd��D]O}|�|j|��r-|�d|j|z��|j|=d}�P|S)NFz%exclude_pattern: applying regex r'%s'r/r0z
 removing T)rWrrTr1r2r
rX)rrTrPrQrYrZr[r3s        rrSzFileList.exclude_pattern�s���	���&�w����I�I�
����@�#�+�,�	-�	-�	-��s�4�:���q�(�"�b�1�1�	#�	#�A�� � ���A��/�/�
#�� � ���
�1�
�!=�>�>�>��J�q�M�"����r)NN�r/Nr)�__name__�
__module__�__qualname__rrr'�curdirrrrr"r-r4rMrUrRrSr<rrr	r	s������������!�!�!��)�%�%�%�%���� � � �!�!�!�9�9�9�"�"�"�4�4�4�8GF�GF�GF�X(�(�(�(�X:;������rr	c��	d�tj|d���D��}ttjj|��S)Nc3�hK�|]-\}}}|D]$}tj�||��V��%�.dSr)r'r(r*)r>�base�dirsr
�files     r�	<genexpr>z#_find_all_simple.<locals>.<genexpr>�sc�������D�$�����
�	����T�4� � �������rT)�followlinks)r'�walk�filterr(�isfile)r(�resultss  r�_find_all_simplern�sJ�����!#���4�!@�!@�!@����G�
�"�'�.�'�*�*�*rc���	t|��}|tjkr5tjtjj|���}t||��}t|��S)N)�start)	rnr'rb�	functools�partialr(�relpathr&�list)rr
�make_rels   rrrsW���
�S�!�!�E�
�b�i����$�R�W�_�C�@�@�@���H�e�$�$����;�;�rc��	tj|��}tj}tjdkrd}d|z}t	jd||��}|S)N�\z\\\\z\1[^%s]z((?<!\\)(\\\\)*)\.)�fnmatch�	translater'�sep�re�sub)rTr[rz�escapeds    r�
glob_to_rer~sX���
�"�7�+�+�J�
�&�C�	�v��~�~����3��G���-�w�
�C�C�J��rr/c��	|r+t|t��rtj|��S|St	d���d��\}}}|rt	|��}nd}|��t	|��}|t
|��t
|��t
|��z
�}tj}	tjdkrd}	|t
|��t
|��t
|��z
�}|�d|�|	�d|�|��}n|r|�d|t
|��d���}tj|��S)N�_�rwz\\z\Az.*)	�
isinstance�strr{�compiler~�	partitionr2r'rz)
rTrPrQrYrpr��endr[�	prefix_rerzs
          rrWrW%sF���
���g�s�#�#�	��:�g�&�&�&��N��s�O�O�-�-�c�2�2�M�E�1�c�����(�(�
�
��
�
���v�&�&�	��c�%�j�j�#�i�.�.�3�s�8�8�*C�C�D�	��f��
�6�T�>�>��C���E�
�
�C�
�O�O�c�#�h�h�,F� F�G�
�*/�%�%���C�C�C���S�S�Q�
�
��	F�&+�e�e�Z��E�
�
���-D�-D�E�J�
�:�j�!�!�!rr^)r'r{rxrq�distutils.utilr�distutils.errorsrr�	distutilsrr	rnrbrr~rWr<rr�<module>r�s�����
�
�
�
�
�
�
���������'�'�'�'�'�'�K�K�K�K�K�K�K�K�������b�b�b�b�b�b�b�b�P	+�	+�	+��	�	�	�	�	����.""�""�""�""�""�""r

?>