Viewing File: /opt/alt/python35/lib/python3.5/site-packages/setuptools/__pycache__/__init__.cpython-35.pyc



\@sdZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZmZddl
ZddlmZddlmZmZddlmZd	d
lmZddd
ddddgZejjZdZdZdgZGdddeZGdddeZ ej!Z"ej#j$Z$ej%ej#j&Z'Gddde'Z&ddZ(ej)ddZ*ej+dS)z@Extensions to the 'distutils' for large or complex distributionsN)convert_path)fnmatchcase)filtermap)	Extension)DistributionFeature)Require)monkeysetuprrCommandrr	
find_packagesTz
lib2to3.fixesc@sgeZdZdZedfd
ddZeddZedd	Zed
dZ	dS)
PackageFinderzI
    Generate a list of all Python packages found within a directory
    .*cCs7t|jt||jdd||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'.
        Zez_setupz*__pycache__)list_find_packages_iterr
_build_filter)clswhereexcludeincluder/__init__.pyfind's		zPackageFinder.findccsxtj|ddD]\}}}|dd}g|dd<x|D]}tjj||}	tjj|	|}
|
jtjjd}d|ksL|j|	rqL||r||r|V|j|qLWqWdS)zy
        All the packages found in 'where' that pass the 'include' filter, but
        not the 'exclude' filter.
        followlinksTNr)	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)rrisfiler )rrrrr$Zsz!PackageFinder._looks_like_packagecsfddS)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!|]}td|VqdS)patN)r).0r-)namerr	<genexpr>esz@PackageFinder._build_filter.<locals>.<lambda>.<locals>.<genexpr>)any)r/)patterns)r/r<lambda>esz-PackageFinder._build_filter.<locals>.<lambda>r)r2r)r2rr_szPackageFinder._build_filterN)r)
__name__
__module____qualname____doc__classmethodrrstaticmethodr$rrrrrr"src@s"eZdZeddZdS)PEP420PackageFindercCsdS)NTr)rrrrr$isz'PEP420PackageFinder._looks_like_packageN)r4r5r6r9r$rrrrr:hsr:c@s:eZdZejZdZddZdddZdS)r
FcKs'tj||t|j|dS)zj
        Construct the command for dist, updating
        vars(self) with any keyword parameters.
        N)_Command__init__varsupdate)selfZdistkwrrrr<zszCommand.__init__rcKs,tj|||}t|j||S)N)r;reinitialize_commandr=r>)r?ZcommandZreinit_subcommandsr@cmdrrrrAszCommand.reinitialize_commandN)r4r5r6r;r7Zcommand_consumes_argumentsr<rArrrrr
us	cCs5ddtj|ddD}ttjj|S)z%
    Find all files under 'path'
    css:|]0\}}}|D]}tjj||VqqdS)N)rrr )r.baser'r(filerrrr0sz#_find_all_simple.<locals>.<genexpr>rT)rrrrr,)rresultsrrr_find_all_simples	rFcCsOt|}|tjkrEtjtjjd|}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)	rFrcurdir	functoolspartialrr!rr)r)r(Zmake_relrrrfindalls
rK),r7rrIZdistutils.coreZ	distutilsZdistutils.filelistZdistutils.utilrfnmatchrZsetuptools.extern.six.movesrrZsetuptools.versionZ
setuptoolsZsetuptools.extensionrZsetuptools.distrrZsetuptools.dependsr	r__all__version__version__Zbootstrap_install_fromZrun_2to3_on_doctestsZlib2to3_fixer_packagesobjectrr:rrZcorerZ
get_unpatchedr
r;rFrHrKZ	patch_allrrrr<module>s6		F	
Back to Directory File Manager