§ !A?h 2ãó”—dZddlZddlZddlZddlZddlmZddlmZm Z ddl m Z Gd„d¦«Z d„Z ejfd „Zd „Zd d „ZdS)zsdistutils.filelist Provides the FileList class, used for poking about the filesystem and building lists of files. éN©Ú convert_path)ÚDistutilsTemplateErrorÚDistutilsInternalError)Úlogcóp—eZdZdZdd„Zd„Zejfd„Zd„Z d„Z d„Z d „Z d „Z d „Zd „Zdd„Z dd„ZdS)ÚFileListaÑA list of files built by on exploring the filesystem and filtered by applying various patterns to what we find there. Instance attributes: dir directory from which files will be taken -- only used if 'allfiles' not supplied to constructor files list of filenames currently being built/filtered/manipulated allfiles complete list of files under consideration (ie. without any filtering applied) Ncó"—d|_g|_dS©N)ÚallfilesÚfiles)ÚselfÚwarnÚ debug_prints ú+/usr/lib64/python3.11/distutils/filelist.pyÚ__init__zFileList.__init__s€ðˆŒ ؈Œ ˆ ˆ ócó—||_dSr )r )rr s rÚ set_allfileszFileList.set_allfiles#s €Ø ˆŒ ˆ ˆ rcó.—t|¦«|_dSr )Úfindallr )rÚdirs rrzFileList.findall&s€Ý ™ œ ˆŒ ˆ ˆ rcó8—ddlm}|rt|¦«dSdS)z~Print 'msg' to stdout if the global DEBUG (taken from the DISTUTILS_DEBUG environment variable) flag is true. r)ÚDEBUGN)Údistutils.debugrÚprint)rÚmsgrs rrzFileList.debug_print)s7€ð *Ð)Ð)Ð)Ð)Ð)Ø ð Ý �#‰JŒJˆJˆJˆJð ð rcó:—|j |¦«dSr )r Úappend)rÚitems rrzFileList.append3s€Ø Œ ×Ò˜$ÑÔÐÐÐrcó:—|j |¦«dSr )r Úextend)rÚitemss rr"zFileList.extend6s€Ø Œ ×Ò˜%Ñ Ô Ð Ð Ð rcóÖ—tttjj|j¦«¦«}g|_|D]-}|j tjj|ަ«Œ.dSr )ÚsortedÚmapÚosÚpathÚsplitr rÚjoin)rÚsortable_filesÚ sort_tuples rÚsortz FileList.sort9sa€å¥¥B¤G¤M°4´:Ñ >Ô >Ñ?Ô?ˆØˆŒ Ø(ð 9ð 9ˆJØ ŒJ× Ò �bœgœl¨JÐ7Ñ 8Ô 8Ð 8Ð 8ð 9ð 9rcó¦—tt|j¦«dz dd¦«D])}|j||j|dz kr|j|=Œ*dS)Néréÿÿÿÿ)ÚrangeÚlenr )rÚis rÚremove_duplicateszFileList.remove_duplicatesCsZ€å•s˜4œ:‘”¨Ñ*¨A¨rÑ2Ô2ð "ð "ˆAØŒz˜!Œ} ¤ ¨1¨q©5Ô 1Ò1Ð1Ø”J˜q�Møð "ð "rcó—| ¦«}|d}dx}x}}|dvr:t|¦«dkrtd|z¦«‚d„|dd…D¦«}n¤|dvrOt|¦«dkrtd |z¦«‚t|d¦«}d „|dd…D¦«}nQ|d vr;t|¦«dkrtd |z¦«‚t|d¦«}ntd |z¦«‚||||fS)Nr)ÚincludeÚexcludeúglobal-includeúglobal-excludeéz&'%s' expects ...có,—g|]}t|¦«‘ŒS©r©Ú.0Úws rú z1FileList._parse_template_line..Wó€Ð;Ð;Ð;¨A�  Q™œÐ;Ð;Ð;rr/)úrecursive-includeúrecursive-excludeéz,'%s' expects ...có,—g|]}t|¦«‘ŒSr<rr=s rr@z1FileList._parse_template_line..]rAr)ÚgraftÚprunez#'%s' expects a single zunknown action '%s')r)r2rr)rÚlineÚwordsÚactionÚpatternsrÚ dir_patterns rÚ_parse_template_linezFileList._parse_template_lineLsV€Ø— ’ ‘ ” ˆØ�q”ˆà'+Ð+ˆÐ+�3˜à ð:ð :ð :å�5‰zŒz˜AŠ~ˆ~Ý,Ø>ÀÑGñIôIðIà;Ð;°°q°r°r´Ð;Ñ;Ô;ˆHˆHØ ÐAÐ AÐ AÝ�5‰zŒz˜AŠ~ˆ~Ý,ØDÀvÑMñOôOðOå˜u QœxÑ(Ô(ˆCØ;Ð;°°q°r°r´Ð;Ñ;Ô;ˆHˆHØ Ð)Ð )Ð )Ý�5‰zŒz˜QŠˆÝ,Ø;¸fÑDñFôFðFå& u¨Q¤xÑ0Ô0ˆKˆKå(Ð)>ÀÑ)GÑHÔHÐ Hà˜ # {Ð3Ð3rcóR—| |¦«\}}}}|dkr^| dd |¦«z¦«|D].}| |d¬¦«st jd|¦«Œ/dS|dkr^| dd |¦«z¦«|D].}| |d¬¦«st jd |¦«Œ/dS|d kr^| d d |¦«z¦«|D].}| |d ¬¦«st jd |¦«Œ/dS|dkr^| dd |¦«z¦«|D].}| |d ¬¦«st jd|¦«Œ/dS|dkrb| d|›dd |¦«›�¦«|D]/}| ||¬¦«st jd||¦«Œ0dS|dkrb| d|›dd |¦«›�¦«|D]/}| ||¬¦«st jd||¦«Œ0dS|dkrH| d|z¦«| d|¬¦«st jd|¦«dSdS|dkrH| d|z¦«| d|¬¦«st jd|¦«dSdStd|z¦«‚)Nr6zinclude ú r/)Úanchorz%warning: no files found matching '%s'r7zexclude z9warning: no previously-included files found matching '%s'r8zglobal-include rz>warning: no files found matching '%s' anywhere in distributionr9zglobal-exclude zRwarning: no previously-included files matching '%s' found anywhere in distributionrBzrecursive-include )Úprefixz:warning: no files found matching '%s' under directory '%s'rCzrecursive-exclude zNwarning: no previously-included files matching '%s' found under directory '%s'rFzgraft z+warning: no directories found matching '%s'rGzprune z6no previously-included directories found matching '%s'z'this cannot happen: invalid action '%s')rMrr*Úinclude_patternrrÚexclude_patternr)rrHrJrKrrLÚpatterns rÚprocess_template_linezFileList.process_template_linehsi€ð 04×/HÒ/HÈÑ/NÔ/NÑ,ˆ�˜3  ð �YÒ Ð Ø × Ò ˜Z¨#¯(ª(°8Ñ*<Ô*<Ñ<Ñ =Ô =Ð =Ø#ð &ð &�Ø×+Ò+¨G¸AÐ+Ñ>Ô>ð&Ý”HÐDØ$ñ&ô&ð&øð &ð &ð �yÒ Ð Ø × Ò ˜Z¨#¯(ª(°8Ñ*<Ô*<Ñ<Ñ =Ô =Ð =Ø#ð ?ð ?�Ø×+Ò+¨G¸AÐ+Ñ>Ô>ð?Ý”Hð4Ø6=ñ?ô?ð?øð ?ð ?ð Ð'Ò 'Ð 'Ø × Ò Ð.°·²¸(Ñ1CÔ1CÑCÑ DÔ DÐ DØ#ð Dð D�Ø×+Ò+¨G¸AÐ+Ñ>Ô>ðDÝ”Hð9Ø;BñDôDðDøð Dð Dð Ð'Ò 'Ð 'Ø × Ò Ð.°·²¸(Ñ1CÔ1CÑCÑ DÔ DÐ DØ#ð &ð &�Ø×+Ò+¨G¸AÐ+Ñ>Ô>ð&Ý”HðDà$ñ&ô&ð&øð &ð &ð Ð*Ò *Ð *Ø × Ò Ð Ø!˜c˜c 3§8¢8¨HÑ#5Ô#5Ð#5ð7ñ 8ô 8ð 8à#ð +ð +�Ø×+Ò+¨G¸CÐ+Ñ@Ô@ð+Ý”Hð7à$ cñ+ô+ð+øð +ð +ð Ð*Ò *Ð *Ø × Ò Ð Ø!˜c˜c 3§8¢8¨HÑ#5Ô#5Ð#5ð7ñ 8ô 8ð 8à#ð +ð +�Ø×+Ò+¨G¸CÐ+Ñ@Ô@ð+Ý”Hð@à$ cñ+ô+ð+øð +ð +ð �wÒ Ð Ø × Ò ˜X¨ Ñ3Ñ 4Ô 4Ð 4Ø×'Ò'¨°[Ð'ÑAÔAð &Ý”ÐFØ$ñ&ô&ð&ð&ð&ð &ð &ð�wÒ Ð Ø × Ò ˜X¨ Ñ3Ñ 4Ô 4Ð 4Ø×'Ò'¨°[Ð'ÑAÔAð 9Ý”ð*Ø,7ñ9ô9ð9ð9ð9ð 9ð 9õ)Ø;¸fÑDñFôFð Frr/rcóD—d}t||||¦«}| d|jz¦«|j€| ¦«|jD]K}| |¦«r4| d|z¦«|j |¦«d}ŒL|S)a—Select strings (presumably filenames) from 'self.files' that match 'pattern', a Unix-style wildcard (glob) pattern. Patterns are not quite the same as implemented by the 'fnmatch' module: '*' and '?' match non-special characters, where "special" is platform- dependent: slash on Unix; colon, slash, and backslash on DOS/Windows; and colon on Mac OS. If 'anchor' is true (the default), then the pattern match is more stringent: "*.py" will match "foo.py" but not "foo/bar.py". If 'anchor' is false, both of these will match. If 'prefix' is supplied, then only filenames starting with 'prefix' (itself a pattern) and ending with 'pattern', with anything in between them, will match. 'anchor' is ignored in this case. If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and 'pattern' is assumed to be either a string containing a regex or a regex object -- no translation is done, the regex is just compiled and used as-is. Selected strings will be added to self.files. Return True if files are found, False otherwise. Fz%include_pattern: applying regex r'%s'Nz adding T)Útranslate_patternrrTr rÚsearchr r)rrTrPrQÚis_regexÚ files_foundÚ pattern_reÚnames rrRzFileList.include_pattern´s»€ð4ˆ Ý& w°¸ÀÑIÔIˆ Ø ×ÒÐ@Ø#Ô+ñ,ñ -ô -ð -ð Œ=Ð Ø �LŠL‰NŒNˆNà”Mð #ð #ˆDØ× Ò  Ñ&Ô&ð #Ø× Ò  ¨dÑ!2Ñ3Ô3Ð3Ø” ×!Ò! $Ñ'Ô'Ð'Ø"� øØÐrcóT—d}t||||¦«}| d|jz¦«tt |j¦«dz dd¦«D]O}| |j|¦«r-| d|j|z¦«|j|=d}ŒP|S)aRemove strings (presumably filenames) from 'files' that match 'pattern'. Other parameters are the same as for 'include_pattern()', above. The list 'self.files' is modified in place. Return True if files are found, False otherwise. Fz%exclude_pattern: applying regex r'%s'r/r0z removing T)rWrrTr1r2r rX)rrTrPrQrYrZr[r3s rrSzFileList.exclude_patternßsº€ðˆ Ý& w°¸ÀÑIÔIˆ Ø ×ÒÐ@Ø#Ô+ñ,ñ -ô -ð -å•s˜4œ:‘” qÑ(¨"¨bÑ1Ô1ð #ð #ˆAØ× Ò  ¤¨A¤Ñ/Ô/ð #Ø× Ò  °´ ¸1´ Ñ!=Ñ>Ô>Ð>Ø”J˜q�MØ"� øØÐr)NN©r/Nr)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrr'Úcurdirrrrr"r-r4rMrUrRrSr<rrr r sú€€€€€ð ð ððððð !ð!ð!ðœ)ð%ð%ð%ð%ðððð ð ð ð!ð!ð!ð9ð9ð9ð"ð"ð"ð4ð4ð4ð8GFðGFðGFðX(ð(ð(ð(ðX:;ððððððrr có€—d„tj|d¬¦«D¦«}ttjj|¦«S)z% Find all files under 'path' c3óhK—|]-\}}}|D]$}tj ||¦«V—Œ%Œ.dSr )r'r(r*)r>ÚbaseÚdirsr Úfiles rú z#_find_all_simple..úscèè€ððá ˆD�$˜Øððð õ Œ� Š �T˜4Ñ Ô ðððððððrT)Ú followlinks)r'ÚwalkÚfilterr(Úisfile)r(Úresultss rÚ_find_all_simpleroösE€ððå!#¤¨¸4Ð!@Ñ!@Ô!@ðñô€Gõ •"”'”. 'Ñ *Ô *Ð*rcóÈ—t|¦«}|tjkr5tjtjj|¬¦«}t||¦«}t|¦«S)zŒ Find all files under 'dir' and return the list of full filenames. Unless dir is '.', return full filenames with dir prepended. )Ústart) ror'rcÚ functoolsÚpartialr(Úrelpathr&Úlist)rr Úmake_rels rrrsR€õ ˜SÑ !Ô !€EØ �bŒiÒÐÝÔ$¥R¤W¤_¸CÐ@Ñ@Ô@ˆÝ�H˜eÑ$Ô$ˆÝ �‰;Œ;Ðrcó —tj|¦«}tj}tjdkrd}d|z}t jd||¦«}|S)zæTranslate a shell-like glob pattern to a regular expression; return a string containing the regex. Differs from 'fnmatch.translate()' in that '*' does not match "special characters" (which are platform-specific). ú\z\\\\z\1[^%s]z((?ˆ>؈CØ¥ E¡ ¤ ­C° ©O¬O½cÀ#¹h¼hÑ,FÐ FÔGˆ Ø*/¨%¨%°°¸C¸C¸CÀÀÈSÈSÐQˆ ˆ à ð FØ&+ e e¨Z½¸E¹ ¼ ¸ ¸ Ô-DÐ-DÐEˆJå Œ:�jÑ !Ô !Ð!rr^)rbr'r|ryrrÚdistutils.utilrÚdistutils.errorsrrÚ distutilsrr rorcrrrWr<rrúrŒsûðððð € € € € € € € Ø€€€ØÐÐÐØ'Ð'Ð'Ð'Ð'Ð'ØKÐKÐKÐKÐKÐKÐKÐKØÐÐÐÐÐðbðbðbðbðbñbôbðbðP +ð +ð +ð” ð ð ð ð ðððð.""ð""ð""ð""ð""ð""r