\bgdZddlmZddlZddlZddlZddlmZmZddl m Z m Z m Z e r ddl mZmZmZgdZd1d2dZd1d3dZd3dZe d4dZe d5dZd6d Zd!Ze d7d#Ze d8d%Zd9d'Ze d:d(Ze d;d)Zdd/Zd0ZdS)?z Filename globbing utility. Mostly a copy of `glob` from Python 3.5. Changes include: * `yield from` and PEP3102 `*` removed. * Hidden files are not ignored. ) annotationsN)IterableIterator) TYPE_CHECKINGAnyStroverload) BytesPathStrOrBytesPathStrPath)globiglobescapeFpathnamer recursiveboolreturn list[AnyStr]c>tt||S)ayReturn a list of paths matching a pathname pattern. The pattern may contain simple shell-style wildcards a la fnmatch. However, unlike fnmatch, filenames starting with a dot are special cases that are not matched by '*' and '?' patterns. If recursive is true, the pattern '**' will match any files and zero or more directories and subdirectories. )r)listr )rrs `/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/setuptools/glob.pyr r s h)444 5 55Iterator[AnyStr]cnt||}|r"t|rt|}|rJ|S)aReturn an iterator which yields the paths matching a pathname pattern. The pattern may contain simple shell-style wildcards a la fnmatch. However, unlike fnmatch, filenames starting with a dot are special cases that are not matched by '*' and '?' patterns. If recursive is true, the pattern '**' will match any files and zero or more directories and subdirectories. )_iglob _isrecursivenext)rritss rr r %sC ) $ $B\(++ HH u Irc#VKtj|\}}|rt|rtnt }t |sK|r$tj|r|Vn#tj|r|VdS|s|||Ed{VdS||kr t |rt||}n|g}t |st}|D]3}|||D]$}tj ||V%4dSN) ospathsplitrglob2glob1 has_magiclexistsisdirrglob0join)rrdirnamebasename glob_in_dirdirsnames rrr7sg h//GX$Jh)?)?J%%UK X    wx(( w}}W%%  ;w111111111(y11!'!;!;y X   ..K22 . .D',,w-- - - - - ...rr+r patternstr list[str]cdSr r+r0s rr%r%[s8;rr bytes list[bytes]cdSr r4r5s rr%r%]s>Acrr str | byteslist[str] | list[bytes]c|sAt|tr tjd}n tj} tj|}n#t $rgcYSwxYwtj||SNASCII) isinstancer6r!curdirencodelistdirOSErrorfnmatchfilter)r+r0namess rr%r%_s  gu % % i&&w//GGiG 7##   >% ) ))sA A)(A)c|s#tj|r|gSn@tjtj||r|gSgSr )r!r"r(r'r*)r+r,s rr)r)msd  7== ! ! :   7??27<<:: ; ; :  Ir Iterator[str]cdSr r4r5s rr$r$}sr6r!r?r@rArBr"r*rM)r+rExr"ys rrMrMs  gu % % i&&w//GGiG 7##  %%+29rw||GQ'''4 % %A',,q!$$ $ $ $ $ % %%sA A*)A*z([*?[])s([*?[])rct|trt|duSt|duSr )r>r6magic_check_bytessearch magic_check)rs rr&r&sF!U1 ''**$66!!!$$D00rcDt|tr|dkS|dkS)Ns**z**)r>r6)r0s rrrs)'5!!%$rctj|\}}t|trt d|}ntd|}||zS)zEscape all special characters.s[\1]z[\1])r!r" splitdriver>r6rUsubrW)rdrives rrrsdg((22OE8(E""6$((8<<??7H55 8 r)F)rrrrrr)rrrrrr)r+r r0r1rr2)r+r r0r6rr7)r+r r0r9rr:)r+r r0r1rrG)r+r r0r6rrI)r+r r0r9rrK)r+r rrG)r+r rrI)r+r rrK)rr9rr)r0r9rr)__doc__ __future__rrCr!recollections.abcrrtypingrrr _typeshedr r r __all__r r rr%r)r$rMcompilerWrUr&rrr4rrres'#""""" ........2222222222=<<<<<<<<<< % % % 6 6 6 6 6$....H ;;; ; AAA A * * * *     ??? ? EEE E"""" 555 5 999 9%%%%$bj## BJz**1111     r