%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/227033/root/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/
Upload File :
Create Path :
Current File : //proc/227033/root/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pyo

�
5}�ac@sddlZddlZddlmZddlZddlmZmZddlmZddl	m
Z
ddlmZddl
mZmZmZddlZddlmZead	ejejejejfd
��YZd�Zedkreje��ndS(
i����N(tStringIO(t	ExtensiontDistribution(t	build_ext(t	sysconfig(tsupport(tDistutilsSetupErrortCompileErrortDistutilsPlatformError(ttest_supporttBuildExtTestCasecBs:eZd�Zd�Zd�Zd�Zejej	dkd�d��Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zejejdkd�d��Zejejdkd�d��Zejejdkd�d��Zejejdkd�d��Zd�ZRS(cCs�tt|�j�|j�|_t|_tjj	|j�|j
tjj|j�tjdkr�ddl
}|j|_|j�|_ddlm}|j|_ndS(Ns2.6i����(R(tsuperR
tsetUptmkdtempttmp_dirtFalset
xx_createdtsystpathtappendt
addCleanuptremovetversiontsitet	USER_BASEt
old_user_basetdistutils.commandR(tselfRR((sG/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pyRs	cCs0|jrtjd�ntt|�j�dS(Ntxx(RR	tunloadRR
ttearDown(R((sG/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pyR&s	c	Cs�tj|j�t|_tjj|jd�}td|g�}t	idd6|gd6�}|j|_
t|�}tj|�|j|_
|j|_tj}tjs�t�t_nz|j�|j�Wd|t_Xtr�|jdt�nt|�jaddl}x$dD]}|jt||��qW|j|jdd�d
�|j|jdd�d�|j|j�j �d�tj"r�d}|j|j#|�n|j$|j%�|j%�|j$|j&�|j&�dS(Ns
xxmodule.cRtnametext_modulessAlready tested in %si����terrortfootnewtrojiiii
iis/This is a template module just for instruction.(R!R"R#R$('Rtcopy_xxmodule_cRtTrueRtosRtjoinRRtpackage_dirRtfixup_build_extt	build_libt
build_tempRtstdoutR	tverboseRtensure_finalizedtruntALREADY_TESTEDtskipTestttypet__name__Rt
assertTruethasattrtassertEqualR"R#tdemotNonetHAVE_DOCSTRINGSt__doc__tassertIsInstancetNulltStr(	Rtxx_ctxx_exttdisttcmdt
old_stdoutRtattrtdoc((sG/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pyttest_build_ext-s>	
		


	cCs�tidd6�}t|�}tj}dt_ddlm}|jd�}d|d<z|j�Wd|t_|dkr�|d=n
||d<X|j	t
|j�d�dS(	NRRtsunosi����(t_config_varstPy_ENABLE_SHAREDii(RRRtplatformtdistutils.sysconfigRHtgetR/R9t
assertGreatertlentlibrary_dirs(RRARBtoldRHtold_var((sG/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pyttest_solaris_enable_sharedWs		
	
s2.6s$site.USER_SITE was introduced in 2.6c
Cs�ddl}tidd6�}t|�}g|jD]\}}}|^q5}|jd|�d|_tjj|j	d�}tjj|j	d�}	tj
|�tj
|	�|j�|j||j�|j||j
�|j|	|j�dS(Ni����RRtuseritlibtinclude(RRRtuser_optionstassertInRSR'RR(RtmkdirR/ROtrpathtinclude_dirs(
RRRARBRtshorttlabeltoptionsRTtincl((sG/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pyttest_user_sitels"	


cCshtddg�g}tidd6|d6�}t|�}|j�tj�}|j||j�tjdd�}|j||j�t|�}d|_|j�|j	|jd	d
dg�t|�}dt
j|_|j�|jd
|j�|jd|j�t|�}dt
j|_
|j�|j	|j
ddg�t|�}d|_|j�|j	|jdddg�t|�}d|_|j�|j	|jddg�t|�}d|_|j�|j	|jddg�t|�}d|_|j�|j	|jg�t|�}d|_|j�|j	|jddg�dS(NR"txxxRRR t
plat_specificismy_lib, other_lib lastlibtmy_libt	other_libtlastlibsmy_lib_dir%sother_lib_dirt
my_lib_dirt
other_lib_dirsone%stwotonettwos
one two,threetthreesone,twot1s1 2t2(RgRj(RhRj(RRRtfinalize_optionsRtget_python_incRWRZt	librariesR7R'tpathsepRORYtlink_objectstdefinetundefR9t	swig_opts(RtmodulesRARBt
py_includetplat_py_include((sG/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pyttest_finalize_options�sR
	


	
	
	
	
	
cCs�t�}t|�}|j�|jt|jd�ddg}|jt|j|�dg}|jt|j|�dg}|jt|j|�didgd6dd6dd6fg}|j|�|d	}|j|t�|j|j	d�|j
t|d��didgd6dd6dd6ddgd
6fg}|jt|j|�ddg|d	dd
<|j|�|j|d	jdg�|j|d	j
dg�dS(NR"tbarsfoo-bartsfoo.bartsourcesRntsomeiRjRkt3tmacrosi(RxR"Rx(sfoo-barRy(sfoo.barRy(RjRkR|(RjRk(R|(RjRk(RRRltassertRaisesRtcheck_extensions_listR<RR7RntassertFalseR6tundef_macrost
define_macros(RRARBtextstext((sG/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pyttest_check_extensions_list�s0	
		


cCsbtddg�g}tidd6|d6�}t|�}|j�|j|j�dg�dS(NR"R`RRR (RRRR/R7tget_source_files(RRtRARB((sG/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pyttest_get_source_files�s

cCsIt�}t|�}d|_|j�|j�|j|jd�dS(Ntunix(RRtcompilerR/R0R7(RRARB((sG/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pyttest_compiler_options		

c
Cs*|j�}tjj|d�}|j|d�td|g�}tidd6|gd6�}t|�}tj	|�|j
�|jt|j
��d�tjj|jd�|_tjj|jd	�|_tjj|j��}tj�}tj|�z'd|_|j�|j
�d
}Wdtj|�X|jtjj|��|jtjj|�dtjd��tjj|�}	|j|	|�d|_d
|_|j�|j
�d
}|jtjj|��|jtjj|�dtjd��tjj|�}	|j|	|j�|jd
�}
idd6|
_|j d�}tjj!|�d
}|j||j�d|_tjj|j��}tj�}tj|�z|j d�}Wdtj|�Xtjj!|�d
}tjj!|�d}|j|d�dS(Nsfoo.csvoid initfoo(void) {};
R"RRR itbuildttemptii����tSOtbuild_pyRxRy("R
R'RR(t
write_fileRRRRR*R/R7RNtget_outputsRR+R,trealpathtgetcwdtchdirtinplaceR0R5texiststsplitextRtget_config_vartdirnameR9R�tget_finalized_commandR)tget_ext_fullpathtsplit(
RRtc_fileR�RARBt
other_tmp_dirtold_wdtso_filetso_dirR�Rtlastdir((sG/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pyttest_get_outputssb



	
		
	
cCs�tj�d}t�}t|�}d|_idd6|j_ddg|j_tj	�}tj
j|ddd|�}|jd�}|j
||�d	|_tj
j|d
�|_tj
j|d
dd|�}|jd�}|j
||�|jd�}i|_dd
g|j_|jd
�}tj
j|d
ddd|�}|j
||�d|_|jd
�}tj
j|ddd|�}|j
||�dS(NR�itsrcRytlxmls	lxml.htmltetrees
lxml.etreeittmpdirR�ttwistedstwisted.runner.portmaptrunnertportmap(Rtget_config_varsRRR�tdistributionR)tpackagesR'R�RR(R�R7R+R�(RR�RARBtcurdirtwantedRR�((sG/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pyttest_ext_fullpathNs4				
	c	Cs�tjj|jd�}td|g�}tidd6|gd6�}t|�}|j�d|_idd6|j	_
