U i�f��@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.ccompilerrr�r�</opt/alt/python38/lib64/python3.8/distutils/command/build.pyr s rc @s�eZdZdZdddddddd d e�fd d d ddg ZddgZdddefgZdd�Z dd�Z dd�Z dd�Z dd�Z 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)�debug�gz;compile extensions and libraries with debugging information)�force�fz2forcibly 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� executable�parallel��selfrrr�initialize_options8szbuild.initialize_optionscCsb|jdkrt�|_ntjdkr&td��d|jftjdd��}ttd�rR|d7}|jdkrntj � |j d�|_|j dkr�tj � |j d|�|_ |j dkr�|jjr�|j |_ n|j|_ |jdkr�tj � |j d|�|_|jdkr�tj � |j d tjdd��|_|jdk�r tj�r tj �tj�|_t|jt��r^zt|j�|_Wntk �r\td ��YnXdS) N�ntzW--plat-name only supported on Windows (try using './configure --help' on your platform)z .%s-%d.%d�Zgettotalrefcountz-pydebug�libZtempz scripts-%d.%dzparallel should be an integer)rr�os�namer�sys� version_info�hasattrr�path�joinrrr� distributionZ ext_modulesrrr�normpath� isinstancer�str�int� ValueError)rZplat_specifierrrr�finalize_optionsHsD   �    �    �  �zbuild.finalize_optionscCs|��D]}|�|�qdS�N)Zget_sub_commandsZ run_command)rZcmd_namerrr�run�s z build.runcCs |j��Sr1)r*�has_pure_modulesrrrrr3�szbuild.has_pure_modulescCs |j��Sr1)r*�has_c_librariesrrrrr4�szbuild.has_c_librariescCs |j��Sr1)r*�has_ext_modulesrrrrr5�szbuild.has_ext_modulescCs |j��Sr1)r*� has_scriptsrrrrr6�szbuild.has_scriptsZbuild_pyZ build_clibZ build_extr)�__name__� __module__� __qualname__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsrr0r2r3r4r5r6Z sub_commandsrrrrr sH�����8 �r ) �__doc__r%r#Zdistutils.corerZdistutils.errorsrZdistutils.utilrrr rrrr�<module>s