U e5d@sTdZddlZddlZddlmZddlmZddlmZddZ Gdd d eZ dS) zBdistutils.command.build Implements the Distutils 'build' command.N)Command)DistutilsOptionError) get_platformcCsddlm}|dS)Nrshow_compilers)Zdistutils.ccompilerrrr//usr/lib64/python3.8/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_scriptsZcompiler plat_namerr executableparallelselfrrrinitialize_options8szbuild.initialize_optionscCsb|jdkrt|_ntjdkr&tdd|jftjdd}ttdrR|d7}|jdkrntj |j d|_|j dkrtj |j d||_ |j dkr|jjr|j |_ n|j|_ |jdkrtj |j d||_|jdkrtj |j d tjdd|_|jdkr tjr tj tj|_t|jtr^zt|j|_Wntk r\td YnXdS) NntzW--plat-name only supported on Windows (try using './configure --help' on your platform)z .%s-%d.%dZgettotalrefcountz-pydebuglibZtempz scripts-%d.%dzparallel should be an integer)rrosnamersys version_infohasattrrpathjoinrrr distributionZ ext_modulesrrrnormpath isinstancerstrint ValueError)rZplat_specifierrrrfinalize_optionsHsD             zbuild.finalize_optionscCs|D]}||qdSN)Zget_sub_commandsZ run_command)rZcmd_namerrrruns z build.runcCs |jSr1)r*has_pure_modulesrrrrr3szbuild.has_pure_modulescCs |jSr1)r*has_c_librariesrrrrr4szbuild.has_c_librariescCs |jSr1)r*has_ext_modulesrrrrr5szbuild.has_ext_modulescCs |jSr1)r* has_scriptsrrrrr6szbuild.has_scriptsZbuild_pyZ build_clibZ build_extr)__name__ __module__ __qualname__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsrr0r2r3r4r5r6Z sub_commandsrrrrr sH8 r ) __doc__r%r#Zdistutils.corerZdistutils.errorsrZdistutils.utilrrr rrrrs