| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/lib/python3.6/site-packages/setuptools/command/__pycache__/ |
Upload File : |
3 ��aP � @ sT d dl mZ d dlmZ d dlmZ d dlZd dlZd dlm Z G dd� de �Z dS )� )�convert_path)�log)�DistutilsOptionErrorN)�Commandc @ s: e Zd ZdZdZdddgZg Zdd � Zdd� Zdd� Z dS )�rotatezDelete older distributionsz2delete older distributions, keeping N newest files�match=�m�patterns to match (required)� dist-dir=�d�%directory where the distributions are�keep=�k�(number of matching distributions to keepc C s d | _ d | _d | _d S )N)�match�dist_dir�keep)�self� r �/usr/lib/python3.6/rotate.py�initialize_options s zrotate.initialize_optionsc C s� | j d krtd��| jd kr$td��yt| j�| _W n, tk r` } ztd�|�W Y d d }~X nX t| j t�r�dd� | j jd�D �| _ | jdd � 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 S s g | ]}t |j� ��qS r )r �strip)�.0�pr r r � <listcomp>) s z+rotate.finalize_options.<locals>.<listcomp>�,Zbdistr )r r ) r r r �int� ValueError� isinstance�str�splitZset_undefined_options)r �er r r �finalize_options s zrotate.finalize_optionsc C s� | j d� ddlm} x�| jD ]�}| jj� d | }|tjj| j|��}dd� |D �}|j � |j � tjdt |�|� || jd � }xD|D ]<\}}tjd|� | js�tjj|�r�tj|� q�tj|� q�W qW d S ) NZegg_infor )�glob�*c S s g | ]}t jj|�|f�qS r )�os�path�getmtime)r �fr r r r 4 s zrotate.run.<locals>.<listcomp>z%d file(s) matching %szDeleting %s)Zrun_commandr# r ZdistributionZget_namer% r&