ó q®¸Qc@sÛdZddlZddlZddlmZddlmZmZmZddl m Z ddl m Z ddl mZdefd „ƒYZd ejejfd „ƒYZd „Zed kr×ejddƒndS(sTests for distutils.ccompiler.iÿÿÿÿN(tcaptured_stdout(tgen_lib_optionst CCompilertget_default_compiler(tcustomize_compiler(tdebug(tsupportt FakeCompilercBs/eZd„Zd„Zdd„Zd„ZRS(cCsd|S(Ns-L((tselftdir((s4/sys/lib/python2.7/distutils/tests/test_ccompiler.pytlibrary_dir_option scCsdd|gS(Ns-cools-R((RR ((s4/sys/lib/python2.7/distutils/tests/test_ccompiler.pytruntime_library_dir_optionsicCsdS(Ntfound((RtdirstlibR((s4/sys/lib/python2.7/distutils/tests/test_ccompiler.pytfind_library_filescCsd|S(Ns-l((RR((s4/sys/lib/python2.7/distutils/tests/test_ccompiler.pytlibrary_options(t__name__t __module__R R RR(((s4/sys/lib/python2.7/distutils/tests/test_ccompiler.pyR s   tCCompilerTestCasecBs#eZd„Zd„Zd„ZRS(cCsztƒ}ddg}dg}tjjddƒdg}t||||ƒ}ddd d d d g}|j||ƒdS( Ntlib1tlib2trunlib1R tnametname2s-Llib1s-Llib2s-cools -Rrunlib1R s-lname2(RtostpathtjoinRt assertEqual(Rtcompilertlibdirst runlibdirstlibstoptstwanted((s4/sys/lib/python2.7/distutils/tests/test_ccompiler.pyttest_gen_lib_optionss    cCsÁdtfd„ƒY}|ƒ}tƒ}|jdƒWdQX|jdƒ|j|jƒdƒtt_zFtƒ}|jdƒWdQX|jdƒ|j|jƒdƒWdt t_XdS(Nt MyCCompilercBseZiZRS((RRt executables(((s4/sys/lib/python2.7/distutils/tests/test_ccompiler.pyR$(stxxxitsxxx ( RRt debug_printtseekRtreadtTrueRtDEBUGtFalse(RR$Rtstdout((s4/sys/lib/python2.7/distutils/tests/test_ccompiler.pyttest_debug_print&s      cCsntƒdkrdSdtjd(t__doc__RR<ttest.test_supportRtdistutils.ccompilerRRRtdistutils.sysconfigRt distutilsRtdistutils.testsRtobjectRt EnvironGuardtTestCaseRR>Rtmain(((s4/sys/lib/python2.7/distutils/tests/test_ccompiler.pyts   5