Viewing File: /usr/lib/python3.6/site-packages/setuptools/__pycache__/__init__.cpython-36.pyc

3

XohD@s2dZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZmZddl
ZddlmZddlmZmZddlmZd	d
lmZddd
ddddgZejjZdZdZdgZGdddeZGdddeZ ej!Z"ddZ#ddZ$ej%j$je$_ej&ej%j'Z(Gddde(Z'ddZ)ej*fddZ+ej,dS) z@Extensions to the 'distutils' for large or complex distributionsN)convert_path)fnmatchcase)filtermap)	Extension)DistributionFeature)Require)monkeysetuprrCommandrr	
find_packagesTz
lib2to3.fixesc@sHeZdZdZedfd
fddZeddZedd	Zed
dZ	dS)
PackageFinderzI
    Generate a list of all Python packages found within a directory
    .*cCs&t|jt||jd||j|S)a	Return a list all Python packages found within directory 'where'

        'where' is the root directory which will be searched for packages.  It
        should be supplied as a "cross-platform" (i.e. URL-style) path; it will
        be converted to the appropriate local path syntax.

        'exclude' is a sequence of package names to exclude; '*' can be used
        as a wildcard in the names, such that 'foo.*' will exclude all
        subpackages of 'foo' (but not 'foo' itself).

        'include' is a sequence of package names to include.  If it's
        specified, only the named packages will be included.  If it's not
        specified, all found packages will be included.  'include' can contain
        shell style wildcard patterns just like 'exclude'.
        ez_setup*__pycache__)rr)list_find_packages_iterr
_build_filter)clswhereexcludeincluder/usr/lib/python3.6/__init__.pyfind'szPackageFinder.findccsxtj|ddD]\}}}|dd}g|dd<xp|D]h}tjj||}	tjj|	|}
|
jtjjd}d|ks8|j|	r~q8||r||r|V|j|q8WqWdS)zy
        All the packages found in 'where' that pass the 'include' filter, but
        not the 'exclude' filter.
        T)followlinksNr)	oswalkpathjoinrelpathreplacesep_looks_like_packageappend)rrrrrootdirsfilesZall_dirsdir	full_pathZrel_pathpackagerrrr>s
z!PackageFinder._find_packages_itercCstjjtjj|dS)z%Does a directory look like a package?z__init__.py)rr!isfiler")r!rrrr&Zsz!PackageFinder._looks_like_packagecsfddS)z
        Given a list of patterns, return a callable that will be true only if
        the input matches at least one of the patterns.
        cstfddDS)Nc3s|]}t|dVqdS))patN)r).0r/)namerr	<genexpr>esz@PackageFinder._build_filter.<locals>.<lambda>.<locals>.<genexpr>)any)r1)patterns)r1r<lambda>esz-PackageFinder._build_filter.<locals>.<lambda>r)r4r)r4rr_szPackageFinder._build_filterN)r)
__name__
__module____qualname____doc__classmethodrrstaticmethodr&rrrrrr"src@seZdZeddZdS)PEP420PackageFindercCsdS)NTr)r!rrrr&isz'PEP420PackageFinder._looks_like_packageN)r6r7r8r;r&rrrrr<hsr<cCs@tjjtdd|jD}|jdd|jr<|j|jdS)Ncss"|]\}}|dkr||fVqdS)dependency_linkssetup_requiresN)r=r>r)r0kvrrrr2usz*_install_setup_requires.<locals>.<genexpr>T)Zignore_option_errors)	distutilscorerdictitemsZparse_config_filesr>Zfetch_build_eggs)attrsdistrrr_install_setup_requiresqs
rGcKst|tjjf|S)N)rGrArBr)rErrrr~sc@s(eZdZejZdZddZdddZdS)	r
FcKstj||t|j|dS)zj
        Construct the command for dist, updating
        vars(self) with any keyword parameters.
        N)_Command__init__varsupdate)selfrFkwrrrrIszCommand.__init__rcKs tj|||}t|j||S)N)rHreinitialize_commandrJrK)rLZcommandZreinit_subcommandsrMcmdrrrrNszCommand.reinitialize_commandN)r)r6r7r8rHr9Zcommand_consumes_argumentsrIrNrrrrr
scCs&ddtj|ddD}ttjj|S)z%
    Find all files under 'path'
    css,|]$\}}}|D]}tjj||VqqdS)N)rr!r")r0baser)r*filerrrr2sz#_find_all_simple.<locals>.<genexpr>T)r)rr rr!r.)r!resultsrrr_find_all_simplesrScCs6t|}|tjkr.tjtjj|d}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)	rSrcurdir	functoolspartialr!r#rr)r+r*Zmake_relrrrfindalls


rX)-r9rrVZdistutils.corerAZdistutils.filelistZdistutils.utilrZfnmatchrZsetuptools.extern.six.movesrrZsetuptools.versionZ
setuptoolsZsetuptools.extensionrZsetuptools.distrrZsetuptools.dependsr	r__all__version__version__Zbootstrap_install_fromZrun_2to3_on_doctestsZlib2to3_fixer_packagesobjectrr<rrrGrrBZ
get_unpatchedr
rHrSrUrXZ	patch_allrrrr<module>s:F

Back to Directory File Manager