dd	g|j	_tj�}t
jd
�}tjj|ddd|�}|jd�}|j||�dS(Nslxml.etree.cs
lxml.etreeR�RR iR�Rys	lxml.htmlR�R�(R'RR(RRRRR/R�R�R)R�R�RR�R�R7(	Rtetree_ct	etree_extRARBR�R�R�R((sG/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pyttest_build_ext_inplaceps
	c
Cszddl}ddl}ddl}|jj}ztjddt�ddlm	}ddl
m}tjj
|jd�}|d|g�}tidd	6|gd
6�}||�}|j�d|_idd
6|j_ddg|j_tj�}	tjd�}
tjj
|	ddd|
�}|jd�}|j||�Wd||j_||j_||jj	_XdS(Ni����tsetuptools_build_extt
deprecated(R(Rslxml.etree.cs
lxml.etreeR�RR iR�Rys	lxml.htmlR�R�(tdistutils.coretdistutils.extensiontdistutils.command.build_extt	extensionRR	t
import_moduleR&R�Rtsetuptools_extensionR'RR(RRR/R�R�R)R�R�RR�R�R7tcoretcommand(
Rt	distutilst	saved_extR�RR�R�RARBR�R�R�R((sG/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pyttest_setuptools_compats,$
	cCs�tidd6�}t|�}|j�tjd�}tjjdd�}|j|�}tjj|j	dd|�}|j
