Viewing File: /opt/alt/python38/lib/python3.8/site-packages/setuptools/__pycache__/glob.cpython-38.pyc

U

+’a	ã@s’dZddlZddlZddlZdddgZddd„Zddd„Zd	d
„Zdd„Zd
d„Z	dd„Z
dd„Ze d¡Z
e d¡Zdd„Zdd„Zdd„ZdS)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ÚglobÚiglobÚescapeFcCstt||dƒ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.
    )Ú	recursive)Úlistr)Úpathnamer©rú7/tmp/pip-install-1bd_1mtk/setuptools/setuptools/glob.pyrscCs*t||ƒ}|r&t|ƒr&t|ƒ}|r&t‚|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Ú_isrecursiveÚnextÚAssertionError)rrÚitÚsrrr	rs

ccsÎtj |¡\}}|r t|ƒr tnt}t|ƒsZ|rDtj |¡rV|Vntj |¡rV|VdS|sr|||ƒEdHdS||krŽt|ƒrŽt	||ƒ}n|g}t|ƒs t
}|D]$}|||ƒD]}tj ||¡Vq²q¤dS©N)ÚosÚpathÚsplitrÚglob2Úglob1Ú	has_magicÚlexistsÚisdirr
Úglob0Újoin)rrÚdirnameÚbasenameÚglob_in_dirÚdirsÚnamerrr	r
0s(r
cCsV|s"t|tƒrtj d¡}ntj}zt |¡}Wntk
rHgYSXt ||¡S©NÚASCII)	Ú
isinstanceÚbytesrÚcurdirÚencodeÚlistdirÚOSErrorÚfnmatchÚfilter)rÚpatternÚnamesrrr	rTs

rcCs8|stj |¡r4|gSntj tj ||¡¡r4|gSgSr)rrrrr)rrrrr	rasrccs2t|ƒst‚|dd…Vt|ƒD]
}|Vq"dS)Nr)rr
Ú	_rlistdir)rr*Úxrrr	rqsrccs’|s"t|tƒrtj d¡}ntj}zt |¡}Wntjk
rHYdSX|D]>}|V|rjtj ||¡n|}t	|ƒD]}tj ||¡VqvqNdSr )
r"r#rr$r%r&Úerrorrrr,)rr+r-rÚyrrr	r,ys
r,z([*?[])s([*?[])cCs(t|tƒrt |¡}n
t |¡}|dk	Sr)r"r#Úmagic_check_bytesÚsearchÚmagic_check)rÚmatchrrr	rŽs

rcCst|tƒr|dkS|dkSdS)Ns**z**)r"r#)r*rrr	r–s
rcCs<tj |¡\}}t|tƒr(t d|¡}nt d|¡}||S)z#Escape all special characters.
    s[\1]z[\1])rrÚ
splitdriver"r#r0Úsubr2)rÚdriverrr	rs

)F)F)Ú__doc__rÚrer(Ú__all__rrr
rrrr,Úcompiler2r0rrrrrrr	Ú<module>s 


$



Back to Directory File Manager