grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026a ´i 2ã@s‚ddlZddlZddlZddlZddlmZddlmZmZddl m Z Gdd„dƒZ dd„Z ej fd d „Zd d „Zddd„ZdS)éN©Ú convert_path)ÚDistutilsTemplateErrorÚDistutilsInternalError)Úlogc@sxeZdZddd„Zdd„Zejfdd„Zdd „Zd d „Z d d „Z dd„Z dd„Z dd„Z dd„Zddd„Zddd„ZdS)ÚFileListNcCsd|_g|_dS©N)ÚallfilesÚfiles)ÚselfÚwarnÚ debug_print©rú*/usr/lib64/python3.9/distutils/filelist.pyÚ__init__szFileList.__init__cCs ||_dSr)r )r r rrrÚ set_allfiles#szFileList.set_allfilescCst|ƒ|_dSr)Úfindallr )r Údirrrrr&szFileList.findallcCsddlm}|rt|ƒdS)Nr)ÚDEBUG)Zdistutils.debugrÚprint)r Úmsgrrrrr )s zFileList.debug_printcCs|j |¡dSr)r Úappend)r Úitemrrrr3szFileList.appendcCs|j |¡dSr)r Úextend)r Úitemsrrrr6szFileList.extendcCs<tttjj|jƒƒ}g|_|D]}|j tjj|Ž¡qdSr)ÚsortedÚmapÚosÚpathÚsplitr rÚjoin)r Zsortable_filesZ sort_tuplerrrÚsort9sz FileList.sortcCs@tt|jƒdddƒD]$}|j||j|dkr|j|=qdS)Néréÿÿÿÿ)ÚrangeÚlenr )r ÚirrrÚremove_duplicatesCszFileList.remove_duplicatescCsÞ| ¡}|d}d}}}|dvrTt|ƒdkr ...cSsg|] }t|ƒ‘qSrr©Ú.0ÚwrrrÚ Wóz1FileList._parse_template_line..r")úrecursive-includeúrecursive-excludeéz,'%s' expects ...cSsg|] }t|ƒ‘qSrrr-rrrr0]r1)ÚgraftÚprunez#'%s' expects a single zunknown action '%s')rr%rr)r ÚlineÚwordsÚactionÚpatternsrÚ dir_patternrrrÚ_parse_template_lineLs0  ÿ ÿ  ÿ zFileList._parse_template_linecCs@| |¡\}}}}|dkrV| dd |¡¡|D]}|j|dd�s2t d|¡q2�næ|dkrš| dd |¡¡|D]}|j|dd�svt d |¡qv�n¢|d krÞ| d d |¡¡|D]}|j|d d�sºt d |¡qº�n^|dk�r(| dd |¡¡|D]"}|j|d d��st d|¡�q�n|dk�rv| d|d |¡f¡|D]$}|j||d��sNt d||¡�qNnÆ|dk�rÄ| d|d |¡f¡|D]$}|j||d��sœt d||¡�qœnx|dk�rú| d|¡|jd|d��swarning: no files found matching '%s' anywhere in distributionr+zglobal-exclude zRwarning: no previously-included files matching '%s' found anywhere in distributionr2zrecursive-include %s %s)Úprefixz:warning: no files found matching '%s' under directory '%s'r3zrecursive-exclude %s %szNwarning: no previously-included files matching '%s' found under directory '%s'r5zgraft z+warning: no directories found matching '%s'r6zprune z6no previously-included directories found matching '%s'z'this cannot happen: invalid action '%s')r<r r Úinclude_patternrr Úexclude_patternr)r r7r9r:rr;ÚpatternrrrÚprocess_template_linehs|ÿ ÿ ÿ  þ   ÿþ   ÿþ  ÿ ÿÿzFileList.process_template_liner"rcCsld}t||||ƒ}| d|j¡|jdur4| ¡|jD],}| |¡r:| d|¡|j |¡d}q:|S)NFz%include_pattern: applying regex r'%s'z adding T)Útranslate_patternr rBr rÚsearchr r)r rBr>r?Úis_regexÚ files_foundÚ pattern_reÚnamerrrr@´sÿ    zFileList.include_patterncCsrd}t||||ƒ}| d|j¡tt|jƒdddƒD]4}| |j|¡r8| d|j|¡|j|=d}q8|S)NFz%exclude_pattern: applying regex r'%s'r"r#z removing T)rDr rBr$r%r rE)r rBr>r?rFrGrHr&rrrrAßsÿzFileList.exclude_pattern)NN)r"Nr)r"Nr)Ú__name__Ú __module__Ú __qualname__rrrÚcurdirrr rrr!r'r<rCr@rArrrrrs    L ,ÿrcCs&dd„tj|dd�Dƒ}ttjj|ƒS)Ncss,|]$\}}}|D]}tj ||¡VqqdSr)rrr )r.ÚbaseÚdirsr ÚfilerrrÚ úsþz#_find_all_simple..T)Ú followlinks)rÚwalkÚfilterrÚisfile)rÚresultsrrrÚ_find_all_simpleös þrWcCs6t|ƒ}|tjkr.tjtjj|d�}t||ƒ}t|ƒS)N)Ústart) rWrrMÚ functoolsÚpartialrÚrelpathrÚlist)rr Zmake_relrrrrs   rcCs8t |¡}tj}tjdkrd}d|}t d||¡}|S)Nú\z\\\\z\1[^%s]z((?t|ƒ}nd}|dur²t|ƒ}|t|ƒt|ƒt|ƒ…}tj} tjdkr‚d} |t|ƒt|ƒt|ƒ…}d||| ||f}n|rÎd||t|ƒd…f}t |¡S)NÚ_Úr]z\\z%s\A%s%s.*%s%sz%s\A%s) Ú isinstanceÚstrraÚcompilerdÚ partitionr%rr`) rBr>r?rFrXreÚendrHZ prefix_rer`rrrrD%s(   rD)r"Nr)rrar^rYZdistutils.utilrZdistutils.errorsrrZ distutilsrrrWrMrrdrDrrrrÚs  i