��Qc@s�dZddlZddlZddlZddlmZddlmZddlm Z ddl
mZddlm
Z
de je je jejfd ��YZd
�Zedkr�e
e��ndS(s)Tests for distutils.command.install_data.i�N(tinstall_lib(t Extension(tsupport(tDistutilsOptionError(trun_unittesttInstallLibTestCasecBsSeZd�Zd�Zejejd�d��Zd�Z d�Z
d�ZRS(cCs�|j�\}}t|�}|j�|j|jd�|j|jd�d|_|jt|j�d|_|jt|j�d|_|j�|j|jd�dS(Niitfoot4t2i(tcreate_distRtfinalize_optionstassertEqualtcompiletoptimizetassertRaisesR(tselftpkg_dirtdisttcmd((s6/sys/lib/python2.7/distutils/tests/test_install_lib.pyttest_finalize_optionss
cCsg|j�\}}t|�}d|_|_tjj|d�}|j|d�|j|g�|S(Nisfoo.pys
# python file( R RRR
tostpathtjoint
write_filetbyte_compile(RRRRtf((s6/sys/lib/python2.7/distutils/tests/test_install_lib.pyt_setup_byte_compile#ssbyte-compile not enabledcCsu|j�}tjjdkrI|jtjjtjj|d���n(|jtjjtjj|d���dS(Nisfoo.pycsfoo.pyo( RtsystflagsR
t
assertTrueRRtexistsR(RR((s6/sys/lib/python2.7/distutils/tests/test_install_lib.pyttest_byte_compile-s+cCs�|j�\}}t|�}d|_|_||_tjj|d�}|j|d�|g|j _
tddg�g|j _|g|j _
d|j _|jt|j��dk�dS(Nisfoo.pys
# python fileRtxxxssetup.pyi(R RRR
tinstall_dirRRRRtdistributiont
py_modulesRtext_modulestpackagestscript_nameRtlentget_outputs(RRRRR((s6/sys/lib/python2.7/distutils/tests/test_install_lib.pyttest_get_outputs5s cCs�|j�\}}t|�}d|_|_||_tjj|d�}|j|d�|g|j _
tddg�g|j _|g|j _
d|j _|jt|j��d�dS(Nisfoo.pys
# python fileRR ssetup.pyi(R RRR
R!RRRRR"R#RR$R%R&RR't
get_inputs(RRRRR((s6/sys/lib/python2.7/distutils/tests/test_install_lib.pyttest_get_inputsFs cCs�|j�\}}t|�}d|_d|_tj}tt_z|jg�Wd|t_X|jd|j ddk�dS(Nisbyte-compiling is disabledi(
R RRR
Rtdont_write_bytecodetTrueRRtlogs(RRRRtold_dont_write_bytecode((s6/sys/lib/python2.7/distutils/tests/test_install_lib.pyttest_dont_write_bytecodeWs
(t__name__t
__module__RRtunittesttskipIfRR,RR)R+R0(((s6/sys/lib/python2.7/distutils/tests/test_install_lib.pyRs
cCs
tjt�S(N(R3t makeSuiteR(((s6/sys/lib/python2.7/distutils/tests/test_install_lib.pyt
test_suitegst__main__(t__doc__RRR3tdistutils.command.install_libRtdistutils.extensionRtdistutils.testsRtdistutils.errorsRttest.test_supportRtTempdirManagertLoggingSilencertEnvironGuardtTestCaseRR6R1(((s6/sys/lib/python2.7/distutils/tests/test_install_lib.pyt<module>s X
|