ó b-äQc @sddlmZyddlmZWnek r=eZnXddlZddlZddlm Z ddl m Z ddl m Z ddlmZyddlmZWn>ek rêddlmZed ƒ[dd lmZnXdd lmZdd lTeZeZd Zejdkr/eZnFejdkruy ddlmZeZeZWquek rqquXnd„Z defd„ƒYZes©ejdkrÓddddddddddd„ Z"n-dZddddddddddd„ Z"dS(iÿÿÿÿ(t build_extN(t copy_file(tLibrary(t new_compiler(tcustomize_compiler(t _CONFIG_VARS(tget_config_vartLDSHARED(t _config_vars(tlog(t*tsharedtdarwintnt(tRTLD_NOWcCstr |SdS(Nt(t have_rtld(ts((s@/usr/lib/python2.7/site-packages/setuptools/command/build_ext.pytif_dl&sRcBs–eZd„Zd„Zeek r@eedƒ r@d„Znd„Zd„Z d„Z d„Z d„Z d „Z d „Zd „Zed „ZRS( cCs@|jd}|_tj|ƒ||_|r<|jƒndS(s;Build extensions in build directory, then copy if --inplaceiN(tinplacet _build_exttruntcopy_extensions_to_source(tselft old_inplace((s@/usr/lib/python2.7/site-packages/setuptools/command/build_ext.pyR1s   c Csù|jdƒ}xã|jD]Ø}|j|jƒ}|j|ƒ}|jdƒ}dj|d ƒ}|j|ƒ}tj j|tj j |ƒƒ}tj j|j |ƒ} t | |d|j d|jƒ|jr|j|pätj|tƒqqWdS(Ntbuild_pyt.iÿÿÿÿtverbosetdry_run(tget_finalized_commandt extensionstget_ext_fullnametnametget_ext_filenametsplittjointget_package_dirtostpathtbasenamet build_libRRRt _needs_stubt write_stubtcurdirtTrue( RRtexttfullnametfilenametmodpathtpackaget package_dirt dest_filenamet src_filename((s@/usr/lib/python2.7/site-packages/setuptools/command/build_ext.pyR9s!  t pyrex_sourcescGs+tj||ƒp|}tj|||ŒS(N(Rt swig_sourcest _du_build_ext(Rtsourcest otherargs((s@/usr/lib/python2.7/site-packages/setuptools/command/build_ext.pyR6QscCs­tj||ƒ}||jkr©|j|}t|tƒrhtjj|ƒ\}}|jj |t ƒSt r©|j r©tjj |ƒ\}}tjj|d|ƒSn|S(Nsdl-(RR!text_mapt isinstanceRR%R&tsplitexttshlib_compilertlibrary_filenametlibtypet use_stubst_links_to_dynamicR"R#(RR.R/R-tfntd((s@/usr/lib/python2.7/site-packages/setuptools/command/build_ext.pyR!Ys cCs,tj|ƒd|_g|_i|_dS(N(Rtinitialize_optionstNoneR=tshlibsR:(R((s@/usr/lib/python2.7/site-packages/setuptools/command/build_ext.pyRDes   c Cs¾tj|ƒ|jpg|_|j|jƒg|jD]}t|tƒr9|^q9|_|jrs|jƒnx&|jD]}|j|j ƒ|_ q}Wx|jD]}|j }||j |<||j |j dƒd<|jrô|j |ƒp÷t}|_|otot|tƒ |_|j|ƒ}|_tjjtjj|j|ƒƒ}|r‚||jkr‚|jj|ƒn|r¦tr¦tj|jkr¦|jjtjƒq¦q¦WdS(NRiÿÿÿÿ(Rtfinalize_optionsRtcheck_extensions_listR;RRFtsetup_shlib_compilerRR t _full_nameR:R"tlinks_to_dynamictFalseRAR@R)R!t _file_nameR%R&tdirnameR#R(t library_dirstappendR+truntime_library_dirs(RR-R.tltdR/tlibdir((s@/usr/lib/python2.7/site-packages/setuptools/command/build_ext.pyRGks*     %$cCsÉtd|jd|jd|jƒ}|_tjdkrtjƒ}z,dtdt startswithtcreate_static_lib(RR‘R’RˆRcRORQRoR“R”R•R–R—R/R'R-((s@/usr/lib/python2.7/site-packages/setuptools/command/build_ext.pyRjs  (#tdistutils.command.build_extRR7tPyrex.Distutils.build_extRt ImportErrorR%RXtdistutils.file_utilRtsetuptools.extensionRtdistutils.ccompilerRtdistutils.sysconfigRt sysconfigRRRt distutilsR tdistutils.errorsRLRR@R?RYR,R tdlRRRERj(((s@/usr/lib/python2.7/site-packages/setuptools/command/build_ext.pytsT         Ò