_i d Z ddlZddlZddlZg dZddZddZd Zd Zd Z d Z d Z ej d Z ej d Zd Zd Zd Zy)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. N)globiglobescapec . t t | | S )ay Return 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. ) recursive)listr )pathnamer s /builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/glob.pyr r s h)455 c V t | | }|rt | rt | }|rJ |S )a Return 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)r r itss r r r s/ ) $B\(+Hu Ir c # ( K t j j | \ }}|rt | rt nt }t | sJ|r$t j j | r| y t j j | r| y |s ||| E d { y || k7 rt | r t || }n|g}t | st }|D ]2 } ||| D ]$ }t j j || & 4 y 7 nwN)ospathsplitr glob2glob1 has_magiclexistsisdirr glob0join)r r dirnamebasenameglob_in_dirdirsnames r r r 0 s h/GX$h)?%UKXwwx( ww}}W%w111 (y1gy)yX2D'',,w-- 3 2s BD!D"A/Dc | s@t |t r t j j d } nt j } t j | }t j || S # t $ r g cY S w xY wNASCII) isinstancebytesr curdirencodelistdirOSErrorfnmatchfilter)r patternnamess r r r T sh gu%ii&&w/GiiG 7# >>%)) s A/ /A=<A=c |s$t j j | r|gS g S t j j t j j | | r|gS g S r )r r r r r )r r s r r r a sT 77==!: I 77??277<<:;: Ir c # \ K t | sJ |d d t | D ] }| y w)Nr )r _rlistdir)r r. xs r r r q s4 "1+ w s *,c # K | s@t | t r t j j d } nt j } t j | }|D ]\ }| | r t j j | | n|}t | D ]$ }t j j || & ^ y # t j $ r Y y w xY wwr$ ) r&