o
    LK&h#                     @  s   d Z ddlmZ ddl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dlmZ dd	lmZ dd
lmZ G dd deZdS )zBdistutils.command.build

Implements the Distutils 'build' command.    )annotationsN)Callable)ClassVar   )show_compilers)Command)DistutilsOptionError)get_platformc                   @  s   e Zd ZU dZdddddddd	d
e  dfdddddgZddgZded< dddefgZ	ded< dd Z
d.ddZd.d d!Zd"d# Zd$d% Zd&d' Zd(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=pz3platform name to build for, if supported [default: ])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ClassVar[list[str]]boolean_optionszhelp-compilerNzlist available compilerszAClassVar[list[tuple[str, str | None, str, Callable[[], object]]]]help_optionsc                 C  sL   d| _ d | _d | _d | _d | _d | _d | _d | _d | _d| _	d | _
d | _d S )Nr
   F)
build_basebuild_purelibbuild_platlib	build_lib
build_tempbuild_scriptscompiler	plat_namer   r   
executableparallelself r$   V/var/www/html/venv/lib/python3.10/site-packages/setuptools/_distutils/command/build.pyinitialize_options3   s   
zbuild.initialize_optionsreturnNonec                 C  sl  | j d u r
t | _ n	tjdkrtdd| j  dtjj }t	dr'|d7 }t
tdr0|d7 }| jd u r>tj| jd	| _| jd u rNtj| jd	| | _| jd u ra| j r]| j| _n| j| _| jd u rqtj| jd
| | _| jd u rtj| jdtjj dtjj | _| jd u rtjrtjtj| _t| jtrz	t| j| _W d S  ty   tdw d S )NntzW--plat-name only supported on Windows (try using './configure --help' on your platform).-Py_GIL_DISABLEDr   gettotalrefcountz-pydebuglibtempzscripts-zparallel should be an integer)r   r	   osnamer   sysimplementation	cache_tag	sysconfigget_config_varhasattrr   pathjoinr   r   r   distributionhas_ext_modulesr   r   version_infomajorminorr    normpath
isinstancer!   strint
ValueError)r#   plat_specifierr$   r$   r%   finalize_optionsC   sF   











zbuild.finalize_optionsc                 C  s   |   D ]}| | qd S N)get_sub_commandsrun_command)r#   cmd_namer$   r$   r%   run   s   z	build.runc                 C  
   | j  S rF   )r:   has_pure_modulesr"   r$   r$   r%   rL         
zbuild.has_pure_modulesc                 C  rK   rF   )r:   has_c_librariesr"   r$   r$   r%   rN      rM   zbuild.has_c_librariesc                 C  rK   rF   )r:   r;   r"   r$   r$   r%   r;      rM   zbuild.has_ext_modulesc                 C  rK   rF   )r:   has_scriptsr"   r$   r$   r%   rO      rM   zbuild.has_scriptsbuild_py
build_clib	build_extr   )r'   r(   )__name__
__module____qualname__descriptionr	   user_optionsr   __annotations__r   r   r&   rE   rJ   rL   rN   r;   rO   sub_commandsr$   r$   r$   r%   r
      sB   
 


=r
   )__doc__
__future__r   r0   r2   r5   collections.abcr   typingr   	ccompilerr   corer   errorsr   utilr	   r
   r$   r$   r$   r%   <module>   s    