� ,�Re � � � d Z ddlZddlZddlZg d�Zdd�Zdd�Zd� Zd� Zd � Z d � Z d� Z ej d� � Z ej d � � Zd� Zd� Zd� ZdS )z� Filename globbing utility. Mostly a copy of `glob` from Python 3.5. Changes include: * `yield from` and PEP3102 `*` removed. * Hidden files are not ignored. � N)�glob�iglob�escapeFc �> � t t | |�� � � � S )ay Return a list of paths matching a pathname pattern. The pattern may contain simple shell-style wildcards a la fnmatch. However, unlike fnmatch, filenames starting with a dot are special cases that are not matched by '*' and '?' patterns. If recursive is true, the pattern '**' will match any files and zero or more directories and subdirectories. )� recursive)�listr )�pathnamer s ��/builddir/build/BUILDROOT/alt-python311-setuptools-65.6.3-2.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/setuptools/glob.pyr r s � � ��h�)�4�4�4�5�5�5� c �n � t | |� � }|r"t | � � rt |� � }|rJ �|S )a� Return an iterator which yields the paths matching a pathname pattern. The pattern may contain simple shell-style wildcards a la fnmatch. However, unlike fnmatch, filenames starting with a dot are special cases that are not matched by '*' and '?' patterns. If recursive is true, the pattern '**' will match any files and zero or more directories and subdirectories. )�_iglob�_isrecursive�next)r r �it�ss r r r sC � � ��)� $� $�B�� �\�(�+�+� ���H�H������ �Ir c # �V K � t j � | � � \ }}|rt |� � rt nt }t | � � sK|r$t j � | � � r| V � n#t j � |� � r| V � d S |s |||� � E d {V �� d S || k r t |� � rt ||� � }n|g}t |� � st }|D ]3} |||� � D ]$}t j � ||� � V � �%�4d S �N)�os�path�splitr �glob2�glob1� has_magic�lexists�isdirr �glob0�join)r r �dirname�basename�glob_in_dir�dirs�names r r r 0 sg � � � ��� � �h�/�/��G�X�$�J��h�)?�)?�J�%�%�U�K��X��� �� ��w���x�(�(� ������ �w�}�}�W�%�%� �������� ��;�w��1�1�1�1�1�1�1�1�1��� �(���y��1�1���g�y�)�)����y���X��� ���� .� .���K���2�2� .� .�D��'�,�,�w��-�-�-�-�-�-� .�.� .r c � � | sAt |t � � r t j � d� � } nt j } t j | � � }n# t $ r g cY S w xY wt j ||� � S �N�ASCII) � isinstance�bytesr �curdir�encode�listdir�OSError�fnmatch�filter)r �pattern�namess r r r T s� � �� ��g�u�%�%� ��i�&�&�w�/�/�G�G��i�G��� �7�#�#����� � � �� � � ������>�%��)�)�)s �A �A)�(A)c �� � |s#t j � | � � r|gS n@t j � t j � | |� � � � r|gS g S r )r r r r r )r r s r r r a sd � �� � �7�=�=��!�!� ��:�� � �7�?�?�2�7�<�<���:�:�;�;� ��:�� �Ir c # �p K � t |� � sJ �|d d� V � t | � � D ]}|V � �d S )Nr )r � _rlistdir)r r. �xs r r r q sZ � � � ��� � � � � � �"�1�"�+���� �w� � � � �������� r c # � K � | sAt | t � � r t j � d� � } nt j } t j | � � }n# t j $ r Y d S w xY w|D ]^}|V � | r t j � | |� � n|}t |� � D ]$}t j � ||� � V � �%�_d S r$ ) r&