3 \tã@sTdZddlZddlZddlmZddlmZddlmZdd„Z Gdd „d eƒZ dS) zBdistutils.command.build Implements the Distutils 'build' command.éN)ÚCommand)ÚDistutilsOptionError)Ú get_platformcCsddlm}|ƒdS)Nr)Úshow_compilers)Zdistutils.ccompilerr)r©rú//usr/lib64/python3.6/distutils/command/build.pyr s rc@s¢eZdZdZd8d9d:ddddeƒfd?d@dAdBdCg ZddgZd$dd%efgZd&d'„Z d(d)„Z d*d+„Z d,d-„Z d.d/„Z d0d1„Zd2d3„Zd4e fd5e fd6efd7efgZdS)DÚbuildz"build everything needed to installú build-base=Úbú base directory for build libraryúbuild-purelib=Nú2build directory for platform-neutral distributionsúbuild-platlib=ú3build directory for platform-specific distributionsú build-lib=z9build directory for all distribution (defaults to either zbuild-purelib or build-platlibúbuild-scripts=úbuild directory for scriptsú build-temp=Útútemporary build directoryz plat-name=Úpz6platform name to build for, if supported (default: %s)ú compiler=Úcúspecify the compiler typeú parallel=Újúnumber of parallel build jobsÚdebugÚgú;compile extensions and libraries with debugging informationÚforceÚfú2forcibly build everything (ignore file timestamps)ú executable=Úeú5specify final destination interpreter path (build.py)z help-compilerzlist available compilerscCsLd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_ d|_ dS)Nrr) Ú build_baseÚ build_purelibÚ build_platlibÚ build_libÚ build_tempÚ build_scriptsZcompilerÚ plat_namerr Ú executableÚparallel)ÚselfrrrÚinitialize_options8szbuild.initialize_optionsc CsZ|jdkrtƒ|_ntjdkr&tdƒ‚d|jftjdd…˜}ttdƒrR|d7}|jdkrntj j |j dƒ|_|j dkrŽtj j |j d|ƒ|_ |j dkr²|jjrª|j |_ n|j|_ |jdkrÒtj j |j d|ƒ|_|jdkrütj j |j d tjdd…ƒ|_|jdk�rtj jtjƒ|_t|jtƒ�rVyt|jƒ|_Wntk �rTtd ƒ‚YnXdS) NÚntzW--plat-name only supported on Windows (try using './configure --help' on your platform)z .%s-%d.%déÚgettotalrefcountz-pydebugÚlibZtempz scripts-%d.%dzparallel should be an integer)r,rÚosÚnamerÚsysÚ version_infoÚhasattrr'ÚpathÚjoinr&r(r)Ú distributionZ ext_modulesr*r+r-ÚnormpathÚ isinstancer.ÚstrÚintÚ ValueError)r/Zplat_specifierrrrÚfinalize_optionsHs<                zbuild.finalize_optionscCs x|jƒD]}|j|ƒq WdS)N)Zget_sub_commandsZ run_command)r/Zcmd_namerrrÚrun€sz build.runcCs |jjƒS)N)r<Úhas_pure_modules)r/rrrrDŒszbuild.has_pure_modulescCs |jjƒS)N)r<Úhas_c_libraries)r/rrrrE�szbuild.has_c_librariescCs |jjƒS)N)r<Úhas_ext_modules)r/rrrrF’szbuild.has_ext_modulescCs |jjƒS)N)r<Ú has_scripts)r/rrrrG•szbuild.has_scriptsZbuild_pyZ build_clibZ build_extr+)r r r )r Nr )rNrúWbuild directory for all distribution (defaults to either build-purelib or build-platlib)rNrH)rNr)rrr)rrr)rrr)rrr)r r!r")r#r$r%)Ú__name__Ú __module__Ú __qualname__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsr0rBrCrDrErFrGZ sub_commandsrrrrrsR 8 r) Ú__doc__r7r5Zdistutils.corerZdistutils.errorsrZdistutils.utilrrrrrrrÚs