3 \t@sTdZddlZddlZddlmZddlmZddlmZddZ Gdd d eZ dS) zBdistutils.command.build Implements the Distutils 'build' command.N)Command)DistutilsOptionError) get_platformcCsddlm}|dS)Nr)show_compilers)Zdistutils.ccompilerr)rr/usr/lib64/python3.6/build.pyr s rc@seZdZdZd8d9d:ddddefd?d@dAdBdCg ZddgZd$dd%efgZd&d'Z d(d)Z d*d+Z d,d-Z d.d/Z d0d1Zd2d3Zd4e fd5e fd6efd7efgZdS)Dbuildz"build everything needed to install build-base=b base directory for build librarybuild-purelib=N2build directory for platform-neutral distributionsbuild-platlib=3build directory for platform-specific distributions build-lib=z9build directory for all distribution (defaults to either zbuild-purelib or build-platlibbuild-scripts=build directory for scripts build-temp=ttemporary build directoryz plat-name=pz6platform name to build for, if supported (default: %s) compiler=cspecify the compiler type parallel=jnumber of parallel build jobsdebugg;compile extensions and libraries with debugging informationforcef2forcibly build everything (ignore file timestamps) executable=e5specify 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 executableparallel)selfrrrinitialize_options8szbuild.initialize_optionsc CsZ|jdkrt|_ntjdkr&tdd|jftjdd}ttdrR|d7}|jdkrntj j |j d|_|j dkrtj j |j d||_ |j dkr|jjr|j |_ n|j|_ |jdkrtj j |j d||_|jdkrtj j |j d tjdd|_|jdkrtj jtj|_t|jtrVyt|j|_Wntk rTtd YnXdS) 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)r,rosnamersys version_infohasattrr'pathjoinr&r(r) distributionZ ext_modulesr*r+r-normpath isinstancer.strint ValueError)r/Zplat_specifierrrrfinalize_optionsHs<                zbuild.finalize_optionscCs x|jD]}|j|q WdS)N)Zget_sub_commandsZ run_command)r/Zcmd_namerrrrunsz build.runcCs |jjS)N)r<has_pure_modules)r/rrrrDszbuild.has_pure_modulescCs |jjS)N)r<has_c_libraries)r/rrrrEszbuild.has_c_librariescCs |jjS)N)r<has_ext_modules)r/rrrrFszbuild.has_ext_modulescCs |jjS)N)r< has_scripts)r/rrrrGszbuild.has_scriptsZbuild_pyZ build_clibZ build_extr+)r r r )r Nr )rNrWbuild 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__ descriptionrZ user_optionsZboolean_optionsrZ help_optionsr0rBrCrDrErFrGZ sub_commandsrrrrrsR 8 r) __doc__r7r5Zdistutils.corerZdistutils.errorsrZdistutils.utilrrrrrrrs