||�dS(Nt
UpdateManagerRR�tfdsend(RRR/RR�R'RR(R�R+R7(RRARBR�text_nametext_pathR�((sG/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pyttest_build_ext_path_with_os_sep�s
twin32sthese tests require WindowscCs�tidd6�}t|�}|j�tjd�}d}|j|�}tjj|j	dd|�}|j
||�dS(NR�RR�sUpdateManager/fdsendR�(RRR/RR�R�R'RR(R+R7(RRARBR�R�R�R�((sG/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pyt"test_build_ext_path_cross_platform�s
tdarwinstest only relevant for MacOSXcCs|jdd�dS(Ns==(t_try_compile_deployment_targetR9(R((sG/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pyttest_deployment_target_default�scCs|jt|jdd�dS(Nt>s10.1(R~RR�(R((sG/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pyttest_deployment_target_too_low�s	cCs}tjd�}|ryg|jd�D]}t|�^q%}|dcd7<djd�|D��}|jd|�ndS(NtMACOSX_DEPLOYMENT_TARGETt.i����icss|]}t|�VqdS(N(tstr(t.0ti((sG/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pys	<genexpr>�st<(RR�R�tintR(R�(Rt	deptargettx((sG/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pyt test_deployment_target_higher_ok�s(c	Cs�tj}|j�t_|jttd|�|dkr\tjjd�ritjd=qin
|tjd<tjj|j	d�}t
|d��!}|jtj
d|��WdQXtjd�}ttt|jd�dd!��}|d	d
krd|}n
d|}td
|gdd|fg�}tid
d6|gd6�}|j	|_t|�}|j	|_|j	|_y|j�|j�Wntk
r�|jd�nXdS(NtenvironR�sdeptargetmodule.ctws�                #include <AvailabilityMacros.h>

                int dummy;

                #if TARGET %s MAC_OS_X_VERSION_MIN_REQUIRED
                #else
                #error "Unexpected target"
                #endif

            R�iiii
s	%02d%01d0s
%02d%02d00R�textra_compile_argss-DTARGET=%sRR s*Wrong deployment target during compilation(R'R�tcopyRtsetattrR9RLRR(RtopentwritettextwraptdedentRR�ttupletmapR�R�RRR)RR+R,R/R0Rtfail(	Rtoperatorttargettorig_environtdeptarget_ctfpt
deptarget_extRARB((sG/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pyR��s@	

%

	

(R4t
__module__RRRFRRtunittesttskipIfRRR_RwR�R�R�R�R�R�R�R�t
skipUnlessRJR�R�R�R�R�(((sG/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pyR
s(	
		*		F	/			?	"			
$$$$
cCs
tjt�S(N(R�t	makeSuiteR
(((sG/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pyt
test_suitest__main__(RR'RR�R�RRR�RR�Rtdistutils.testsRtdistutils.errorsRRRR�ttestR	RR1tTempdirManagertLoggingSilencertEnvironGuardtTestCaseR
R�R4trun_unittest(((sG/opt/plesk/python/2.7/lib64/python2.7/distutils/tests/test_build_ext.pyt<module>s&	��	

Zerion Mini Shell 1.0