��Qc@s�dZddlZddlZddlZddlZddlmZyddlZWnek
rodZnXddl
mZddlm
Z
ddlmZdZdejejejejfd ��YZd
�Zedkr�e��ndS(s'Tests for distutils.command.bdist_dumb.i�N(trun_unittest(tDistribution(t
bdist_dumb(tsupports�from distutils.core import setup
import foo
setup(name='foo', version='0.1', py_modules=['foo'],
url='xxx', author='xxx', author_email='xxx')
tBuildDumbTestCasecBs>eZd�Zd�Zejed�d��Zd�ZRS(cCs<tt|�j�tj�|_tjtjf|_dS(N( tsuperRtsetUptostgetcwdtold_locationtsystargvtold_sys_argv(tself((s5/sys/lib/python2.7/distutils/tests/test_bdist_dumb.pyR"scCsHtj|j�|jdt_|jdtj(tt|�j�dS(Nii( RtchdirR RR
RRRttearDown(R
((s5/sys/lib/python2.7/distutils/tests/test_bdist_dumb.pyR'ss
requires zlibc
Cs|j�}tjj|d�}tj|�|j|dft�|j|dfd�|j|dfd�|j|dfd�tidd 6d
d6dgd6d
d6d
d6d
d6�}d|_tj |�dgt
_t|�}d|_
|j�|j�tjtjj|d��}d|j�|jf}tjdkre|jdd�}n|j||g�tjtjjd|��}z|j�}Wd|j�Xtd�|D��}dt
jd dg} t
js�jd�n|j|t| ��dS(Ntfoossetup.pysfoo.pyt#sMANIFEST.insinclude foo.pytREADMEttnames0.1tversiont
py_modulestxxxturltauthortauthor_emailtziptdists %s.%s.ziptos2t:t-css!|]}tjj|�VqdS(N(Rtpathtbasename(t.0tfn((s5/sys/lib/python2.7/distutils/tests/test_bdist_dumb.pys <genexpr>Yssfoo-0.1-py%s.%s.egg-infoisfoo.pyc(tmkdtempRR tjointmkdirt
write_filetSETUP_PYRtscript_nameRR
RRtformattensure_finalizedtruntlistdirtget_fullnamet plat_nameRtreplacetassertEqualtzipfiletZipFiletnamelisttclosetsortedtversion_infotdont_write_bytecodetappend(
R
ttmp_dirtpkg_dirRtcmdtdist_createdtbasetfptcontentstwanted((s5/sys/lib/python2.7/distutils/tests/test_bdist_dumb.pyttest_simple_built-s@
cCs�|j�\}}tj|�t|�}|j|jd�|j�|jd�j }|j|jtj
j|d��|jtj
}|j|j|�dS(Ntbdisttdumb(tcreate_distRRRR1t bdist_dirtNonetfinalize_optionstget_finalized_commandt
bdist_baseR R%tdefault_formatRR*(R
R;RR<R>tdefault((s5/sys/lib/python2.7/distutils/tests/test_bdist_dumb.pyttest_finalize_options_s
"( t__name__t
__module__RRtunittestt
skipUnlesstzlibRBRM(((s5/sys/lib/python2.7/distutils/tests/test_bdist_dumb.pyRs 2cCs
tjt�S(N(RPt makeSuiteR(((s5/sys/lib/python2.7/distutils/tests/test_bdist_dumb.pyt
test_suitenst__main__(t__doc__RR
R2RPttest.test_supportRRRtImportErrorRGtdistutils.coreRtdistutils.command.bdist_dumbRtdistutils.testsRR(tTempdirManagertLoggingSilencertEnvironGuardtTestCaseRRTRN(((s5/sys/lib/python2.7/distutils/tests/test_bdist_dumb.pyt<module>s(
N
|