ok

Mini Shell

Direktori : /opt/alt/python36/lib64/python3.6/distutils/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/distutils/__pycache__/cygwinccompiler.cpython-36.opt-2.pyc

3

��2a[@�@s�ddlZddlZddlZddlmZmZmZddlZddlm	Z	m
Z
ddlmZddl
mZddlmZmZmZmZddlmZddlmZdd	lmZd
d�ZGdd
�d
e�ZGdd�de�ZdZdZdZdd�Z ej!d�Z"dd�Z#dd�Z$dd�Z%dS)�N)�Popen�PIPE�check_output)�gen_preprocess_options�gen_lib_options)�
UnixCCompiler)�
write_file)�DistutilsExecError�CCompilerError�CompileError�UnknownFileError)�log)�LooseVersion)�find_executablecCs�tjjd�}|dkr|tj|d|d�}|dkr8dgS|dkrFdgS|d	krTd
gS|dkrbdgS|d
krpdgStd|��dS)NzMSC v.���
Z1300Zmsvcr70Z1310Zmsvcr71Z1400Zmsvcr80Z1500Zmsvcr90Z1600Zmsvcr100zUnknown MS Compiler version %s ���)�sys�version�find�
ValueError)Zmsc_posZmsc_ver�r�4/opt/alt/python36/lib64/python3.6/cygwinccompiler.py�	get_msvcr?src
@sNeZdZdZdZdZdZdZdZdZ	dd	d
�Z
dd�Zddd�Zddd�Z
d
S)�CygwinCCompiler�cygwinz.oz.az.dllzlib%s%sz%s%sz.exercCs�tj||||�t�\}}|jd||f�|tk	rB|jd|�t�\|_|_|_	|j|j
d|j|j|j	f�|jdkr�d|_nd|_|jdkr�d}nd	}|jd
ddd
d|j|fd�|jdkr�dg|_
|jd�nt�|_
dS)Nz%Python's GCC status: %s (details: %s)z�Python's pyconfig.h doesn't seem to support your compiler. Reason: %s. Compiling may fail because of undefined preprocessor macros.z: gcc %s, ld %s, dllwrap %s
z2.10.90�gcc�dllwrapz2.13z-sharedz
-mdll -staticzgcc -mcygwin -O -Wallzgcc -mcygwin -mdll -O -Wallzg++ -mcygwin -O -Wallzgcc -mcygwinz%s -mcygwin %s)�compiler�compiler_so�compiler_cxx�
linker_exe�	linker_soz2.91.57Zmsvcrtz,Consider upgrading to a newer version of gcc)r�__init__�check_config_hZdebug_print�CONFIG_H_OK�warn�get_versions�gcc_version�
ld_versionZdllwrap_version�
compiler_type�
linker_dll�set_executables�
dll_librariesr)�self�verbose�dry_run�force�statusZdetails�
shared_optionrrrr$ds<




zCygwinCCompiler.__init__cCs�|dks|dkrVy|jdd|d|g�Wq�tk
rR}zt|��WYdd}~Xq�XnNy"|j|j||d|g|�Wn*tk
r�}zt|��WYdd}~XnXdS)Nz.rcz.resZwindresz-iz-o)Zspawnr	rr )r/�obj�src�extZcc_args�extra_postargsZpp_opts�msgrrr�_compile�szCygwinCCompiler._compileNcCsRtj|
p
g�}
tj|pg�}tj|p&g�}|j|j�|dk	oP||jksT|jdk�rtjj|d�}tjjtjj	|��\}}tjj
||d�}tjj
|d|d�}dtjj	|�dg}x|D]}|j|�q�W|jt
||fd|�|jd	k�r|
jd
|g�|
jd|g�n
|j|�|	�s*|
jd�tj||||||||d|	|
|||
�dS)
Nrrz.def�libz.az
LIBRARY %sZEXPORTSz
writing %srz--output-libz--defz-s)�copy�extendr.Z
EXECUTABLEr,�os�path�dirname�splitext�basename�join�appendZexecuterr�link)r/Ztarget_descZobjectsZoutput_filename�
output_dirZ	librariesZlibrary_dirsZruntime_library_dirsZexport_symbols�debugZ
extra_preargsr8Z
build_tempZtarget_langZtemp_dirZdll_nameZ
dll_extensionZdef_fileZlib_file�contentsZsymrrrrE�s:	



zCygwinCCompiler.link�cCs�|dkrd}g}x�|D]�}tjjtjj|��\}}||jddgkrTtd||f��|rdtjj|�}|dkr�|jtjj||||j	��q|jtjj|||j	��qW|S)NrI�.rc�.resz"unknown file type '%s' (from '%s'))rKrJ)
r>r?rA�normcaseZsrc_extensionsrrBrDrC�
obj_extension)r/Zsource_filenamesZ	strip_dirrFZ	obj_namesZsrc_name�baser7rrr�object_filenames�s 
z CygwinCCompiler.object_filenames)rrr)
NNNNNrNNNN)rrI)�__name__�
__module__�__qualname__r+rMZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionr$r:rErOrrrrrYs
;
Krc@seZdZdZddd�ZdS)�Mingw32CCompilerZmingw32rc	Csxtj||||�|jdkr d}nd}|jdkr4d}nd}t�rFtd��|jdd	d
dd|j||fd
�g|_t	�|_dS)Nz2.13z-sharedz
-mdll -staticz2.91.57z--entry _DllMain@12rIz1Cygwin gcc cannot be used with --compiler=mingw32zgcc -O -Wallzgcc -mdll -O -Wallzg++ -O -Wallrz%s %s %s)rr r!r"r#)
rr$r*r)�is_cygwingccr
r-r,r.r)r/r0r1r2r4Zentry_pointrrrr$s&

zMingw32CCompiler.__init__N)rrr)rPrQrRr+r$rrrrrSsrS�okznot okZ	uncertaincCs�ddlm}dtjkrtdfS|j�}y@t|�}z(d|j�krJtd|fStd|fSWd|j	�XWn.t
k
r�}ztd||jffSd}~XnXdS)	Nr)�	sysconfigZGCCzsys.version mentions 'GCC'Z__GNUC__z'%s' mentions '__GNUC__'z '%s' does not mention '__GNUC__'zcouldn't read '%s': %s)
�	distutilsrVrrr&�get_config_h_filename�open�read�CONFIG_H_NOTOK�close�OSError�CONFIG_H_UNCERTAIN�strerror)rV�fn�config_h�excrrrr%Hs
r%s(\d+\.\d+(\.\d+)*)cCsl|j�d}t|�dkrdSt|dtd�j}z|j�}Wd|j�Xtj|�}|dkrZdSt	|j
d�j��S)NrT)�shell�stdoutr)�splitrrrrdrZr\�
RE_VERSION�searchr�group�decode)�cmd�
executable�out�
out_string�resultrrr�_find_exe_versionus

rocCsdddg}tdd�|D��S)Nzgcc -dumpversionzld -vzdllwrap --versioncSsg|]}t|��qSr)ro)�.0rjrrr�
<listcomp>�sz get_versions.<locals>.<listcomp>)�tuple)Zcommandsrrrr(�s
r(cCstddg�}|j�jd�S)Nrz-dumpmachinescygwin)r�strip�endswith)rmrrrrT�srT)&r>rr<�
subprocessrrr�reZdistutils.ccompilerrrZdistutils.unixccompilerrZdistutils.file_utilrZdistutils.errorsr	r
rrrWr
Zdistutils.versionrZdistutils.spawnrrrrSr&r[r^r%�compilerfror(rTrrrr�<module>0s.;1+


Zerion Mini Shell 1.0