��Qc@s�dZddlZddlZddlmZddlmZddlZddlm Z ddl
mZde je j
ejfd��YZd �Zed
kr�ee��ndS(s*Tests for distutils.command.build_scripts.i�N(t
build_scripts(tDistribution(tsupport(trun_unittesttBuildScriptsTestCasecBs>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(cCsj|jdg�}|j|j�|j|jdk�|j�|j|j�|j|jd�dS(Ns/foo/bar(tget_build_scripts_cmdt
assertTruetforcet build_dirtNonetfinalize_optionstassertEqual(tselftcmd((s8/sys/lib/python2.7/distutils/tests/test_build_scripts.pyttest_default_settingss
cCs�|j�}|j�}|j|�}|j|g|D]}tjj||�^q7�}|j�|j�tj|�}x!|D]}|j ||k�q�WdS(N(
tmkdtemptwrite_sample_scriptsRtostpathtjoinR
truntlistdirR(RtsourcettargettexpectedtfnR
tbuilttname((s8/sys/lib/python2.7/distutils/tests/test_build_scripts.pyt
test_builds (
cCsPddl}t�}||_tjd|ddd|j�|jd<t|�S(Ni�RRit
executabletbuild(tsysRtscriptsRtDummyCommandRtcommand_objR(RRR Rtdist((s8/sys/lib/python2.7/distutils/tests/test_build_scripts.pyR+s cCsjg}|jd�|j|dd�|jd�|j|dd�|jd�|j|dd�|S(Ns
script1.pys@#! /usr/bin/env python2.3
# bogus script w/ Python sh-bang
pass
s
script2.pys8#!/usr/bin/python
# bogus script w/ Python sh-bang
pass
sshell.shs1#!/bin/sh
# bogus shell script w/ sh-bang
exit 0
(tappendtwrite_script(RtdirR((s8/sys/lib/python2.7/distutils/tests/test_build_scripts.pyR6s
cCsAttjj||�d�}z|j|�Wd|j�XdS(Ntw(topenRRRtwritetclose(RR&Rttexttf((s8/sys/lib/python2.7/distutils/tests/test_build_scripts.pyR%Isc Cs�|j�}|j�}|j|�}|j|g|D]}tjj||�^q7�}|j�tj�j d�}dtj
d<z|j�Wd|dk r�|tj
d<nXtj
|�}x!|D]}|j||k�q�WdS(NtVERSIONi(RRRRRRR
t sysconfigtget_config_varstgett_CONFIG_VARSRR RR( RRRRRR
toldRR((s8/sys/lib/python2.7/distutils/tests/test_build_scripts.pyttest_version_intPs (
(t__name__t
__module__RRRRR%R3(((s8/sys/lib/python2.7/distutils/tests/test_build_scripts.pyRs
cCs
tjt�S(N(tunittestt makeSuiteR(((s8/sys/lib/python2.7/distutils/tests/test_build_scripts.pyt
test_suitelst__main__(t__doc__RR6tdistutils.command.build_scriptsRtdistutils.coreRR.tdistutils.testsRttest.test_supportRtTempdirManagertLoggingSilencertTestCaseRR8R4(((s8/sys/lib/python2.7/distutils/tests/test_build_scripts.pyt<module>s \
|