ó ž­çSc@sÆddlmZddlmZddljjZddlZddlZddl Z ddl Z yddl m Z Wn$e k rœdd d„ƒYZ nXdeje fd„ƒYZd „ZdS( iÿÿÿÿ(tglob(t convert_pathN(t Mixin2to3RcBseZed„ZRS(cCsdS(s do nothingN((tselftfilestdoctests((sE/usr/local/lib/python2.7/site-packages/setuptools/command/build_py.pytrun_2to3 s(t__name__t __module__tTrueR(((sE/usr/local/lib/python2.7/site-packages/setuptools/command/build_py.pyR stbuild_pycBs¡eZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z e j d kr{d 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. cCsftjj|ƒ|jj|_|jjp.i|_d|jkrP|jd=ng|_g|_dS(Nt data_files( torigR tfinalize_optionst distributiont package_datatexclude_package_datat__dict__t_build_py__updated_filest_build_py__doctests_2to3(R((sE/usr/local/lib/python2.7/site-packages/setuptools/command/build_py.pyR s    cCsª|j r|j rdS|jr.|jƒn|jrN|jƒ|jƒn|j|jtƒ|j|jtƒ|j|j tƒ|j t j j |ddƒƒdS(s?Build modules, packages, and copy data files to build directoryNtinclude_bytecodei(t py_modulestpackagest build_modulestbuild_packagestbuild_package_dataRRtFalseR Rt byte_compileR R t get_outputs(R((sE/usr/local/lib/python2.7/site-packages/setuptools/command/build_py.pytrun%s     cCs6|dkr#|jƒ|_}|Stjj||ƒS(NR (t_get_data_filesR R R t __getattr__(RtattrR((sE/usr/local/lib/python2.7/site-packages/setuptools/command/build_py.pyR9s cCsDtjj||||ƒ\}}|r:|jj|ƒn||fS(N(R R t build_moduleRtappend(Rtmodulet module_filetpackagetoutfiletcopied((sE/usr/local/lib/python2.7/site-packages/setuptools/command/build_py.pyR!?s cCs´|jƒg}x|jpdD]Œ}|j|ƒ}tjj|jg|jdƒŒ}t|ƒd}g|j ||ƒD]}||^q}}|j ||||fƒq W|S(s?Generate list of '(package,src_dir,build_dir,filenames)' tuplest.i(( tanalyze_manifestRtget_package_dirtostpathtjoint build_libtsplittlentfind_data_filesR"(RtdataR%tsrc_dirt build_dirtplentfilet filenames((sE/usr/local/lib/python2.7/site-packages/setuptools/command/build_py.pyRFs %)cCsŠ|jjdgƒ|jj|gƒ}|jj|gƒ}x6|D].}|jttjj|t|ƒƒƒƒqEW|j |||ƒS(s6Return filenames for package's data files in 'src_dir't( Rtgettmanifest_filestextendRR+R,R-Rtexclude_data_files(RR%R3tglobsRtpattern((sE/usr/local/lib/python2.7/site-packages/setuptools/command/build_py.pyR1[s  ,c CsÍxÆ|jD]»\}}}}x¦|D]ž}tjj||ƒ}|jtjj|ƒƒtjj||ƒ}|j||ƒ\}} tjj|ƒ}| r#||jj kr#|j j |ƒq#q#Wq WdS(s$Copy data files into build directoryN( R R+R,R-tmkpathtdirnamet copy_filetabspathRtconvert_2to3_doctestsRR"( RR%R3R4R7tfilenamettargettsrcfiletoutfR'((sE/usr/local/lib/python2.7/site-packages/setuptools/command/build_py.pyRes c Cs\i|_}|jjsdSi}x0|jp2dD]}||t|j|ƒƒtseenRU((sE/usr/local/lib/python2.7/site-packages/setuptools/command/build_py.pyR<Æs &(RRt__doc__R RRR!RR1RR)RYtsystversionRR_RjR*R<(((sE/usr/local/lib/python2.7/site-packages/setuptools/command/build_py.pyR s         cCsOtjj|ƒs|Sddlm}tjdƒjƒ|}||ƒ‚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. (R+R,tisabsReRvttextwraptdedenttlstrip(R,Rvtmsg((sE/usr/local/lib/python2.7/site-packages/setuptools/command/build_py.pyRJÙs ((Rtdistutils.utilRtdistutils.command.build_pytcommandR R R+RtRmRxtsetuptools.lib2to3_exRt ImportErrorRJ(((sE/usr/local/lib/python2.7/site-packages/setuptools/command/build_py.pyts     È