fc@sdZddlZddlZddlZddlZddlmZddlm Z ddl m Z m Z ddl ZddlmZddlmZmZddlmZd d lmZd d d ddddgZejjZdZeZdgZde fdYZ!de!fdYZ"e!j#Z$dZ%dZ&ej'j&je&_ej(ej'j)Z*de*fdYZ)dZ+ej,dZ-ej.dS(s@Extensions to the 'distutils' for large or complex distributionsiN(t convert_path(t fnmatchcase(tfiltertmap(t Extension(t DistributiontFeature(tRequirei(tmonkeytsetupRRtCommandRRt find_packagess lib2to3.fixest PackageFindercBsSeZdZeddddZedZedZedZRS( sI Generate a list of all Python packages found within a directory t.t*cCs7t|jt||jdd||j|S(s 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'. tez_setups *__pycache__(tlistt_find_packages_iterRt _build_filter(tclstwheretexcludetinclude((s7/usr/lib/python2.7/site-packages/setuptools/__init__.pytfind's  c csxtj|dtD]\}}}|}g|(x|D]}tjj||} tjj| |} | jtjjd} d|ks:|j|  rq:n|| r||  r| Vn|j |q:WqWdS(sy All the packages found in 'where' that pass the 'include' filter, but not the 'exclude' filter. t followlinksR N( tostwalktTruetpathtjointrelpathtreplacetsept_looks_like_packagetappend( RRRRtroottdirstfilestall_dirstdirt full_pathtrel_pathtpackage((s7/usr/lib/python2.7/site-packages/setuptools/__init__.pyR>s% cCstjjtjj|dS(s%Does a directory look like a package?s __init__.py(RRtisfileR(R((s7/usr/lib/python2.7/site-packages/setuptools/__init__.pyR!Zscs fdS(s Given a list of patterns, return a callable that will be true only if the input matches at least one of the patterns. cstfdDS(Nc3s!|]}td|VqdS(tpatN(R(t.0R,(tname(s7/usr/lib/python2.7/site-packages/setuptools/__init__.pys es(tany(R.(tpatterns(R.s7/usr/lib/python2.7/site-packages/setuptools/__init__.pytet((R0((R0s7/usr/lib/python2.7/site-packages/setuptools/__init__.pyR_s((R( t__name__t __module__t__doc__t classmethodRRt staticmethodR!R(((s7/usr/lib/python2.7/site-packages/setuptools/__init__.pyR "s tPEP420PackageFindercBseZedZRS(cCstS(N(R(R((s7/usr/lib/python2.7/site-packages/setuptools/__init__.pyR!is(R3R4R7R!(((s7/usr/lib/python2.7/site-packages/setuptools/__init__.pyR8hscCsXtjjtd|jD}|jdt|jrT|j|jndS(Ncss-|]#\}}|dkr||fVqdS(tdependency_linkstsetup_requiresN(R9R:((R-tktv((s7/usr/lib/python2.7/site-packages/setuptools/__init__.pys us tignore_option_errors( t distutilstcoreRtdicttitemstparse_config_filesRR:tfetch_build_eggs(tattrstdist((s7/usr/lib/python2.7/site-packages/setuptools/__init__.pyt_install_setup_requiresqs   cKst|tjj|S(N(RFR>R?R (RD((s7/usr/lib/python2.7/site-packages/setuptools/__init__.pyR ~s cBs,eZejZeZdZddZRS(cKs'tj||t|j|dS(sj Construct the command for dist, updating vars(self) with any keyword parameters. N(t_Commandt__init__tvarstupdate(tselfREtkw((s7/usr/lib/python2.7/site-packages/setuptools/__init__.pyRHsicKs,tj|||}t|j||S(N(RGtreinitialize_commandRIRJ(RKtcommandtreinit_subcommandsRLtcmd((s7/usr/lib/python2.7/site-packages/setuptools/__init__.pyRMs(R3R4RGR5tFalsetcommand_consumes_argumentsRHRM(((s7/usr/lib/python2.7/site-packages/setuptools/__init__.pyR s  cCs2dtj|dtD}ttjj|S(s% Find all files under 'path' css:|]0\}}}|D]}tjj||VqqdS(N(RRR(R-tbaseR$R%tfile((s7/usr/lib/python2.7/site-packages/setuptools/__init__.pys s R(RRRRRR+(Rtresults((s7/usr/lib/python2.7/site-packages/setuptools/__init__.pyt_find_all_simplescCsRt|}|tjkrHtjtjjd|}t||}nt|S(s Find all files under 'dir' and return the list of full filenames. Unless dir is '.', return full filenames with dir prepended. tstart( RVRtcurdirt functoolstpartialRRRR(R'R%tmake_rel((s7/usr/lib/python2.7/site-packages/setuptools/__init__.pytfindalls  (/R5RRYtdistutils.coreR>tdistutils.filelisttdistutils.utilRtfnmatchRtsetuptools.extern.six.movesRRtsetuptools.versiont setuptoolstsetuptools.extensionRtsetuptools.distRRtsetuptools.dependsRR2Rt__all__tversiont __version__tNonetbootstrap_install_fromRtrun_2to3_on_docteststlib2to3_fixer_packagestobjectR R8RR RFR R?t get_unpatchedR RGRVRXR\t patch_all(((s7/usr/lib/python2.7/site-packages/setuptools/__init__.pyts:        F