a
ˆåÏhP ã @ sT d dl mZ d dlmZ d dlmZ d dlZd dlZd dlm Z G dd„ de ƒZ
dS )é )Úconvert_path)Úlog)ÚDistutilsOptionErrorN)ÚCommandc @ s8 e Zd ZdZdZg d¢Zg Zdd„ 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 keepc C s d | _ d | _d | _d S )N)ÚmatchÚdist_dirÚkeep)Úself© r ú=/usr/lib/python3.9/site-packages/setuptools/command/rotate.pyÚinitialize_options s zrotate.initialize_optionsc
C s˜ | j d u rtdƒ‚| jd u r$tdƒ‚zt| jƒ| _W n. tyb } ztdƒ|‚W Y d }~n
d }~0 0 t| j tƒrˆdd„ | 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 S s g | ]}t | ¡ ƒ‘qS r )r Ústrip)Ú.0Úpr r r Ú