3 \Vã@sTdZddlZddlmZddlTddlmZddlmZdd„Z Gd d „d eƒZ dS) z´distutils.command.build_clib Implements the Distutils 'build_clib' command, to build a C/C++ library that is included in the module distribution and needed by an extension module.é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