a (ReV @ sT d Z ddlZddlmZ ddlT ddlmZ ddlmZ dd Z G d d d eZ dS )zdistutils.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)logc C s ddl m} | d S )Nr show_compilers)distutils.ccompilerr r r /builddir/build/BUILDROOT/alt-python39-setuptools-58.3.0-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/setuptools/_distutils/command/build_clib.pyr s r c @ sf e Zd ZdZg dZddgZdddefgZdd Zd d Z dd Z dd Zdd Zdd Z dd ZdS ) 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)debuggz"compile with debugging information)forcefz2forcibly build everything (ignore file timestamps))z compiler=czspecify the compiler typer r z help-compilerNzlist available compilersc C s: d | _ d | _d | _d | _d | _d | _d | _d| _d | _d S )Nr ) r build_temp librariesinclude_dirsdefineundefr r compilerselfr r r initialize_options4 s zbuild_clib.initialize_optionsc C sh | dddddd | jj| _| jr0| | j | jd u rH| jjpDg | _t| jtrd| jtj | _d S )Nbuild)r r )r r )r r )r r )r r ) set_undefined_optionsdistributionr check_library_listr isinstancestrsplitospathsepr r r r finalize_optionsD s zbuild_clib.finalize_optionsc C s | j s d S ddlm} || j| j| jd| _t| j | jd urN| j| j | j d urv| j D ]\}}| j || q^| jd ur| jD ]}| j| q| | j d S )Nr )new_compiler)r dry_runr )r r r&