%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /snap/core18/current/usr/lib/python3.6/distutils/__pycache__/
Upload File :
Create Path :
Current File : //snap/core18/current/usr/lib/python3.6/distutils/__pycache__/unixccompiler.cpython-36.pyc

3

��]�:�@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�|jd||�}|\}}}t||�}	|j|	}
|r>|
jd|g�|rN||
dd�<|r\|
j|�|
j|�|js~|dks~t||�r�|r�|jtj	j
|��y|j|
�Wn*tk
r�}zt
|��WYdd}~XnXdS)Nz-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.6/distutils/unixccompiler.py�
preprocessUs$




zUnixCCompiler.preprocessc	Csp|j}tjdkr tj|||�}y |j|||d|g|�Wn*tk
rj}zt|��WYdd}~XnXdS)Nrz-o)r�sys�platform�_osx_support�compiler_fixuprrr)	r�obj�srcZextZcc_argsr"r%rr&r'r'r(�_compileos

zUnixCCompiler._compilercCs�|j||�\}}|j||d�}|j||�r�|jtjj|��|j|j|g||j	�|j
r�y|j|j
|g�Wq�tk
r�}zt|��WYdd}~Xq�Xnt
jd|�dS)N)�
output_dirzskipping %s (up-to-date))�_fix_object_args�library_filename�
_need_linkrrrrrr�objectsrrr	r�debug)rr5Zoutput_libnamer1r6�target_lang�output_filenamer&r'r'r(�create_static_libzszUnixCCompiler.create_static_libcs|j||�\}}|j|||�}|\}}}ddddg�tjd�}|rX�jd|d|g��fdd	�|D�}�fd
d	�|D�}t||||�}t|ttd�f�s�t	d��|dk	r�t
jj||�}|j
||��r||j|d|g}|	r�d
g|dd�<|
�r|
|dd�<|�r|j|�|jt
jj|��y�|tjk�rB|jdd�}n|jdd�}|
dk�r�|j�r�d}t
jj|d�dk�r�d}xd||k�r�|d7}�q�W|j|||<tjdk�r�tj||�}|j||�Wn,tk
�r}zt|��WYdd}~XnXntjd|�dS)Nz/libz/lib64z/usr/libz
/usr/lib64Z	MULTIARCHz/lib/%sz/usr/lib/%scsg|]}|�kr|�qSr'r')�.0�dir)�system_libdirsr'r(�
<listcomp>�sz&UnixCCompiler.link.<locals>.<listcomp>csg|]}|�kr|�qSr'r')r:r;)r<r'r(r=�sz%'output_dir' must be a string or Nonez-oz-grzc++�env��=rzskipping %s (up-to-date)) r2Z
_fix_lib_argsr�get_config_varrr�
isinstance�str�type�	TypeErrorrr�joinr4r5rrrZ
EXECUTABLErrr�basenamer*r+r,r-rrr
rr6)rZtarget_descr5r8r1Z	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsr6r!r"Z
build_tempr7r#Z	multiarchZlib_optsZld_argsZlinker�ir&r')r<r(�link�sT


zUnixCCompiler.linkcCsd|S)Nz-Lr')rr;r'r'r(�library_dir_option�sz UnixCCompiler.library_dir_optioncCsd|kpd|kS)NZgcczg++r')rZ
compiler_namer'r'r(�_is_gcc�szUnixCCompiler._is_gcccCs�tjjtjd��}tjdd�dkr,d|Stjdd�dkrFd|Stjdd�d	krz|j|�rnd
d|gSdd|gStjdd�dks�tjdd�d
kr�d|gS|j|�r�tjd�dkr�d|Sd|Snd|SdS)NZCCrrz-L�Zfreebsdz-Wl,-rpath=�zhp-uxz-Wl,+sz+sZirix646Zosf1V5z-rpathZGNULDZyesz-Wl,--enable-new-dtags,-Rz-Wl,-Rz-R)rrrGrrAr*r+rK)rr;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�}tjdkrptjd�}tjd|�}	|	dkrfd	}
n
|	jd
�}
�x|D�]}tj	j
||�}tj	j
||�}
tj	j
||�}tj	j
||�}tjdko�|jd�s�|jd�o�|jd
��rBtj	j
|
|d
d�|�}tj	j
|
|d
d�|�}
tj	j
|
|d
d�|�}tj	j
|
|d
d�|�}tj	j|
��rT|
Stj	j|��rf|Stj	j|��rx|Stj	j|�rx|SqxWdS)N�shared)Zlib_type�dylib�
xcode_stub�staticrZCFLAGSz-isysroot\s+(\S+)�/r?z/System/z/usr/z/usr/local/)
r3r*r+rrA�re�search�grouprrrF�
startswith�exists)r�dirsrOr6Zshared_fZdylib_fZxcode_stub_fZstatic_fZcflags�mZsysrootr;rQrRrTrSr'r'r(�find_library_files>




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)r0r9rIrJrKrNrPr]r'r'r'r(r
-sD




A,r
)�__doc__rr*rVZ	distutilsrZdistutils.dep_utilrZdistutils.ccompilerrrrZdistutils.errorsrrr	r
rr+r,r
r'r'r'r(�<module>s


Zerion Mini Shell 1.0