????

Your IP : 18.117.135.125


Current Path : /lib/python3.10/distutils/__pycache__/
Upload File :
Current File : //lib/python3.10/distutils/__pycache__/unixccompiler.cpython-310.pyc

o

��bc<�@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	kr'd
ged
<gd�ZdZd
Z	dZ
dZdZdZ
ZZeZejdkrDdZ		d'dd�Zdd�Z	d(dd�Z				d)dd�Zdd�Zdd �Zd!d"�Zd#d$�Zd*d%d&�ZdS)+�
UnixCCompiler�unixN�ccz-shared�arz-cr)�preprocessor�compiler�compiler_so�compiler_cxx�	linker_so�
linker_exe�archiver�ranlib�rr)z.cz.Cz.ccz.cxxz.cppz.mz.oz.az.soz.dylibz.tbdzlib%s%s�cygwinz.exec
Cs�|�d||�}|\}}}t||�}	|j|	}
|r|
�d|g�|r'||
dd�<|r.|
�|�|
�|�|js?|dus?t||�rc|rJ|�tj	�
|��z|�|
�WdStyb}zt
|��d}~wwdS)N�-or)�_fix_compile_argsrr�extend�append�forcer�mkpath�os�path�dirname�spawnrr)�self�source�output_file�macros�include_dirs�
extra_preargs�extra_postargs�
fixed_args�ignore�pp_opts�pp_args�msg�r1�./usr/lib/python3.10/distutils/unixccompiler.py�
preprocessUs*




���zUnixCCompiler.preprocessc	
Csd|j}tjdkrt�|||�}z|�|||d|g|�WdSty1}zt|��d}~ww)Nrr)r�sys�platform�_osx_support�compiler_fixupr$rr)	r%�obj�src�ext�cc_argsr+r.rr0r1r1r2�_compileos
����zUnixCCompiler._compilerc
Cs�|�||�\}}|j||d�}|�||�rN|�tj�|��|�|j|g||j	�|j
rLz|�|j
|g�WdStyK}zt|��d}~wwdSt
�d|�dS)N)�
output_dir�skipping %s (up-to-date))�_fix_object_args�library_filename�
_need_linkr r!r"r#r$r�objectsrrr	r�debug)r%rB�output_libnamer=rC�target_lang�output_filenamer0r1r1r2�create_static_libzs*����	���zUnixCCompiler.create_static_libc
s|�||�\}}|�|||�}|\}}}gd��t�d�}|r*��d|d|g��fdd�|D�}�fdd�|D�}t||||�}t|ttd�f�sPt	d��|dur[t
j�||�}|�
||��r||j|d	|g}|	rvd
g|dd�<|
r~|
|dd�<|r�|�|�|�t
j�|��zf|tjkr�|jdd�}n|jdd�}|
dkr�|jr�d}t
j�|d�d
kr�d}d||vr�|d7}d||vs�t
j�||�dkr�d}nd}|j||||<tjdkr�t�||�}|�||�WdSt�y}zt|��d}~wwt�d|�dS)N)z/libz/lib64z/usr/libz
/usr/lib64�	MULTIARCHz/lib/%sz/usr/lib/%sc�g|]}|�vr|�qSr1r1��.0�dir��system_libdirsr1r2�
<listcomp>���z&UnixCCompiler.link.<locals>.<listcomp>crIr1r1rJrMr1r2rO�rPz%'output_dir' must be a string or Nonerz-grzc++�env��=�	ld_so_aixrr>) r?�
_fix_lib_argsr�get_config_varrr�
isinstance�str�type�	TypeErrorr!r"�joinrArBr r#r�
EXECUTABLErrr�basenamer4r5r6r7r$rr
rrC)r%�target_descrBrFr=�	libraries�library_dirs�runtime_library_dirs�export_symbolsrCr*r+�
build_temprEr,�	multiarch�lib_opts�ld_args�linker�i�offsetr0r1rMr2�link�sl�

���

�
��zUnixCCompiler.linkcC�d|S)N�-Lr1)r%rLr1r1r2�library_dir_option��z UnixCCompiler.library_dir_optioncst�fdd�dD��S)Nc3s�|]}|�vVqdS)Nr1)rK�name��
compiler_namer1r2�	<genexpr>�s�z(UnixCCompiler._is_gcc.<locals>.<genexpr>)�gcczg++�clang)�any)r%rqr1rpr2�_is_gcc�szUnixCCompiler._is_gcccCs�tj�t�d��}tjdd�dkrd|Stjdd�dkr#d|Stjdd�d	kr=|�|�r7d
d|gSdd|gS|�|�rQt�d�d
krMd|Sd|Sd|S)N�CCrrrl��freebsdz-Wl,-rpath=�zhp-uxz-Wl,+sz+s�GNULD�yesz-Wl,--enable-new-dtags,-Rz-Wl,-Rz-R)r!r"r]rrVr4r5rv)r%rLrr1r1r2�runtime_library_dir_option�s

z(UnixCCompiler.runtime_library_dir_optioncCrk)Nz-lr1)r%�libr1r1r2�library_optionrnzUnixCCompiler.library_optioncCs�|j|dd�}|j|dd�}|j|dd�}|j|dd�}tjdkr>t�d�}t�d|�}	|	dur9t�t�d	��}
n|	�	d
�}
|D]�}t
j�||�}t
j�||�}
t
j�||�}t
j�||�}tjdkr�|�
d�sr|�
d�r�|�
d
�s�t
j�|
|d
d�|�}t
j�|
|d
d�|�}
t
j�|
|d
d�|�}t
j�|
|d
d�|�}t
j�|
�r�|
St
j�|�r�|St
j�|�r�|St
j�|�r�|Sq@dS)N�shared)�lib_type�dylib�
xcode_stub�staticr�CFLAGSz-isysroot\s*(\S+)rwrRz/System/z/usr/z/usr/local/)r@r4r5rrV�re�searchr6�_default_sysroot�groupr!r"r[�
startswith�exists)r%�dirsr~rC�shared_f�dylib_f�xcode_stub_f�static_f�cflags�m�sysrootrLr�r�r�r�r1r1r2�find_library_filesH



����zUnixCCompiler.find_library_file)NNNNN)NrN)
NNNNNrNNNN)r)�__name__�
__module__�__qualname__�
compiler_type�executablesr4r5�src_extensions�
obj_extension�static_lib_extension�shared_lib_extension�dylib_lib_extension�xcode_stub_lib_extension�static_lib_format�shared_lib_format�dylib_lib_format�xcode_stub_lib_format�
exe_extensionr3r<rGrjrmrvr}rr�r1r1r1r2r
-sN�



�
�
�M*r
)�__doc__r!r4r��	distutilsr�distutils.dep_utilr�distutils.ccompilerrrr�distutils.errorsrrr	r
rr5r6r
r1r1r1r2�<module>s


Page not found | The NCLEX Doctor

Page not found!

Sorry, this page is not available...