ó |G_Tc@s¢dZddlZddlZddlZddlmZmZddlmZddl m Z dej fd„ƒYZ d„Z ed kržee ƒƒndS( s"Tests for distutils.unixccompiler.iÿÿÿÿN(tEnvironmentVarGuardt run_unittest(t sysconfig(t UnixCCompilertUnixCCompilerTestCasecBs†eZd„Zd„Zejejdkdƒd„ƒZej ejdkdƒd„ƒZ ej ejdkdƒd„ƒZ RS( cCs>tj|_tj|_dtfd„ƒY}|ƒ|_dS(NtCompilerWrappercBseZd„ZRS(cSs |jdƒS(Ns/foo(truntime_library_dir_option(tself((s>/usr/local/lib/python2.7/distutils/tests/test_unixccompiler.pyt rpath_foos(t__name__t __module__R(((s>/usr/local/lib/python2.7/distutils/tests/test_unixccompiler.pyRs(tsystplatformt_backup_platformRtget_config_vart_backup_get_config_varRtcc(RR((s>/usr/local/lib/python2.7/distutils/tests/test_unixccompiler.pytsetUp s  cCs|jt_|jt_dS(N(R R R RRR(R((s>/usr/local/lib/python2.7/distutils/tests/test_unixccompiler.pyttearDowns twin32scan't test on WindowscCs\dt_|j|jjƒdƒdt_tj}d„}|t_|j|jjƒddgƒd„}|t_|j|jjƒddgƒd„}|t_|j|jjƒddgƒ|t_d t_|j|jjƒd d gƒd t_|j|jjƒd d gƒd t_d„}|t_|j|jjƒdƒd t_d„}|t_|j|jjƒdƒd t_d„}|t_|j|jjƒdƒd t_d„}|t_|j|jjƒdƒd t_d„}|t_|j|jjƒdƒdt_d„}|t_|j|jjƒdƒdS(Ntdarwins-L/fooshp-uxcSsdS(Ntxxx((tv((s>/usr/local/lib/python2.7/distutils/tests/test_unixccompiler.pytgcv&ss+scSsdS(Ntgcc((R((s>/usr/local/lib/python2.7/distutils/tests/test_unixccompiler.pyR+ss-Wl,+scSsdS(Nsg++((R((s>/usr/local/lib/python2.7/distutils/tests/test_unixccompiler.pyR0stirix646s-rpaths/footosf1V5tbarcSs$|dkrdS|dkr dSdS(NtCCRtGNULDtyes((R((s>/usr/local/lib/python2.7/distutils/tests/test_unixccompiler.pyRAs  s -Wl,-R/foocSs$|dkrdS|dkr dSdS(NRRRtno((R((s>/usr/local/lib/python2.7/distutils/tests/test_unixccompiler.pyRKs  cSs$|dkrdS|dkr dSdS(NRsx86_64-pc-linux-gnu-gcc-4.4.2RR((R((s>/usr/local/lib/python2.7/distutils/tests/test_unixccompiler.pyRVs  cSs$|dkrdS|dkr dSdS(NRRRR((R((s>/usr/local/lib/python2.7/distutils/tests/test_unixccompiler.pyRas  s-R/foocSs$|dkrdS|dkr dSdS(NRRRR((R((s>/usr/local/lib/python2.7/distutils/tests/test_unixccompiler.pyRks  taixcSsdS(NR((R((s>/usr/local/lib/python2.7/distutils/tests/test_unixccompiler.pyRus(R R t assertEqualRRRR(Rtold_gcvR((s>/usr/local/lib/python2.7/distutils/tests/test_unixccompiler.pyttest_runtime_libdir_optionsT                              Rstest only relevant for OS XcCscd„}|t_tƒ(}d|d<|d=tj|jƒWdQX|j|jjddƒdS(NcSs|dkrdSdS(NtLDSHAREDs*gcc-4.2 -bundle -undefined dynamic_lookup sgcc-4.2((R((s>/usr/local/lib/python2.7/distutils/tests/test_unixccompiler.pyR~s tmy_ccRR$i(RRRtcustomize_compilerRR!t linker_so(RRtenv((s>/usr/local/lib/python2.7/distutils/tests/test_unixccompiler.pyttest_osx_cc_overrides_ldsharedzs    cCsfd„}|t_tƒ+}d|d/usr/local/lib/python2.7/distutils/tests/test_unixccompiler.pyRŽs R%Rsmy_ld -bundle -dynamicR$itmy_ld(RRRR&RR!R'(RRR(((s>/usr/local/lib/python2.7/distutils/tests/test_unixccompiler.pyttest_osx_explict_ldshared‰s     ( R R RRtunittesttskipIfR R R#t skipUnlessR)R+(((s>/usr/local/lib/python2.7/distutils/tests/test_unixccompiler.pyR s   $b$cCs tjtƒS(N(R,t makeSuiteR(((s>/usr/local/lib/python2.7/distutils/tests/test_unixccompiler.pyt test_suitešst__main__(t__doc__tosR R,ttest.test_supportRRt distutilsRtdistutils.unixccompilerRtTestCaseRR0R (((s>/usr/local/lib/python2.7/distutils/tests/test_unixccompiler.pyts