B
qG @ 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 Zd
d 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 C s d | _ d | _d | _d S )N)matchdist_dirkeep)self r /builddir/build/BUILDROOT/alt-python37-setuptools-58.3.0-4.el9.x86_64/opt/alt/python37/lib/python3.7/site-packages/setuptools/command/rotate.pyinitialize_options s zrotate.initialize_optionsc
C s | j d krtd| jd kr$tdyt| j| _W n, tk
r` } ztd|W d d }~X Y nX t| j trdd | j dD | _ | 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).0pr r r