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