a0bi5SrSSKrSSKrSSKrSSKrSSKJr SSKJrJ r SSK J r "SS5r S r "S S \5r\R 4S jrS rSSjrg)zsdistutils.filelist Provides the FileList class, used for poking about the filesystem and building lists of files. N) convert_path)DistutilsTemplateErrorDistutilsInternalError)logc\rSrSrSrSSjrSr\R4Sjr Sr Sr S r S r S rS rS rSSjrSSjrSrg)FileListaA 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 SUl/UlgNallfilesfiles)selfwarn debug_prints ڗ/builddir/build/BUILDROOT/alt-python313-setuptools-69.0.2-3.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/setuptools/_distutils/filelist.py__init__FileList.__init__ s  cXlgr )r)rrs r set_allfilesFileList.set_allfiles&s rc$[U5Ulgr )findallr)rdirs rrFileList.findall)s   rc6SSKJn U(a [U5 gg)znPrint 'msg' to stdout if the global DEBUG (taken from the DISTUTILS_DEBUG environment variable) flag is true. r)DEBUGN)distutils.debugrprint)rmsgrs rrFileList.debug_print,s *  #J rc:URRU5 gr )rappend)ritems rr%FileList.append7s $rc:URRU5 gr )rextend)ritemss rr)FileList.extend:s % rc[[[RRUR 55n/UlUH9nUR R [RR"U65 M; gr )sortedmapospathsplitrr%join)rsortable_files sort_tuples rsort FileList.sort=sOBGGMM4:: >? (J JJ  bggllJ7 8)rc[[UR5S- SS5H5nURUURUS- :XdM(URU M7 g)Nrr)rangelenr)ris rremove_duplicatesFileList.remove_duplicatesFsJs4::*Ar2Azz!} 1q5 11JJqM3rcUR5nUSnS=n=pVUS;a<[U5S:a[SU-5eUSSVs/sHn[U5PM nnOUS;aJ[U5S:a[SU-5e[US5nUSSVs/sHn[U5PM nnO@US ;a,[U5S:wa[S U-5e[US5nO[S U-5eX4XV4$s snfs snf) Nr)includeexcludeglobal-includeglobal-excludez&'%s' expects ...r)recursive-includerecursive-excludez,'%s' expects ...)graftprunez#'%s' expects a single zunknown action '%s')r1r:rr)rlinewordsactionpatternsr dir_patternws r_parse_template_lineFileList._parse_template_lineNs& q'+++3 O O5zA~,)GH H#33#<warning: no files found matching '%s' anywhere in distributionrBzglobal-exclude zRwarning: no previously-included files matching '%s' found anywhere in distributionrDzrecursive-include {} {})prefixz:warning: no files found matching '%s' under directory '%s'rEzrecursive-exclude {} {}zNwarning: no previously-included files matching '%s' found under directory '%s'rGzgraft z+warning: no directories found matching '%s'rHzprune z6no previously-included directories found matching '%s'z'this cannot happen: invalid action '%s') rOrr2include_patternrwarningexclude_patternformatr)rrIrKrLrrMpatternr"s rprocess_template_lineFileList.process_template_linels 04/H/H/N,3 Y    Z#((8*<< =#++GA+>>KK GQ$y   Z#((8*<< =#++GA+>>KK2 $' '   .(1CC D#++GA+>>KK7 $' '   .(1CC D#++GA+>>KKB $* *   6==c388HCUV W#++G+@@WKKc2 $* *   6==c388HCUV W#++G+@@KK>  $w    X 3 4''['A I;WBw    X 3 4''['A PB )9FB rcPSn[XX45nURSUR-5 URcUR 5 URHLnUR U5(dMURSU-5 UR RU5 SnMN U$)aSelect 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'z adding T)translate_patternrrYrrsearchrr%)rrYrSrTis_regex files_found pattern_renames rrUFileList.include_patterns4 &wI  @:CUCUUV == LLNMMD  &&  d!23 !!$'" " rc\Sn[XX45nURSUR-5 [[ UR 5S- SS5HXnUR UR U5(dM(URSUR U-5 UR U SnMZ U$)zRemove 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'rr8z removing T)r]rrYr9r:rr^)rrYrSrTr_r`rar;s rrWFileList.exclude_patterns &wI  @:CUCUUVs4::*B3A  A//   1 !=>JJqM" 4 rr )NNrNr)__name__ __module__ __qualname____firstlineno____doc__rrr/curdirrrr%r)r5r<rOrZrUrW__static_attributes__rrr r sO  !))% !9"4#_find_all_simple.. s3:D%6TQV T  QV *s8:) _UniqueDirsfilterr/walkr0isfile)r0 all_uniqueresultss r_find_all_simpler~sE##BGGDd$CDJ:DG "''..' **rc.\rSrSrSrSr\S5rSrg)rxizv Exclude previously-seen dirs from walk results, avoiding infinite recursion. Ref https://bugs.python.org/issue44497. cUup#n[R"U5nURUR4nX`;nU(aUSS2 UR U5 U(+$)z Given an item from an os.walk result, determine if the item represents a unique dir for this instance and if not, prevent further traversal. N)r/statst_devst_inoadd)r walk_itemrsrtrr candidatefounds r__call___UniqueDirs.__call__sS &Ewwt}KK, ! Q yrc$[U"5U5$r )ry)clsr*s rry_UniqueDirs.filter)sceU##rrnN) rgrhrirjrkr classmethodryrmrnrrrxrxs  $$rrxc[U5nU[R:Xa8[R"[R R US9n[X!5n[U5$)z Find all files under 'dir' and return the list of full filenames. Unless dir is '.', return full filenames with dir prepended. )start) r~r/rl functoolspartialr0relpathr.list)rrmake_rels rrr.sH S !E bii$$RWW__C@H$ ;rc[R"U5n[Rn[RS:XaSnSU-n[R "SX15nU$)zTranslate 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((?CH+DE ff 66T>CE S_s3x-GH &--eQTU "))%CJL1IJJ ::j !!rrf)rkr/rrrutilrerrorsrr_logrr r~setrxrlrrr]rnrrrsW  Bqqn+$#$6 .""r