��Qc@s�dZddlZddlZddlZddlZddlmZddlmZddl m
Z
dejejfd��YZ
d�Zed kr�ejje��ndS(
sTests for distutils.sysconfig.i�N(t sysconfig(tsupport(tTESTFNtSysconfigTestCasecBsteZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z e
jej
d�d �d
��ZRS(cCs tt|�j�d|_dS(N(tsuperRtsetUptNonetmakefile(tself((s4/sys/lib/python2.7/distutils/tests/test_sysconfig.pyR
scCsC|jdk r"tj|j�n|j�tt|�j�dS(N(RRtostunlinktcleanup_testfnRRttearDown(R((s4/sys/lib/python2.7/distutils/tests/test_sysconfig.pyRs
cCsTtjj}tjj|�r.tj|�n"tjj|�rPtj |�ndS(N(
ttestttest_supportRR tpathtisfiletremovetisdirtshutiltrmtree(RR((s4/sys/lib/python2.7/distutils/tests/test_sysconfig.pyRs
cCsitj�}|jtj�tjdt��td�}tjtt�}|j|jd�|�dS(NtprefixRt
platstdlib(Rtget_python_libtassertNotEqualRt
__import__tTruetassertEqualtget_path(Rtlib_dirt
_sysconfigtres((s4/sys/lib/python2.7/distutils/tests/test_sysconfig.pyttest_get_python_libscCs]tj�}|jtjj|�|�tjj|d�}|jtjj|�|�dS(NsPython.h(Rtget_python_inct
assertTrueR RRtjoinR(Rtinc_dirtpython_h((s4/sys/lib/python2.7/distutils/tests/test_sysconfig.pyttest_get_python_inc)scCs�tjj|_t|jd�}z|jd�|jd�Wd|j�Xtj|j�}|j |idd6dd6�dS(Ntws)CONFIG_ARGS= '--arg1=optarg1' 'ENV=LIB'
sVAR=$OTHER
OTHER=foos'--arg1=optarg1' 'ENV=LIB'tCONFIG_ARGStfootOTHER(
R
RRRtopentwritetcloseRtparse_makefileR(Rtfdtd((s4/sys/lib/python2.7/distutils/tests/test_sysconfig.pyttest_parse_makefile_base2s
cCs�tjj|_t|jd�}z|jd�|jd�Wd|j�Xtj|j�}|j |idd6dd6�dS(NR's,CONFIG_ARGS= '--arg1=optarg1' 'ENV=\$$LIB'
sVAR=$OTHER
OTHER=foos'--arg1=optarg1' 'ENV=\$LIB'R(R)R*(
R
RRRR+R,R-RR.R(RR/R0((s4/sys/lib/python2.7/distutils/tests/test_sysconfig.pyt"test_parse_makefile_literal_dollar>s
cCsTddl}|j|jd�tjd��|j|jd�tjd��dS(Ni�tCFLAGStLDFLAGS(RRtget_config_var(Rtglobal_sysconfig((s4/sys/lib/python2.7/distutils/tests/test_sysconfig.pyttest_sysconfig_moduleKs"tCUSTOMIZED_OSX_COMPILERscompiler flags customizedcCsgddl}tjd�rdS|j|jd�tjd��|j|jd�tjd��dS(Ni�R8tLDSHAREDtCC(RR5R(RR6((s4/sys/lib/python2.7/distutils/tests/test_sysconfig.pyttest_sysconfig_compiler_varsPs
"(t__name__t
__module__RRRR R&R1R2R7tunittesttskipIfRR5R;(((s4/sys/lib/python2.7/distutils/tests/test_sysconfig.pyRs
cCs&tj�}|jtjt��|S(N(R>t TestSuitetaddTestt makeSuiteR(tsuite((s4/sys/lib/python2.7/distutils/tests/test_sysconfig.pyt
test_suitehst__main__(t__doc__R R
R>Rt distutilsRtdistutils.testsRttest.test_supportRtEnvironGuardtTestCaseRRDR<Rtrun_unittest(((s4/sys/lib/python2.7/distutils/tests/test_sysconfig.pyt<module>s \
|