관리-도구
편집 파일: rotate.cpython-311.pyc
� N�Dg1 � �b � d dl mZ d dlmZ d dlmZ d dlZd dlZd dlm Z G d� de � � Z dS )� )�convert_path)�log)�DistutilsOptionErrorN)�Commandc �4 � e Zd ZdZdZg d�Zg Zd� Zd� Zd� Z dS )�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 �0 � d | _ d | _ d | _ d S )N)�match�dist_dir�keep)�selfs �y/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/setuptools/command/rotate.py�initialize_optionszrotate.initialize_options s � ��� ��� ��� � � � c � � | j �t d� � �| j �t d� � � t | j � � | _ n"# t $ r}t d� � |�d }~ww xY wt | j t � � r)d� | j � d� � D � � | _ | � dd� � d S )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 integerc �P � g | ]#}t |� � � � � ��$S � )r �strip)�.0�ps r � <listcomp>z+rotate.finalize_options.<locals>.<listcomp>( s( � �Q�Q�Q�a�,�q�w�w�y�y�1�1�Q�Q�Qr �,�bdist)r r ) r r r �int� ValueError� isinstance�str�split�set_undefined_options)r �es r �finalize_optionszrotate.finalize_options s� � ��:��&�*�� � � �9��&�'M�N�N�N� K��D�I���D�I�I��� K� K� K�&�'B�C�C��J����� K�����d�j�#�&�&� R�Q�Q�4�:�;K�;K�C�;P�;P�Q�Q�Q�D�J��"�"�7�,D�E�E�E�E�Es �A � A'�A"�"A'c � � | � d� � ddlm} | j D �]"}| j � � � dz |z } |t j � | j |� � � � }d� |D � � }|� � � |� � � t j dt |� � |� � || j d � }|D ]i\ }}t j d|� � | j sHt j � |� � rt# j |� � �Ut j |� � �j��$d S )N�egg_infor )�glob�*c �P � g | ]#}t j � |� � |f��$S r )�os�path�getmtime)r �fs r r zrotate.run.<locals>.<listcomp>2 s- � �=�=�=�!�b�g�&�&�q�)�)�1�-�=�=�=r z%d file(s) matching %szDeleting %s)�run_commandr'