3 2aV@sPddlZddlmZddlTddlmZddlmZddZGdd d eZ dS) N)Command)*)customize_compiler)logcCsddlm}|dS)Nr)show_compilers)distutils.ccompilerr)rr//opt/alt/python36/lib64/python3.6/build_clib.pyrs rc@sleZdZdZd"d#d$d%d&gZdd gZdddefgZddZddZ ddZ ddZ ddZ ddZ 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-productsdebugg"compile with debugging informationforcef2forcibly build everything (ignore file timestamps) compiler=cspecify the compiler typez help-compilerNzlist available compilerscCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr) r build_temp libraries include_dirsdefineundefrrcompiler)selfrrr initialize_options4szbuild_clib.initialize_optionscCsh|jdddd d d |jj|_|jr0|j|j|jdkrH|jjpDg|_t|jtrd|jjtj |_dS) NZbuildrr rrr)rr )rr)rr)rr)rr) Zset_undefined_optionsZ distributionrcheck_library_listr isinstancestrsplitospathsep)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 rx|j D]}|jj |qW|j |jdS)Nr) new_compiler)rdry_runr)rrr)rr*rrrZset_include_dirsrZ define_macrorZundefine_macrobuild_libraries)r r)namevalueZmacrorrr run^s        zbuild_clib.runcCst|tstdx|D]|}t|t rs