Your IP : 3.144.40.90


Current Path : /opt/alt/python33/lib64/python3.3/distutils/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/distutils/__pycache__/emxccompiler.cpython-33.pyo

�
��f].c@s�dZddlZddlZddlZddlmZmZddlmZddl	m
Z
ddlmZm
Z
mZddlmZGdd	�d	e�Zd
ZdZdZd
d�Zdd�ZdS(u�distutils.emxccompiler

Provides the EMXCCompiler class, a subclass of UnixCCompiler that
handles the EMX port of the GNU C compiler to OS/2.
iN(ugen_preprocess_optionsugen_lib_options(u
UnixCCompiler(u
write_file(uDistutilsExecErroruCompileErroruUnknownFileError(ulogcBs�|EeZdZdZdZdZdZdZdZdZ	dZ
dddd	d
�Zdd�Zddddddddddd
d�
Zdddd�Zddd�ZdS(uEMXCCompileruemxu.obju.libu.dllu%s%su.resu.exeic	Cs�tj||||�t�\}}|jd||f�|tk	rd|jdd|d�nt�\|_|_|j|j	d|j|jf�|j
ddddd	d
dd�d
g|_dS(Nu%Python's GCC status: %s (details: %s)u<Python's pyconfig.h doesn't seem to support your compiler.  uReason: %s.u<Compiling may fail because of undefined preprocessor macros.u: gcc %s, ld %s
ucompileru5gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wallucompiler_sou
linker_exeugcc -Zomf -Zmt -Zcrtdllu	linker_sougcc -Zomf -Zmt -Zcrtdll -Zdllugcc(u
UnixCCompileru__init__ucheck_config_hudebug_printuCONFIG_H_OKuwarnuget_versionsugcc_versionu
ld_versionu
compiler_typeuset_executablesu
dll_libraries(uselfuverboseudry_runuforceustatusudetails((u;/opt/alt/python33/lib64/python3.3/distutils/emxccompiler.pyu__init__(s"	uEMXCCompiler.__init__cCs�|dkr]y|jdd|g�Wq�tk
rY}zt|��WYdd}~Xq�Xn]y)|j|j||d|g|�Wn1tk
r�}zt|��WYdd}~XnXdS(Nu.rcurcu-ru-o(uspawnuDistutilsExecErroruCompileErrorucompiler_so(uselfuobjusrcuextucc_argsuextra_postargsupp_optsumsg((u;/opt/alt/python33/lib64/python3.3/distutils/emxccompiler.pyu_compileKs"uEMXCCompiler._compilecCs�tj|
pg�}
tj|p$g�}tj|p9g�}|j|j�|dk	r;||jkr;tjj|d�}tjjtjj	|��\}}tjj
||d�}dtjjtjj	|��dddg}x|D]}|jd|�q�W|jt
||fd|�|j|�n|	sQ|
jd�ntj||||||||d|	|
|||
�dS(	Niu.defu$LIBRARY %s INITINSTANCE TERMINSTANCEuDATA MULTIPLE NONSHAREDuEXPORTSu  "%s"u
writing %su-s(ucopyuextendu
dll_librariesuNoneu
EXECUTABLEuosupathudirnameusplitextubasenameujoinuappenduexecuteu
write_fileu
UnixCCompilerulink(uselfutarget_descuobjectsuoutput_filenameu
output_diru	librariesulibrary_dirsuruntime_library_dirsuexport_symbolsudebugu
extra_preargsuextra_postargsu
build_temputarget_langutemp_dirudll_nameu
dll_extensionudef_fileucontentsusym((u;/opt/alt/python33/lib64/python3.3/distutils/emxccompiler.pyulinkYsF		 	
	uEMXCCompiler.linkucCs�|dkrd}ng}x�|D]�}tjjtjj|��\}}||jdgkr{td||f��n|r�tjj|�}n|dkr�|jtjj	|||j
