a
i @ sP d dl Z d dlZd dlmZ d dlmZ d dlmZ dd ZG dd deZ dS ) N)Command)DistutilsOptionError)get_platformc C s ddl m} | d S )Nr show_compilers)Zdistutils.ccompilerr r r //usr/lib64/python3.9/distutils/command/build.pyr s r c @ s e Zd ZdZdddddddd d
e fddd
ddgZddgZdddefgZdd Z dd Z
dd Zdd Zdd Z
dd Zd!d" Zd#efd$e
fd%efd&efgZdS )'buildz"build everything needed to install)zbuild-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)zbuild-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)debuggz;compile extensions and libraries with debugging information)forcefz2forcibly build everything (ignore file timestamps))zexecutable=ez5specify final destination interpreter path (build.py)r r z
help-compilerNzlist available compilersc C sL 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_scriptsZcompiler plat_namer r
executableparallelselfr r r initialize_options8 s zbuild.initialize_optionsc C sb | j d u rt | _ ntjdkr&tdd| j gtjd d R }ttdrT|d7 }| jd u rptj
| jd| _| jd u rtj
| jd| | _| j
d u r| jjr| j| _
n| j| _
| jd u rtj
| jd| | _| jd u rtj
| jd tjd d | _| jd u r"tjr"tj tj| _t| jtr^zt| j| _W n ty\ td
Y n0 d S )NntzW--plat-name only supported on Windows (try using './configure --help' on your platform)z .%s-%d.%d Zgettotalrefcountz-pydebuglibZtempz
scripts-%d.%dzparallel should be an integer)r r osnamer sysversion_infohasattrr pathjoinr r r distributionZext_modulesr r r normpath
isinstancer strint
ValueError)r Zplat_specifierr r r finalize_optionsH sD
zbuild.finalize_optionsc C s | D ]}| | qd S N)Zget_sub_commandsZrun_command)r Zcmd_namer r r run s z build.runc C s
| j S r1 )r* has_pure_modulesr r r r r3 s zbuild.has_pure_modulesc C s
| j S r1 )r* has_c_librariesr r r r r4 s zbuild.has_c_librariesc C s
| j S r1 )r* has_ext_modulesr r r r r5 s zbuild.has_ext_modulesc C s
| j S r1 )r* has_scriptsr r r r r6 s zbuild.has_scriptsZbuild_pyZ
build_clibZ build_extr )__name__
__module____qualname__descriptionr Zuser_optionsZboolean_optionsr Zhelp_optionsr r0 r2 r3 r4 r5 r6 Zsub_commandsr r r r r sF 8r )
r% r# Zdistutils.corer Zdistutils.errorsr Zdistutils.utilr r r r r r r