3 \V�@sPddlZddlmZddlTddlmZddlmZdd�ZGdd �d e�Z dS) �N)�Command)�*)�customize_compiler)�logcCsddlm}|�dS)Nr)�show_compilers)�distutils.ccompilerr)r�r�4/usr/lib64/python3.6/distutils/command/build_clib.pyrs rc@sleZdZdZd"d#d$d%d&gZdd gZdddefgZdd�Zdd�Z dd�Z dd�Z dd�Z dd�Z d d!�ZdS)'� build_clibz/build C/C++ libraries used by Python extensions� build-clib=�b�%directory to build C/C++ libraries to� build-temp=�t�,directory to put temporary build by-products�debug�g�"compile with debugging information�force�f�2forcibly build everything (ignore file timestamps)� compiler=�c�specify the compiler typez help-compilerNzlist available compilerscCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr) r � build_temp� libraries� include_dirs�define�undefrr�compiler)�selfrrr �initialize_options4szbuild_clib.initialize_optionscCsh|jdddd d d �|jj|_|jr0|j|j�|jdkrH|jjpDg|_t|jt�rd|jjtj �|_dS) NZbuildrr rrr)rr )rr)rr)rr)rr) Zset_undefined_optionsZ distributionr�check_library_listr� isinstance�str�split�os�pathsep)r rrr �finalize_optionsDs    zbuild_clib.finalize_optionscCs�|js dSddlm}||j|j|jd�|_t|j�|jdk rN|jj|j�|j dk rzx |j D]\}}|jj ||�q`W|j dk r�x|j D]}|jj |�q�W|j |j�dS)Nr)� new_compiler)r�dry_runr)rrr)rr*rrrZset_include_dirsrZ define_macrorZundefine_macro�build_libraries)r r)�name�valueZmacrorrr �run^s        zbuild_clib.runcCs�t|t�std��x�|D]|}t|t� rs