CasperSecurity

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

o

�_�aP�@sTddlmZddlmZddlmZddlZddlZddlm	Z	Gdd�de	�Z
dS)�)�convert_path)�log)�DistutilsOptionErrorN)�Commandc@s8eZdZdZdZgd�ZgZdd�Zdd�Zdd	�Z	d
S)�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 keepcCsd|_d|_d|_dS)N)�match�dist_dir�keep)�self�r�;/usr/lib/python3/dist-packages/setuptools/command/rotate.py�initialize_optionss
zrotate.initialize_optionsc
Cs�|jdur	td��|jdurtd��zt|j�|_Wnty+}ztd�|�d}~wwt|jt�r>dd�|j�d�D�|_|�dd�dS)	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 integercSsg|]}t|����qSr)r�strip)�.0�prrr�
<listcomp>(s�z+rotate.finalize_options.<locals>.<listcomp>�,�bdist)rr)	r
rr�int�
ValueError�
isinstance�str�split�set_undefined_options)r
�errr�finalize_optionss"
�

��
�zrotate.finalize_optionscCs�|�d�ddlm}|jD]U}|j��d|}|tj�|j|��}dd�|D�}|�	�|�
�t�dt
|�|�||jd�}|D]\}}t�d|�|jsbtj�|�r]t�|�qDt�|�qDqdS)	N�egg_infor)�glob�*cSsg|]
}tj�|�|f�qSr)�os�path�getmtime)r�frrrr4szrotate.run.<locals>.<listcomp>z%d file(s) matching %szDeleting %s)�run_commandr r
�distribution�get_namer"r#�joinr�sort�reverser�info�lenr�dry_run�isdir�shutil�rmtree�unlink)r
r �pattern�files�tr%rrr�run-s&


���z
rotate.runN)
�__name__�
__module__�__qualname__�__doc__�description�user_options�boolean_optionsrrr6rrrrr
sr)�distutils.utilr�	distutilsr�distutils.errorsrr"r0�
setuptoolsrrrrrr�<module>s
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY