AlkantarClanX12

Your IP : 3.145.75.238


Current Path : /proc/self/root/usr/lib64/python3.8/distutils/__pycache__/
Upload File :
Current File : //proc/self/root/usr/lib64/python3.8/distutils/__pycache__/cygwinccompiler.cpython-38.opt-2.pyc

U

e5d^@�@s�ddlZddlZddlZddlmZmZmZddlZddlm	Z	m
Z
ddlmZddl
mZddlmZmZmZmZddlmZddlmZdd	lmZd
d�ZGdd
�d
e�ZGdd�de�ZdZdZdZdd�Z e�!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�tj�d�}|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�1/usr/lib64/python3.8/distutils/cygwinccompiler.py�	get_msvcr?src
@sNeZdZdZdZdZdZdZdZdZ	dd	d
�Z
dd�Zddd�Zddd�Z
d
S)�CygwinCCompiler�cygwinz.o�.az.dllzlib%s%sz%s%sz.exercCs�t�||||�t�\}}|�d||f�|tk	rB|�d|�t�\|_|_|_	|�|j
d|j|j|j	f�|jdkr�d|_nd|_|jdkr�d}nd	}|jd
ddd
d|j|fd�|jdkr�dg|_
|�d�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�dllwrap�2.13�-shared�
-mdll -staticzgcc -mcygwin -O -Wallzgcc -mcygwin -mdll -O -Wallzg++ -mcygwin -O -Wallzgcc -mcygwinz%s -mcygwin %s�Zcompiler�compiler_soZcompiler_cxxZ
linker_exeZ	linker_so�2.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�forceZstatusZdetails�
shared_optionrrrr%dsN
����
��


��
�zCygwinCCompiler.__init__c
Cs�|dks|dkrVz|�dd|d|g�Wq�tk
rR}zt|��W5d}~XYq�XnNz"|�|j||d|g|�Wn*tk
r�}zt|��W5d}~XYnXdS)N�.rc�.resZwindresz-iz-o)Zspawnr	rr#)r0�obj�src�extZcc_args�extra_postargsZpp_opts�msgrrr�_compile�s�
zCygwinCCompiler._compileNcCsPt�|
p
g�}
t�|pg�}t�|p&g�}|�|j�|dk	�r||jksV|jdk�rtj�|d�}tj�tj�	|��\}}tj�
||d�}tj�
|d|d�}dtj�	|�dg}|D]}|�|�q�|�t
||fd|�|jd	k�r|
�d
|g�|
�d|g�n
|�|�|	�s(|
�d�t�||||||||d|	|
|||
�dS)
Nrrz.def�librz
LIBRARY %sZEXPORTSz
writing %srz--output-libz--defz-s)�copy�extendr/Z
EXECUTABLEr-�os�path�dirname�splitext�basename�join�appendZexecuterr�link)r0Ztarget_descZobjectsZoutput_filename�
output_dirZ	librariesZlibrary_dirsZruntime_library_dirsZexport_symbols�debugZ
extra_preargsr:Z
build_tempZtarget_langZtemp_dirZdll_nameZ
dll_extensionZdef_fileZlib_file�contentsZsymrrrrG�sR
��

���

�zCygwinCCompiler.link�cCs�|dkrd}g}|D]�}tj�tj�|��\}}||jddgkrRtd||f��|rbtj�|�}|dkr�|�tj�||||j	��q|�tj�|||j	��q|S)NrKr5r6z"unknown file type '%s' (from '%s'))r6r5)
r@rArC�normcaseZsrc_extensionsrrDrFrE�
obj_extension)r0Zsource_filenamesZ	strip_dirrHZ	obj_namesZsrc_name�baser9rrr�object_filenames�s&���z CygwinCCompiler.object_filenames)rrr)
NNNNNrNNNN)rrK)�__name__�
__module__�__qualname__r,rMZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionr%r<rGrOrrrrrYs*
;�
Nrc@seZdZdZddd�ZdS)�Mingw32CCompilerZmingw32rc	Csxt�||||�|jdkr d}nd}|jdkr4d}nd}t�rFtd��|jdd	d
dd|j||fd
�g|_t	�|_dS)Nrr r!r$z--entry _DllMain@12rKz1Cygwin gcc cannot be used with --compiler=mingw32zgcc -O -Wallzgcc -mdll -O -Wallzg++ -O -Wallrz%s %s %sr")
rr%r+r*�is_cygwingccr
r.r-r/r)r0r1r2r3r4Zentry_pointrrrr%s.

����zMingw32CCompiler.__init__N)rrr)rPrQrRr,r%rrrrrSsrS�okznot okZ	uncertainc
Cs�ddlm}dtjkrtdfS|��}zLt|�}z4d|��krPtd|fW�WSt	d|fW�WSW5|��XWn8t
k
r�}ztd||jffWY�Sd}~XYnXdS)	Nr)�	sysconfigZGCCzsys.version mentions 'GCC'Z__GNUC__z'%s' mentions '__GNUC__'z '%s' does not mention '__GNUC__'zcouldn't read '%s': %s)
�	distutilsrVrrr'Zget_config_h_filename�open�close�read�CONFIG_H_NOTOK�OSError�CONFIG_H_UNCERTAIN�strerror)rV�fnZconfig_h�excrrrr&Hs
�r&s(\d+\.\d+(\.\d+)*)cCsl|��d}t|�dkrdSt|dtd�j}z|��}W5|��Xt�|�}|dkrZdSt	|�
d����S)NrT)�shell�stdout�)�splitrrrrbrYrZ�
RE_VERSION�searchr�group�decode)�cmd�
executable�out�
out_string�resultrrr�_find_exe_versionus

rncCsdddg}tdd�|D��S)Nzgcc -dumpversionzld -vzdllwrap --versioncSsg|]}t|��qSr)rn)�.0rirrr�
<listcomp>�sz get_versions.<locals>.<listcomp>)�tuple)Zcommandsrrrr)�s
r)cCstddg�}|���d�S)Nrz-dumpmachinescygwin)r�strip�endswith)rlrrrrT�srT)&r@rr>�
subprocessrrr�reZdistutils.ccompilerrrZdistutils.unixccompilerrZdistutils.file_utilrZdistutils.errorsr	r
rrrWr
Zdistutils.versionrZdistutils.spawnrrrrSr'r[r]r&�compilerernr)rTrrrr�<module>0s.;1+