Hacked By AnonymousFox

Current Path : /opt/alt/python37/lib64/python3.7/distutils/command/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/distutils/command/__pycache__/build_clib.cpython-37.opt-2.pyc

B

YI~dV�@sPddlZddlmZddlTddlmZddlmZdd�ZGdd	�d	e�Z	dS)
�N)�Command)�*)�customize_compiler)�logcCsddlm}|�dS)Nr)�show_compilers)�distutils.ccompilerr)r�r�A/opt/alt/python37/lib64/python3.7/distutils/command/build_clib.pyrsrc@sleZdZdZdddddgZddgZd	d
defgZdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zd
S)�
build_clibz/build C/C++ libraries used by Python extensions)zbuild-clib=�bz%directory to build C/C++ libraries to)zbuild-temp=�tz,directory to put temporary build by-products)�debug�gz"compile with debugging information)�force�fz2forcibly build everything (ignore file timestamps))z	compiler=�czspecify the compiler typer
rz
help-compilerNzlist available compilerscCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)	r
�
build_temp�	libraries�include_dirs�define�undefr
r�compiler)�selfrrr	�initialize_options4szbuild_clib.initialize_optionscCsh|�dddddd�|jj|_|jr0|�|j�|jdkrH|jjpDg|_t|jt�rd|j�tj	�|_dS)NZbuild)rr
)rr)rr)r
r
)rr)
Zset_undefined_optionsZdistributionr�check_library_listr�
isinstance�str�split�os�pathsep)rrrr	�finalize_optionsDs

zbuild_clib.finalize_optionscCs�|js
dSddlm}||j|j|jd�|_t|j�|jdk	rN|j�|j�|j	dk	rzx |j	D]\}}|j�
||�q`W|jdk	r�x|jD]}|j�|�q�W|�
|j�dS)Nr)�new_compiler)r�dry_runr)rrr!rr"rrrZset_include_dirsrZdefine_macrorZundefine_macro�build_libraries)rr!�name�valueZmacrorrr	�run^s 



zbuild_clib.runcCs�t|t�std��x�|D]z}t|t�s:t|�dkr:td��|\}}t|t�sTtd��d|ksptjdkr�tj|kr�td|d��t|t�std��qWdS)	Nz+'libraries' option must be a list of tuples�z*each element of 'libraries' must a 2-tuplezNfirst element of each tuple in 'libraries' must be a string (the library name)�/z;bad library name '%s': may not contain directory separatorsrzMsecond element of each tuple in 'libraries' must be a dictionary (build info))	r�list�DistutilsSetupError�tuple�lenrr�sep�dict)rr�libr$�
build_inforrr	rvs"




zbuild_clib.check_library_listcCs0|js
dSg}x|jD]\}}|�|�qW|S)N)r�append)rZ	lib_names�lib_namer0rrr	�get_library_names�szbuild_clib.get_library_namescCs^|�|j�g}xH|jD]>\}}|�d�}|dks@t|ttf�sLtd|��|�|�qW|S)N�sourceszfin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenames)rr�getrr)r+r*�extend)r�	filenamesr2r0r4rrr	�get_source_files�s
zbuild_clib.get_source_filescCs�x�|D]�\}}|�d�}|dks.t|ttf�s:td|��t|�}t�d|�|�d�}|�d�}|jj||j	|||j
d�}|jj|||j|j
d�qWdS)Nr4zfin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenameszbuilding '%s' library�macrosr)�
output_dirr9rr
)r:r
)
r5rr)r+r*r�infor�compilerr
Zcreate_static_libr
)rrr2r0r4r9rZobjectsrrr	r#�s$




zbuild_clib.build_libraries)�__name__�
__module__�__qualname__�descriptionZuser_optionsZboolean_optionsrZhelp_optionsrr r&rr3r8r#rrrr	r
s 
$r
)
rZdistutils.corerZdistutils.errorsZdistutils.sysconfigrZ	distutilsrrr
rrrr	�<module>s

Hacked By AnonymousFox1.0, Coded By AnonymousFox