3
\t ã @ sT d Z ddlZddlZddlmZ ddlmZ ddlmZ dd„ Z G dd „ d eƒZ
dS )
zBdistutils.command.build
Implements the Distutils 'build' command.é N)ÚCommand)ÚDistutilsOptionError)Úget_platformc C s ddl m} | ƒ d S )Nr )Úshow_compilers)Zdistutils.ccompilerr )r © r ú//usr/lib64/python3.6/distutils/command/build.pyr s r c @ s¢ e Zd ZdZd8d9d:ddddeƒ fd?d@dAdBdCgZddgZd$dd%efgZd&d'„ Z d(d)„ Z
d*d+„ Zd,d-„ Zd.d/„ Z
d0d1„ Zd2d3„ Zd4efd5e
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 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 Ú
executableÚparallel)Úselfr r r Úinitialize_options8 s zbuild.initialize_optionsc C sZ | j d krtƒ | _ ntjdkr&tdƒ‚d| j ftjd d… ˜ }ttdƒrR|d7 }| jd krntj j
| jdƒ| _| jd krŽtj j
| jd| ƒ| _| j
d kr²| jjrª| j| _
n| j| _
| jd krÒtj j
| jd| ƒ| _| jd krütj j
| jd tjd d… ƒ| _| jd k�rtj jtjƒ| _t| jtƒ�rVyt| jƒ| _W n tk
�rT td
ƒ‚Y nX d S )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&