£Á°èZ¨Ä…–K§‚«“ô4“ÒÙ´dîfUÙÃÅ WKbyÊ¦•êŽ…È®FÒ¿ÊÎóCozá¬S@6{Í:›œêZÌ:Š•_%:¢¾¾~;‘Ã~èŠ©ÊÇí`ÔÑ©úë™µ'5I¿fš×WO%ø9¾«¾DK|€ùÍD”Ýs]nHÕ¶ê×Ó¼ãžªéUWŸÈË%DÒÕ¬ï‘]/Åcx  ‰ï2ß]ä6G[]S£ÔÏ¯rs{úëóµmÒï#UQxo·õÞCe]"±/aÙ&Eã4ú9Jé_ÞåëdãöKë)AÞ                  ¯¹ægƒÛowÐø^d™ý½ßB7áyMä9ÜÖUã
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<html>

MRe                 @   s|   d  d l  Z  d  d l Z d  d l m Z d  d l m Z d  d l m Z d  d l  m Z d  d l	 TGd d   d e  Z
 d S)	    N)Command)
basestring)convert_path)log)*c               @   sU   e  Z d  Z d Z d Z d d d g Z g  Z d d   Z d d   Z d d   Z	 d S)rotatezDelete 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   4/tmp/pip-l4uy7dan-build/setuptools/command/rotate.pyinitialize_options   s    		zrotate.initialize_optionsc             C   s   |  j  d  k r t d   n  |  j d  k r< t d   n  y t |  j  |  _ Wn t k
 rr t d   Yn Xt |  j  t  r d d   |  j  j d  D |  _  n  |  j d d	  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     q Sr   )r   strip).0pr   r   r   
<listcomp>'   s   	 z+rotate.finalize_options.<locals>.<listcomp>,bdistr   )dist_dirr   )	r   DistutilsOptionErrorr   int
ValueError
isinstancer   splitset_undefined_options)r   r   r   r   finalize_options   s    %zrotate.finalize_optionsc             C   s   |  j  d  d d l m } x |  j D] } |  j j   d | } | t j j |  j |   } d d   | D } | j	   | j
   t j d t |  |  | |  j d   } x= | D]5 \ } } t j d |  |  j s t j |  q q Wq' Wd  S)	Negg_infor   )globr   c             S   s(   g  |  ] } t  j j |  | f  q Sr   )ospathgetmtime)r   fr   r   r   r   1   s   	 zrotate.run.<locals>.<listcomp>z%d file(s) matching %szDeleting %s)run_commandr'   r   distributionget_namer(   r)   joinr   sortreverser   infolenr   dry_rununlink)r   r'   patternfilestr+   r   r   r   run+   s    

	z
rotate.runN)r   r	   r
   )r   r   r   )r   r   r   )
__name__
__module____qualname____doc__descriptionuser_optionsboolean_optionsr   r%   r9   r   r   r   r   r      s   	r   )	distutilsr(   
setuptoolsr   Zsetuptools.compatr   distutils.utilr   r   distutils.errorsr   r   r   r   r   <module>   s   