��q"|jtjj	|||j��q"W|S(Nuu.rcu"unknown file type '%s' (from '%s')(uNoneuosupathusplitextunormcaseusrc_extensionsuUnknownFileErrorubasenameuappendujoinu
res_extensionu
obj_extension(uselfusource_filenamesu	strip_diru
output_diru	obj_namesusrc_nameubaseuext((u;/opt/alt/python33/lib64/python3.3/distutils/emxccompiler.pyuobject_filenames�s 	
$uEMXCCompiler.object_filenamesc
Cs�d|}d|}ytjdjd�}Wntk
rHg}YnXxh||D]\}tjj||�}tjj||�}	tjj|�r�|Stjj|	�rT|	SqTWdS(Nu%s.libu	lib%s.libuLIBRARY_PATHu;(uosuenvironusplituKeyErrorupathujoinuexistsuNone(
uselfudirsulibudebugushortlibulonglibuemx_dirsudiru	shortlibpulonglibp((u;/opt/alt/python33/lib64/python3.3/distutils/emxccompiler.pyufind_library_file�s


uEMXCCompiler.find_library_fileN(u__name__u
__module__u__qualname__u
compiler_typeu
obj_extensionustatic_lib_extensionushared_lib_extensionustatic_lib_formatushared_lib_formatu
res_extensionu
exe_extensionu__init__u_compileuNoneulinkuobject_filenamesufind_library_file(u
__locals__((u;/opt/alt/python33/lib64/python3.3/distutils/emxccompiler.pyuEMXCCompilers2 PuEMXCCompileruokunot oku	uncertaincCs�ddlm}tjjd�dkr2tdfS|j�}y.t|�}z|j�}Wd|j	�XWn<t
k
r�}ztd||jffSWYdd}~Xn2X|jd�dkr�td|fSt
d	|fSdS(
u�Check if the current Python installation (specifically, pyconfig.h)
    appears amenable to building extensions with GCC.  Returns a tuple
    (status, details), where 'status' is one of the following constants:
      CONFIG_H_OK
        all is well, go ahead and compile
      CONFIG_H_NOTOK
        doesn't look good
      CONFIG_H_UNCERTAIN
        not sure -- unable to read pyconfig.h
    'details' is a human-readable string explaining the situation.

    Note there are two ways to conclude "OK": either 'sys.version' contains
    the string "GCC" (implying that this Python was built with GCC), or the
    installed "pyconfig.h" contains the string "__GNUC__".
    i(u	sysconfiguGCCusys.version mentions 'GCC'Nucouldn't read '%s': %su__GNUC__u'%s' mentions '__GNUC__'u '%s' does not mention '__GNUC__'(u	distutilsu	sysconfigusysuversionufinduCONFIG_H_OKuget_config_h_filenameuopenureaducloseuIOErroruCONFIG_H_UNCERTAINustrerroruCONFIG_H_NOTOK(u	sysconfigufnufusuexc((u;/opt/alt/python33/lib64/python3.3/distutils/emxccompiler.pyucheck_config_h�s
'ucheck_config_hc	Cs�ddlm}ddlm}ddl}|d�}|r�tj|dd�}z|j�}Wd|j�X|j	d||j
�}|r�||jd	��}q�d}nd}d}||fS(
ua Try to find out the versions of gcc and ld.
        If not possible it returns None for it.
    i(u
StrictVersion(ufind_executableNugccu
 -dumpversionuru(\d+\.\d+\.\d+)i(
udistutils.versionu
StrictVersionudistutils.spawnufind_executableureuosupopenureaducloseusearchuASCIIugroupuNone(	u
StrictVersionufind_executableureugcc_exeuoutu
out_stringuresultugcc_versionu
ld_version((u;/opt/alt/python33/lib64/python3.3/distutils/emxccompiler.pyuget_versions"s 	uget_versions(u__doc__uosusysucopyudistutils.ccompilerugen_preprocess_optionsugen_lib_optionsudistutils.unixccompileru
UnixCCompilerudistutils.file_utilu
write_fileudistutils.errorsuDistutilsExecErroruCompileErroruUnknownFileErroru	distutilsuloguEMXCCompileruCONFIG_H_OKuCONFIG_H_NOTOKuCONFIG_H_UNCERTAINucheck_config_huget_versions(((u;/opt/alt/python33/lib64/python3.3/distutils/emxccompiler.pyu<module>s$�3

?>