��Qc@sdZddlZddlZddlZddlZddlZddlmZddlm Z ddl
mZddlm
Z
ddlmZddlmZdd lmZd
Zde
je
jejfd��YZd
�Zedkree��ndS(s&Tests for distutils.command.bdist_rpm.i�N(trun_unittest(tDistribution(t bdist_rpm(tsupport(tfind_executable(tspawn(tDistutilsExecErrors�from distutils.core import setup
import foo
setup(name='foo', version='0.1', py_modules=['foo'],
url='xxx', author='xxx', author_email='xxx')
tBuildRpmTestCasecBs,eZd�Zd�Zd�Zd�ZRS(cCs<tt|�j�tj�|_tjtjf|_dS(N( tsuperRtsetUptostgetcwdtold_locationtsystargvtold_sys_argv(tself((s4/sys/lib/python2.7/distutils/tests/test_bdist_rpm.pyR scCsHtj|j�|jdt_|jdtj(tt|�j�dS(Nii( R
tchdirRRR
RRRttearDown(R((s4/sys/lib/python2.7/distutils/tests/test_bdist_rpm.pyR$scCs�tjdkrdStd�dks7td�dkr;dS|j�}tjj|d�}tj|�|j |dft
�|j |dfd�|j |dfd �|j |d
fd�tidd6d
d6dgd6dd6dd6dd6�}d|_tj
|�dgt_t|�}t|_d|_|j�|j�tjtjj|d��}|jd|k�|jd|j�|jd|j�dS(Ntlinux2trpmtrpmbuildtfoossetup.pysfoo.pyt#sMANIFEST.insinclude foo.pytREADMEttnames0.1tversiont
py_modulestxxxturltauthortauthor_emailitdistsfoo-0.1-1.noarch.rpmRtanysdist/foo-0.1-1.src.rpmsdist/foo-0.1-1.noarch.rpm(s bdist_rpmsanysdist/foo-0.1-1.src.rpm(s bdist_rpmsanysdist/foo-0.1-1.noarch.rpm(R
tplatformRtNonetmkdtempR
tpathtjointmkdirt
write_filetSETUP_PYRtscript_nameRRRtTruet
fix_pythontquiettensure_finalizedtruntlistdirt
assertTruetassertInt
dist_files(Rttmp_dirtpkg_dirR!tcmdtdist_created((s4/sys/lib/python2.7/distutils/tests/test_bdist_rpm.pyt
test_quiet*s8
cCs�tjdkrdStd�dks7td�dkr;dS|j�}tjj|d�}tj|�|j |dft
�|j |dfd�|j |dfd �|j |d
fd�tidd6d
d6dgd6dd6dd6dd6�}d|_tj
|�dgt_t|�}t|_d|_|j�|j�tjtjj|d��}|jd|k�|jd|j�|jd|j�tjtjj|dd��dS(NRRRRssetup.pysfoo.pyRsMANIFEST.insinclude foo.pyRRRs0.1RRRRRR iR!sfoo-0.1-1.noarch.rpmRR"sdist/foo-0.1-1.src.rpmsdist/foo-0.1-1.noarch.rpm(s bdist_rpmsanysdist/foo-0.1-1.src.rpm(s bdist_rpmsanysdist/foo-0.1-1.noarch.rpm(R
R#RR$R%R
R&R'R(R)R*RR+RRRR,R-R.R/R0R1R2R3R4tremove(RR5R6R!R7R8((s4/sys/lib/python2.7/distutils/tests/test_bdist_rpm.pyttest_no_optimize_flagVs:
(t__name__t
__module__R RR9R;(((s4/sys/lib/python2.7/distutils/tests/test_bdist_rpm.pyRs ,cCs
tjt�S(N(tunittestt makeSuiteR(((s4/sys/lib/python2.7/distutils/tests/test_bdist_rpm.pyt
test_suite�st__main__(t__doc__R>R
R
ttempfiletshutilttest.test_supportRtdistutils.coreRtdistutils.command.bdist_rpmRtdistutils.testsRtdistutils.spawnRt distutilsRtdistutils.errorsRR*tTempdirManagertLoggingSilencertTestCaseRR@R<(((s4/sys/lib/python2.7/distutils/tests/test_bdist_rpm.pyt<module>s& g
|