��Qc@s�dZddlZddlZddlZddlZddlmZddlmZddl m
Z
ddlmZddl
mZdejejejfd ��YZd
�Zedkr�ee��ndS(s%Tests for distutils.command.build_py.i�N(tbuild_py(tDistribution(tDistutilsFileError(tsupport(trun_unittesttBuildPyTestCasecBs#eZd�Zd�Zd�ZRS(cCs�|j�}ttjj|d�d�}z|jd�Wd|j�Xttjj|d�d�}z|jd�Wd|j�X|j�}tidgd6i|d6d6�}tjj|d �|_t j
d
dd|�|jd
<dg|_idgd6|_
i|d6|_t|�}d|_|j�|j|j
|j
�|j�|jt|j��d�tjj|d�}tj|�}|jd|�|jd|�tjr�|jd|�n|jd|�dS(Ns__init__.pytws# Pretend this is a package.s
README.txtsInfo about this packagetpkgtpackagestpackage_dirssetup.pytforceit build_libtbuildiis__init__.pyc(tmkdtemptopentostpathtjointwritetcloseRtscript_nameRtDummyCommandtcommand_objRtpackage_dataR Rtcompiletensure_finalizedtassertEqualtruntlentget_outputstlistdirtassertIntsystdont_write_bytecodetassertNotIn(tselftsourcestftdestinationtdisttcmdtpkgdesttfiles((s3/sys/lib/python2.7/distutils/tests/test_build_py.pyttest_package_datas@
cCsWtj�}|j�}ttjj|d�d�j�tjj|d�}tj|�ttjj|d�d�j�tj|�t j
}tj�t _
z�tidgd6idd6d6id gd6d
6�}tjj|d�|_
dg|_|j�y|j�Wntk
r7|jd
�nXWdtj|�|t _
XdS(Ns__init__.pyRtdocttestfileRRtR sdoc/*Rssetup.pyRs/failed package_data test when package_dir is ''(RtgetcwdR
RRRRtmkdirtchdirR tstdouttStringIORRtscript_argstparse_command_linetrun_commandsRtfail(R#tcwdR$ttestdirt
old_stdoutR'((s3/sys/lib/python2.7/distutils/tests/test_build_py.pyttest_empty_package_dirDs,"
"
cCs|j�\}}t|�}d|_d|_tj}tt_z|jg�Wd|t_X|jd|j dd�dS(Nisbyte-compiling is disabledi(
tcreate_distRRtoptimizeR R!tTruetbyte_compileRtlogs(R#tpkg_dirR'R(told_dont_write_bytecode((s3/sys/lib/python2.7/distutils/tests/test_build_py.pyttest_dont_write_bytecodefs
(t__name__t
__module__R+R;RC(((s3/sys/lib/python2.7/distutils/tests/test_build_py.pyRs 0 "cCs
tjt�S(N(tunittestt makeSuiteR(((s3/sys/lib/python2.7/distutils/tests/test_build_py.pyt
test_suitevst__main__(t__doc__RR R3RFtdistutils.command.build_pyRtdistutils.coreRtdistutils.errorsRtdistutils.testsRttest.test_supportRtTempdirManagertLoggingSilencertTestCaseRRHRD(((s3/sys/lib/python2.7/distutils/tests/test_build_py.pyt<module>s d
|