ef1bddlmZddlmZddlmZddlZddlZddlm Z Gdde Z dS)) convert_path)log)DistutilsOptionErrorN)Commandc4eZdZdZdZgdZgZdZdZdZ 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 keepc0d|_d|_d|_dS)N)matchdist_dirkeep)selfs y/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/setuptools/command/rotate.pyinitialize_optionszrotate.initialize_optionss   c|jtd|jtd t|j|_n"#t$r}td|d}~wwxYwt |jt r)d|jdD|_|dddS)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 integercPg|]#}t|$S)rstrip).0ps r z+rotate.finalize_options..(s(QQQa,qwwyy11QQQr,bdist)rr) r rrint ValueError isinstancestrsplitset_undefined_options)res rfinalize_optionszrotate.finalize_optionss : &*  9 &'MNN N KDIDII K K K&'BCC J K dj# & & RQQ4:;K;KC;P;PQQQDJ ""7,DEEEEEsA A'A""A'c|dddlm}|jD]"}|jdz|z}|t j|j|}d|D}| | tj dt||||jd}|D]i\}}tj d||jsHt j|rt#j|Ut j|j$dS)Negg_infor)glob*cPg|]#}tj||f$Sr)ospathgetmtime)rfs rrzrotate.run..2s-===!bg&&q))1-===rz%d file(s) matching %sz Deleting %s) run_commandr'r distributionget_namer*r+joinrsortreverserinfolenrdry_runisdirshutilrmtreeunlink)rr'patternfilestr-s rrunz rotate.run+sE $$$z % %G'0022S87BGDdmW==>>E==u===E JJLLL MMOOO H-s5zz7 C C C$)++&E % %1***|%w}}Q''% a(((( !  % % %rN) __name__ __module__ __qualname____doc__ description user_optionsboolean_optionsrr$r>rrrrr sg$$FKL O FFF %%%%%rr) distutils.utilr distutilsrdistutils.errorsrr*r8 setuptoolsrrrrrrJs''''''111111 4%4%4%4%4%W4%4%4%4%4%r