Ñò b-äQc@sddkZddkZddkZddklZddklZddk l Z yrddkl Z ddk l Z ddklZlZddkZdefd „ƒYZd e fd „ƒYZ Wn&ej od dd „ƒYZ nXd ee fd„ƒYZd„ZdS(iÿÿÿÿN(tbuild_py(t convert_path(tglob(t Mixin2to3(tlog(tRefactoringTooltget_fixers_from_packagetDistutilsRefactoringToolcBs#eZd„Zd„Zd„ZRS(cOsti||ŒdS(N(Rterror(tselftmsgtargstkw((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyt log_error scGsti||ŒdS(N(Rtinfo(R R R ((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyt log_messagescGsti||ŒdS(N(Rtdebug(R R R ((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyt log_debugs(t__name__t __module__R RR(((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyR s  RcBs&eZed„Zd„Zd„ZRS(cCs§|iitj odS|pdStiddi|ƒƒ|iƒ|iƒ|o:ti o,t |i ƒ}|i |dtdtƒq£nt i||ƒdS(NsFixing t twritet doctests_only(t distributiontuse_2to3tTrueRRtjoint_Mixin2to3__build_fixer_namest_Mixin2to3__exclude_fixerst setuptoolstrun_2to3_on_doctestsRt fixer_namestrefactort _Mixin2to3trun_2to3(R tfilestdocteststr((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyR"s   !cCsŠ|iodSg|_x'tiD]}|iit|ƒƒq"W|iidj o1x.|iiD]}|iit|ƒƒqbWndS(N(RRtlib2to3_fixer_packagestextendRRtuse_2to3_fixerstNone(R tp((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyt__build_fixer_names(s    cCsut|dgƒ}|iidj o|i|iiƒnx2|D]*}||ijo|ii|ƒqCqCWdS(Ntexclude_fixers(tgetattrRtuse_2to3_exclude_fixersR)R'Rtremove(R texcluded_fixerst fixer_name((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyt__exclude_fixers1s(RRtFalseR"RR(((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyRs  cBseZed„ZRS(cCsdS(N((R R#R$((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyR";s(RRRR"(((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyR:sRcBs£eZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z e i d jod d „Znd „Zd„Zd„Zd„ZRS(sXEnhanced 'build_py' command that includes data files with packages The data files are specified via a 'package_data' argument to 'setup()'. See 'setuptools.dist.Distribution' for more details. Also, this version of the 'build_py' command allows you to specify both 'py_modules' and 'packages' in the same setup operation. cCsfti|ƒ|ii|_|iiph|_d|ijo|id=ng|_g|_dS(Nt data_files(t _build_pytfinalize_optionsRt package_datatexclude_package_datat__dict__t_build_py__updated_filest_build_py__doctests_2to3(R ((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyR6Hs  cCs®|i o|i odS|io|iƒn|io|iƒ|iƒn|i|itƒ|i|itƒ|i|i tƒ|i t i |ddƒƒdS(s?Build modules, packages, and copy data files to build directoryNtinclude_bytecodei( t py_modulestpackagest build_modulestbuild_packagestbuild_package_dataR"R:R3RR;t byte_compileR5t get_outputs(R ((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pytrunPs   cCs5|djo|iƒ|_}|Sti||ƒS(NR4(t_get_data_filesR4R5t __getattr__(R tattrR#((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyRFds cCsCti||||ƒ\}}|o|ii|ƒn||fS(N(R5t build_moduleR:tappend(R tmodulet module_filetpackagetoutfiletcopied((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyRHisc Cs½|iƒg}x¦|ipdD]”}|i|ƒ}tii|ig|idƒŒ}t|ƒd}g}|i ||ƒD]}|||q‚~}|i ||||fƒq!W|S(s?Generate list of '(package,src_dir,build_dir,filenames)' tuplest.i(( tanalyze_manifestR>tget_package_dirtostpathRt build_libtsplittlentfind_data_filesRI( R tdataRLtsrc_dirt build_dirtplent_[1]tfilet filenames((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyREos %1cCsŠ|iidgƒ|ii|gƒ}|ii|gƒ}x6|D].}|ittii|t|ƒƒƒƒqEW|i |||ƒS(s6Return filenames for package's data files in 'src_dir't( R7tgettmanifest_filesR'RRRRSRRtexclude_data_files(R RLRYtglobsR#tpattern((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyRW„s,c CsÖd}xÉ|iD]¾\}}}}x©|D]¡}tii||ƒ}|itii|ƒƒtii||ƒ}|i||ƒ\} } tii|ƒ}| o'||i i jo|i i | ƒq)q)WqWdS(s$Copy data files into build directoryN( R)R4RRRSRtmkpathtdirnamet copy_filetabspathRtconvert_2to3_doctestsR;RI( R tlastdirRLRYRZR^tfilenamettargettsrcfiletoutfRN((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyRAŽs c Cshh|_}|iipdSh}x1|ipdD]}||t|i|ƒƒtassert_relativeRQt run_commandtget_finalized_commandtfilelistR#RRRSRUR)Rtendswitht setdefaultRI( R tmftsrc_dirsRLtei_cmdRStdtftprevtoldftdf((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyRPœs.    ! cCsdS(N((R ((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pytget_data_files´ss2.4icCsZti||ƒg}|iD]5\}}}}|D]}|tii||ƒq3q~S(sjReturn complete list of files copied to the build directory This includes both '.py' files and data files, as well as '.pyc' and '.pyo' files if 'include_bytecode' is true. (This method is needed for the 'install_lib' command to do its job properly, and to generate a correct installation manifest.) (R5RCR4RRRSR(R R<R\RLRYRZR^Rk((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyRC·sc Csýy|i|SWntj onXti|||ƒ}||i|<| p|ii o|Sx>|iiD],}||jp|i|dƒoPqoqoW|St|dƒ}diƒ|i ƒjo$ddk l }|i d|ƒn|i ƒ|S(s8Check namespace packages' __init__ for declare_namespaceROtrbUtdeclare_namespaceiÿÿÿÿ(Rs¼WARNING: %s is a namespace package, but its __init__.py does not declare_namespace(); setuptools 0.7 will REQUIRE this! (See the setuptools manual under "Namespace Packages" for details.) (tpackages_checkedtKeyErrorR5t check_packageRtnamespace_packagest startswithtopentencodetreadt distutilsRtwarntclose(R RLt package_dirtinit_pytpkgR{R((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyR„Ås*  !   cCsh|_ti|ƒdS(N(R‚R5tinitialize_options(R ((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyRäs cCsCti||ƒ}|iidj otii|ii|ƒS|S(N(R5RQRtsrc_rootR)RRRSR(R RLtres((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyRQésc CsÒ|iidgƒ|ii|gƒ}g}x<|D]4}|iti|tii|t|ƒƒƒƒq5Wt i |ƒ}h}g}|D]>} | |jo+| |jo|i | dƒo || qq~S(s6Filter filenames for package's data files in 'src_dir'R_i( R8R`R'tfnmatchtfilterRRRSRRtdicttfromkeysRv( R RLRYR#RctbadRdtseenR\R{((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyRbðs&(RRt__doc__R6RDRFRHRERWRARPRtsystversionRCR„RRQRb(((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyR?s            cCs<tii|ƒp|Sddkl}|d|ƒ‚dS(Niÿÿÿÿ(tDistutilsSetupErrorsªError: setup script specifies an absolute path: %s setup() arguments must *always* be /-separated paths relative to the setup.py directory, *never* absolute paths. (RRRStisabstdistutils.errorsRœ(RSRœ((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyRqs ((tos.pathRRRšR“tdistutils.command.build_pyRR5tdistutils.utilRRRR!RŠRtlib2to3.refactorRRRRt ImportErrorRq(((sA/usr/lib/python2.6/vendor-packages/setuptools/command/build_py.pyts$  #Ä