%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /snap/core20/2379/lib/python3.8/distutils/__pycache__/
Upload File :
Create Path :
Current File : //snap/core20/2379/lib/python3.8/distutils/__pycache__/unixccompiler.cpython-38.pyc

U

�A�`�;�@s�dZddlZddlZddlZddlmZddlmZddlm	Z	m
Z
mZddlm
Z
mZmZmZddlmZejdkr~ddlZGd	d
�d
e	�ZdS)a9distutils.unixccompiler

Contains the UnixCCompiler class, a subclass of CCompiler that handles
the "typical" Unix-style command-line C compiler:
  * macros defined with -Dname[=value]
  * macros undefined with -Uname
  * include search directories specified with -Idir
  * libraries specified with -lllib
  * library search directories specified with -Ldir
  * compile handled by 'cc' (or similar) executable with -c option:
    compiles .c to .o
  * link static library handled by 'ar' command (possibly with 'ranlib')
  * link shared library handled by 'cc -shared'
�N)�	sysconfig)�newer)�	CCompiler�gen_preprocess_options�gen_lib_options)�DistutilsExecError�CompileError�LibError�	LinkError)�log�darwinc
@s�eZdZdZddgdgdgddgdgddgdd�Zejdd�d	krNd
ged
<ddd
dddgZdZdZ	dZ
dZdZdZ
ZZeZejdkr�dZd,dd�Zdd�Zd-dd�Zd.d d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd/d*d+�ZdS)0�
UnixCCompilerZunixNZccz-sharedZarz-cr)�preprocessor�compiler�compiler_so�compiler_cxx�	linker_so�
linker_exe�archiver�ranlib�rrz.cz.Cz.ccz.cxxz.cppz.mz.oz.az.soz.dylibz.tbdzlib%s%s�cygwinz.exec
Cs�|�d||�}|\}}}t||�}	|j|	}
|r>|
�d|g�|rN||
dd�<|r\|
�|�|
�|�|js~|dks~t||�r�|r�|�tj	�
|��z|�|
�Wn*tk
r�}zt
|��W5d}~XYnXdS)N�-or)Z_fix_compile_argsrr�extend�appendZforcer�mkpath�os�path�dirname�spawnrr)�self�sourceZoutput_fileZmacrosZinclude_dirs�
extra_preargs�extra_postargs�
fixed_args�ignore�pp_optsZpp_args�msg�r(�-/usr/lib/python3.8/distutils/unixccompiler.py�
preprocessUs$




zUnixCCompiler.preprocessc	
Csp|j}tjdkr t�|||�}z |�|||d|g|�Wn*tk
rj}zt|��W5d}~XYnXdS)Nrr)r�sys�platform�_osx_support�compiler_fixuprrr)	r �obj�srcZextZcc_argsr#r&rr'r(r(r)�_compileos
��
zUnixCCompiler._compilerc
Cs�|�||�\}}|j||d�}|�||�r�|�tj�|��|�|j|g||j	�|j
r�z|�|j
|g�Wq�tk
r�}zt|��W5d}~XYq�Xnt
�d|�dS)N)�
output_dir�skipping %s (up-to-date))�_fix_object_args�library_filename�
_need_linkrrrrrr�objectsrrr	r�debug)r r7Zoutput_libnamer2r8�target_lang�output_filenamer'r(r(r)�create_static_libzs$����	zUnixCCompiler.create_static_libc
s4|�||�\}}|�|||�}|\}}}ddddg�t�d�}|rX��d|d|g��fdd	�|D�}�fd
d	�|D�}t||||�}t|ttd�f�s�t	d��|dk	r�t
j�||�}|�
||��r$||j|d|g}|	r�d
g|dd�<|
�r|
|dd�<|�r|�|�|�t
j�|��z�|tjk�rB|jdd�}n|jdd�}|
dk�r�|j�r�d}t
j�|d�dk�r�d}d||k�r�|d7}�q�t
j�||�dk�r�d}nd}|j||||<tjdk�r�t�||�}|�||�Wn,tk
�r }zt|��W5d}~XYnXnt�d|�dS)Nz/libz/lib64z/usr/libz
/usr/lib64Z	MULTIARCHz/lib/%sz/usr/lib/%scsg|]}|�kr|�qSr(r(��.0�dir�Zsystem_libdirsr(r)�
<listcomp>�s�z&UnixCCompiler.link.<locals>.<listcomp>csg|]}|�kr|�qSr(r(r<r?r(r)r@�s�z%'output_dir' must be a string or Nonerz-grzc++�env��=Z	ld_so_aixrr3) r4Z
_fix_lib_argsr�get_config_varrr�
isinstance�str�type�	TypeErrorrr�joinr6r7rrrZ
EXECUTABLErrr�basenamer+r,r-r.rrr
rr8)r Ztarget_descr7r:r2Z	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsr8r"r#Z
build_tempr9r$Z	multiarchZlib_optsZld_argsZlinker�i�offsetr'r(r?r)�link�sf�

���
zUnixCCompiler.linkcCsd|S)N�-Lr()r r>r(r(r)�library_dir_option�sz UnixCCompiler.library_dir_optioncCsd|kpd|kS)NZgcczg++r()r Z
compiler_namer(r(r)�_is_gcc�szUnixCCompiler._is_gcccCs�tj�t�d��}tjdd�dkr,d|Stjdd�dkrFd|Stjdd�d	krz|�|�rnd
d|gSdd|gS|�|�r�t�d�d
kr�d|Sd|Snd|SdS)N�CCrrrN�Zfreebsdz-Wl,-rpath=�zhp-uxz-Wl,+sz+sZGNULDZyesz-Wl,--enable-new-dtags,-Rz-Wl,-Rz-R)rrrJrrDr+r,rP)r r>rr(r(r)�runtime_library_dir_option�s


z(UnixCCompiler.runtime_library_dir_optioncCsd|S)Nz-lr()r �libr(r(r)�library_optionszUnixCCompiler.library_optioncCs�|j|dd�}|j|dd�}|j|dd�}|j|dd�}tjdkr|t�d�}t�d|�}	|	dkrrt�t�d	��}
n
|	�	d
�}
|D�] }t
j�||�}t
j�||�}
t
j�||�}t
j�||�}tjdk�rL|�
d�s�|�
d��rL|�
d
��sLt
j�|
|d
d�|�}t
j�|
|d
d�|�}
t
j�|
|d
d�|�}t
j�|
|d
d�|�}t
j�|
��rb|
St
j�|��rx|St
j�|��r�|St
j�|�r�|Sq�dS)N�shared)Zlib_type�dylib�
xcode_stub�staticrZCFLAGSz-isysroot\s*(\S+)rQrBz/System/z/usr/z/usr/local/)r5r+r,rrD�re�searchr-Z_default_sysroot�grouprrrI�
startswith�exists)r �dirsrUr8Zshared_fZdylib_fZxcode_stub_fZstatic_fZcflags�mZsysrootr>rWrXrZrYr(r(r)�find_library_filesF



���
zUnixCCompiler.find_library_file)NNNNN)NrN)
NNNNNrNNNN)r)�__name__�
__module__�__qualname__Z
compiler_typeZexecutablesr+r,Zsrc_extensionsZ
obj_extensionZstatic_lib_extensionZshared_lib_extensionZdylib_lib_extensionZxcode_stub_lib_extensionZstatic_lib_formatZshared_lib_formatZdylib_lib_formatZxcode_stub_lib_formatZ
exe_extensionr*r1r;rMrOrPrTrVrbr(r(r(r)r
-s`�


�
�
�
M*r
)�__doc__rr+r[Z	distutilsrZdistutils.dep_utilrZdistutils.ccompilerrrrZdistutils.errorsrrr	r
rr,r-r
r(r(r(r)�<module>s


Zerion Mini Shell 1.0