HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/lib/python3.9/site-packages/setuptools/_distutils/__pycache__/unixccompiler.cpython-39.pyc
a

>��hh9�@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
<gd�ZdZd
Z	dZ
dZdZdZ
ZZeZejdkr�dZd'dd�Zdd�Zd(dd�Zd)dd�Zdd�Zdd �Zd!d"�Zd#d$�Zd*d%d&�ZdS)+�
UnixCCompilerZunixNZccz-sharedZarz-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�|rN||
dd�<|r\|
�|�|
�|�|js~|dus~t||�r�|r�|�tj	�
|��z|�|
�Wn,ty�}zt
|��WYd}~n
d}~00dS)N�-or)Z_fix_compile_argsrr�extend�append�forcer�mkpath�os�path�dirname�spawnrr)�self�sourceZoutput_fileZmacrosZinclude_dirs�
extra_preargs�extra_postargs�
fixed_args�ignore�pp_optsZpp_args�msg�r)�G/usr/lib/python3.9/site-packages/setuptools/_distutils/unixccompiler.py�
preprocessUs$




zUnixCCompiler.preprocessc	
Csr|j}tjdkr t�|||�}z |�|||d|g|�Wn,tyl}zt|��WYd}~n
d}~00dS)Nrr)r�sys�platform�_osx_support�compiler_fixupr rr)	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�ty�}zt|��WYd}~q�d}~00nt
�d|�dS)N)�
output_dir�skipping %s (up-to-date))�_fix_object_args�library_filename�
_need_linkrrrrr r�objectsrrr	r�debug)r!r8Zoutput_libnamer3r9�target_lang�output_filenamer(r)r)r*�create_static_libzs$����	 zUnixCCompiler.create_static_libc
Cs�|�||�\}}|�|||�}|\}}}t||||�}t|ttd�f�sPtd��|durftj�	||�}|�
||��r�||j|d|g}|	r�dg|dd�<|
r�|
|dd�<|r�|�|�|�
tj�|��z�|tjkr�|jdd�}n|jdd�}|
dk�rr|j�rrd}tj�|d�dk�r@d}d||v�r@|d7}�q&tj�||�d	k�r\d}nd}|j||||<tjd
k�r�t�||�}|�||�Wn.t�y�}zt|��WYd}~n
d}~00nt�d|�dS)Nz%'output_dir' must be a string or Nonerz-grzc++�env��=Z	ld_so_aixrr4)r5Z
_fix_lib_argsr�
isinstance�str�type�	TypeErrorrr�joinr7r8rrrrZ
EXECUTABLErrr�basenamer,r-r.r/r rr
rr9)r!Ztarget_descr8r;r3Z	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsr9r#r$Z
build_tempr:r%Zlib_optsZld_argsZlinker�i�offsetr(r)r)r*�link�sZ�
���

 zUnixCCompiler.linkcCsd|S)N�-Lr))r!�dirr)r)r*�library_dir_option�sz UnixCCompiler.library_dir_optioncCsd|vpd|vS)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)NZCCrrrI�Zfreebsdz-Wl,-rpath=�zhp-uxz-Wl,+sz+sZGNULDZyesz-Wl,--enable-new-dtags,-Rz-Wl,-Rz-R)rrrEr�get_config_varr,r-rL)r!rJrr)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�}tjdkrpt�d�}t�d|�}	|	durfd	}
n
|	�d
�}
|D�] }tj	�
||�}tj	�
||�}
tj	�
||�}tj	�
||�}tjdk�r@|�d�s�|�d��r@|�d
��s@tj	�
|
|d
d�|�}tj	�
|
|d
d�|�}
tj	�
|
|d
d�|�}tj	�
|
|d
d�|�}tj	�|
��rV|
Stj	�|��rl|Stj	�|��r�|Stj	�|�rt|SqtdS)N�shared)Zlib_type�dylib�
xcode_stub�staticrZCFLAGSz-isysroot\s*(\S+)�/r>z/System/z/usr/z/usr/local/)
r6r,r-rrO�re�search�grouprrrD�
startswith�exists)r!�dirsrQr9Zshared_fZdylib_fZxcode_stub_fZstatic_fZcflags�mZsysrootrJrSrTrVrUr)r)r*�find_library_file	sF



���
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+r2r<rHrKrLrPrRr_r)r)r)r*r
-sL�


�
�
�
B*r
)�__doc__rr,rXZ	distutilsrZdistutils.dep_utilrZdistutils.ccompilerrrrZdistutils.errorsrrr	r
rr-r.r
r)r)r)r*�<module>s