a `@sTdZddlZddlZddlmZddlmZddlmZddZ Gdd d eZ dS) zBdistutils.command.build Implements the Distutils 'build' command.N)Command)DistutilsOptionError) get_platformcCsddlm}|dS)Nrshow_compilers)distutils.ccompilerrrr:/usr/local/src/Python-3.9.6/Lib/distutils/command/build.pyr s rc @seZdZdZdddddddd d efd d d ddg ZddgZdddefgZddZ ddZ ddZ ddZ ddZ dd Zd!d"Zd#e fd$e fd%efd&efgZdS)'buildz"build everything needed to install)z build-base=bz base directory for build library)zbuild-purelib=Nz2build directory for platform-neutral distributions)zbuild-platlib=Nz3build directory for platform-specific distributions)z build-lib=NzWbuild directory for all distribution (defaults to either build-purelib or build-platlib)zbuild-scripts=Nzbuild directory for scripts)z build-temp=tztemporary build directoryz plat-name=pz6platform name to build for, if supported (default: %s))z compiler=czspecify the compiler type)z parallel=jznumber of parallel build jobs)debuggz;compile extensions and libraries with debugging information)forcefz2forcibly build everything (ignore file timestamps))z executable=ez5specify final destination interpreter path (build.py)rrz help-compilerNzlist available compilerscCsLd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_ d|_ dS)Nr r) build_base build_purelib build_platlib build_lib build_temp build_scriptscompiler plat_namerr executableparallelselfrrr initialize_options8szbuild.initialize_optionscCsb|jdurt|_ntjdkr&tdd|jgtjddR}ttdrT|d7}|jdurptj |j d|_|j durtj |j d||_ |j dur|jjr|j |_ n|j|_ |jdurtj |j d||_|jdurtj |j d tjdd|_|jdur"tjr"tj tj|_t|jtr^zt|j|_Wnty\td Yn0dS) NntzW--plat-name only supported on Windows (try using './configure --help' on your platform)z .%s-%d.%dgettotalrefcountz-pydebuglibZtempz scripts-%d.%dzparallel should be an integer)rrosnamersys version_infohasattrrpathjoinrrr distribution ext_modulesrrrnormpath isinstancerstrint ValueError)r Zplat_specifierrrr finalize_optionsHsD             zbuild.finalize_optionscCs|D]}||qdSN)get_sub_commands run_command)r cmd_namerrr runs z build.runcCs |jSr5)r-has_pure_modulesrrrr r:szbuild.has_pure_modulescCs |jSr5)r-has_c_librariesrrrr r;szbuild.has_c_librariescCs |jSr5)r-has_ext_modulesrrrr r<szbuild.has_ext_modulescCs |jSr5)r- has_scriptsrrrr r=szbuild.has_scriptsbuild_py build_clib build_extr)__name__ __module__ __qualname__ descriptionr user_optionsboolean_optionsr help_optionsr!r4r9r:r;r<r= sub_commandsrrrr r sF8 r ) __doc__r(r&distutils.corerdistutils.errorsrdistutils.utilrrr rrrr s