
    d                     `    d Z ddlZddlZddlmZ ddlmZ ddlmZ d Z	 G d de          Z
dS )	zBdistutils.command.build

Implements the Distutils 'build' command.    N)Command)DistutilsOptionError)get_platformc                  &    ddl m}   |              d S )Nr   show_compilers)distutils.ccompilerr   r   s    )  /croot/python-split_1694437901252/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/lib/python3.11/distutils/command/build.pyr   r      s(    222222N    c                       e Zd ZdZdddddddd	d
 e            z  fdddddgZddgZdddefgZd Z	d Z
d Zd Zd Zd Zd ZdefdefdefdefgZdS ) buildz"build everything needed to install)zbuild-base=bz base directory for build library)zbuild-purelib=Nz2build directory for platform-neutral distributions)zbuild-platlib=Nz3build directory for platform-specific distributions)z
build-lib=NzWbuild directory for all distribution (defaults to either build-purelib or build-platlib)zbuild-scripts=Nzbuild directory for scripts)zbuild-temp=tztemporary build directoryz
plat-name=pz6platform name to build for, if supported (default: %s))z	compiler=czspecify the compiler type)z	parallel=jznumber 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)r   r   zhelp-compilerNzlist available compilersc                     d| _         d | _        d | _        d | _        d | _        d | _        d | _        d | _        d | _        d| _	        d | _
        d | _        d S )Nr   r   )
build_basebuild_purelibbuild_platlib	build_lib
build_tempbuild_scriptscompiler	plat_namer   r   
executableparallelselfs    r
   initialize_optionszbuild.initialize_options8   s_    ! "!!

r   c                 ,   | j         t                      | _         nt          j        dk    rt	          d          d| j         gt
          j        d d         R z  }t          t
          d          r|dz  }| j        *t          j	        
                    | j        d          | _        | j        -t          j	        
                    | j        d|z             | _        | j        %| j        j        r| j        | _        n| j        | _        | j        -t          j	        
                    | j        d|z             | _        | j        ?t          j	        
                    | j        d	t
          j        d d         z            | _        | j        :t
          j        r.t          j	                            t
          j                  | _        t)          | j        t,                    r9	 t/          | j                  | _        d S # t0          $ r t	          d
          w xY wd S )NntzW--plat-name only supported on Windows (try using './configure --help' on your platform)z	.%s-%d.%d   gettotalrefcountz-pydebuglibtempzscripts-%d.%dzparallel should be an integer)r    r   osnamer   sysversion_infohasattrr   pathjoinr   r   r   distributionext_modulesr   r   r!   normpath
isinstancer"   strint
ValueError)r$   plat_specifiers     r
   finalize_optionszbuild.finalize_optionsH   s   >!)^^DNN
 w$*KL L L %'N9I"1"9M'N'NN
 3*++ 	)j(N
 %!#dou!E!ED%!#do.3n.D"F "FD >! , 4!%!3!%!3 ?" gll4?+1N+BD DDO%!#do.=@PQSRSQS@T.T"V "VD ?"s~" g..s~>>DOdmS)) 	LL #DM 2 2 L L L*+JKKKL	L 	Ls   G7 7Hc                 ^    |                                  D ]}|                     |           d S N)get_sub_commandsrun_command)r$   cmd_names     r
   runz	build.run   s@     --// 	' 	'HX&&&&	' 	'r   c                 4    | j                                         S r=   )r3   has_pure_modulesr#   s    r
   rC   zbuild.has_pure_modules   s     11333r   c                 4    | j                                         S r=   )r3   has_c_librariesr#   s    r
   rE   zbuild.has_c_libraries        00222r   c                 4    | j                                         S r=   )r3   has_ext_modulesr#   s    r
   rH   zbuild.has_ext_modules   rF   r   c                 4    | j                                         S r=   )r3   has_scriptsr#   s    r
   rJ   zbuild.has_scripts   s     ,,...r   build_py
build_clib	build_extr   )__name__
__module____qualname__descriptionr   user_optionsboolean_optionsr   help_optionsr%   r;   rA   rC   rE   rH   rJ   sub_commands r   r
   r   r      s,       6K	-	?	@	+	(	&	s
'<>>
*	+	&	*	H	?	B3
L: (O 
$	#^	5
L
   6L 6L 6Lp' ' '4 4 43 3 33 3 3/ / /  &67!o6 o6$k2LLLr   r   )__doc__r.   r,   distutils.corer   distutils.errorsr   distutils.utilr   r   r   rV   r   r
   <module>r[      s   - -  " " " " " " 1 1 1 1 1 1 ' ' ' ' ' '  
M M M M MG M M M M Mr   