3
ՔRet @ s` d dl mZ d dlmZ d dlmZ d dlZd dlZd dlm Z d dl
mZ G dd deZdS ) )convert_path)log)DistutilsOptionErrorN)six)Commandc @ s: e Zd ZdZdZdddgZg Zdd
Zdd Zdd Z dS )rotatezDelete older distributionsz2delete older distributions, keeping N newest filesmatch=mpatterns to match (required) dist-dir=d%directory where the distributions arekeep=k(number of matching distributions to keepc C s d | _ d | _d | _d S )N)matchdist_dirkeep)self r /builddir/build/BUILDROOT/alt-python36-setuptools-38.5.2-7.el9.x86_64/opt/alt/python36/lib/python3.6/site-packages/setuptools/command/rotate.pyinitialize_options s zrotate.initialize_optionsc C s | j d krtd| jd kr$tdyt| j| _W n tk
rP tdY nX t| j tjrxdd | j jdD | _ | j 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 |j qS r )r strip).0pr r r