AlkantarClanX12

Your IP : 18.118.19.123


Current Path : /opt/alt/python27/lib64/python2.7/distutils/
Upload File :
Current File : //opt/alt/python27/lib64/python2.7/distutils/bcppcompiler.pyo

�
^
bc@s�dZdZddlZddlmZmZmZmZmZddl	m
Z
mZddlm
Z
ddlmZddlmZd	e
fd
��YZdS(s�distutils.bcppcompiler

Contains BorlandCCompiler, an implementation of the abstract CCompiler class
for the Borland C++ compiler.
s$Id$i����N(tDistutilsExecErrortCompileErrortLibErrort	LinkErrortUnknownFileError(t	CCompilertgen_preprocess_options(t
write_file(tnewer(tlogtBCPPCompilercBs�eZdZdZiZdgZdddgZeeZdZdZ	dZ
d	ZZd
Z
dddd�Zdddddddd
�Zdddd�Zddddddddddd�
Zdd�Zddd�Zdddddd�ZRS(sConcrete class that implements an interface to the Borland C/C++
    compiler, as defined by the CCompiler abstract class.
    tbcpps.cs.ccs.cpps.cxxs.objs.libs.dlls%s%ss.exeicCs�tj||||�d|_d|_d|_d|_ddddg|_ddddg|_d	d
ddg|_	d	d
ddg|_
g|_d
ddg|_d
dddg|_
dS(
Ns	bcc32.exesilink32.exestlib.exes/tWMs/O2s/qs/g0s/Ods/Tpds/Gns/xs/r(Rt__init__tcctlinkertlibtNonetpreprocess_optionstcompile_optionstcompile_options_debugtldflags_sharedtldflags_shared_debugtldflags_statictldflags_exetldflags_exe_debug(tselftverbosetdry_runtforce((s;/opt/alt/python27/lib64/python2.7/distutils/bcppcompiler.pyR5s					c	Cs�|j||||||�\}}	}}
}|p6g}|jd�|r_|j|j�n|j|j�xi|	D]a}
y||
\}}Wntk
r�qvnXtjj|�}tjj|
�}
|j	tjj
|
��|dkr�qvn|dkrDy|jdd|
|g�Wqvtk
r=}t
|�qvXqvn||jkr\d}n||jkrtd}nd}d|
}y4|j|jg||
||g||g�Wqvtk
r�}t
|�qvXqvW|	S(	Ns-cs.ress.rctbrcc32s-fots-Ps-o(t_setup_compiletappendtextendRRtKeyErrortostpathtnormpathtmkpathtdirnametspawnRRt
_c_extensionst_cpp_extensionsR
(Rtsourcest
output_dirtmacrostinclude_dirstdebugt
extra_preargstextra_postargstdependstobjectstpp_optstbuildtcompile_optstobjtsrctexttmsgt	input_optt
output_opt((s;/opt/alt/python27/lib64/python2.7/distutils/bcppcompiler.pytcompileQsF



		
.c	Cs�|j||�\}}|j|d|�}|j||�r�|dg|}|rXny|j|jg|�Wq�tk
r�}t|�q�Xntjd|�dS(NR,s/usskipping %s (up-to-date)(	t_fix_object_argstlibrary_filenamet
_need_linkR(RRRR	R/(	RR3toutput_libnameR,R/ttarget_langtoutput_filenametlib_argsR:((s;/opt/alt/python27/lib64/python2.7/distutils/bcppcompiler.pytcreate_static_lib�sc Cs�|j||�\}}|j|||�\}}}|rUtjdt|��n|dk	rytjj||�}n|j	||�r�|t
jkr�d}|	r�|j}q�|j
}n#d}|	r�|j}n
|j}|dkr�d}n�tjj|�\}}tjj|�\}}tjj|d�}tjj|d|�}dg}x+|plgD]}|jd||f�qmW|jt||fd	|�ttjj|�}|g}g}x[|D]S}tjjtjj|��\}}|d
kr|j|�q�|j|�q�Wx+|D]#}|jdtjj|��q4W|jd�|j|�|jd
|g�|jd�xL|D]D}|j|||	�}|dkr�|j|�q�|j|�q�W|jd�|jd�|jd
|g�|jd
�|j|�|
r>|
|d*n|rT|j|�n|jtjj|��y|j|jg|�Wq�tk
r�}t|�q�Xntj d|�dS(Ns7I don't know what to do with 'runtime_library_dirs': %stc0w32tc0d32Ris%s.deftEXPORTSs  %s=_%ss
writing %ss.ress/L%ss/L.t,s,,timport32tcw32mtsskipping %s (up-to-date)(!R>t
_fix_lib_argsR	twarntstrRR#R$tjoinR@Rt
EXECUTABLERRRRtsplittsplitextR'R texecuteRtmapR%tnormcaseR!tfind_library_fileR&R(RRRR/( Rttarget_descR3RCR,t	librariestlibrary_dirstruntime_library_dirstexport_symbolsR/R0R1t
build_tempRBtstartup_objtld_argstdef_filetheadttailtmodnameR9ttemp_dirtcontentstsymtobjects2t	resourcestfiletbasetlRtlibfileR:((s;/opt/alt/python27/lib64/python2.7/distutils/bcppcompiler.pytlink�s|	



			
$
!









c	Cs�|r-|d}|d|d||f}n|d|f}xW|D]K}xB|D]:}tjj||j|��}tjj|�rQ|SqQWqDWdSdS(Nt_dt_bcpp(R#R$ROR?texistsR(	RtdirsRR/tdlibt	try_namestdirtnameRk((s;/opt/alt/python27/lib64/python2.7/distutils/bcppcompiler.pyRV4s



RcCs|dkrd}ng}x�|D]�}tjjtjj|��\}}||jddgkr{td||f�n|r�tjj|�}n|dkr�|jtjj	|||��q"|dkr�|jtjj	||d��q"|jtjj	|||j
��q"W|S(NRs.rcs.ress"unknown file type '%s' (from '%s')(RR#R$RRRUtsrc_extensionsRtbasenameR ROt
obj_extension(Rtsource_filenamest	strip_dirR,t	obj_namestsrc_nameRiR9((s;/opt/alt/python27/lib64/python2.7/distutils/bcppcompiler.pytobject_filenamesNs$	
$##cCs|jd||�\}}}t||�}dg|}	|dk	rZ|	jd|�n|rm||	d*n|r�|	j|�n|	j|�|js�|dks�t||�r|r�|jtj	j
|��ny|j|	�Wqtk
r
}
|
GHt
|
�qXndS(Ns	cpp32.exes-oi(t_fix_compile_argsRRR R!RRR&R#R$R'R(RR(Rtsourcetoutput_fileR-R.R0R1t_R4tpp_argsR:((s;/opt/alt/python27/lib64/python2.7/distutils/bcppcompiler.pyt
preprocessjs$	


$N(t__name__t
__module__t__doc__t
compiler_typetexecutablesR)R*RuRwtstatic_lib_extensiontshared_lib_extensiontstatic_lib_formattshared_lib_formatt
exe_extensionRRR=RERlRVR|R�(((s;/opt/alt/python27/lib64/python2.7/distutils/bcppcompiler.pyR
sJ	

B|(R�t__revision__R#tdistutils.errorsRRRRRtdistutils.ccompilerRRtdistutils.file_utilRtdistutils.dep_utilRt	distutilsR	R
(((s;/opt/alt/python27/lib64/python2.7/distutils/bcppcompiler.pyt<module>s	(