�
��c @s�dZddkZddkZddkZddklZddklZddkl Z e
ed�oeidZndZd efd
��YZ
dS(s8$Id: install_lib.py 37946 2004-12-02 20:14:16Z lemburg $i�N(tIntType(tCommand(tDistutilsOptionErrortextseptpys.pytinstall_libc Bs�eZdZddd d!d#d$d%gZdd
dgZhd
d
<Zd�Zd�Zd�Z d�Z
d�Zd�Zd�Z
d�Zd�Zd�ZRS(&s7install all Python modules (extensions and pure Python)sinstall-dir=tdsdirectory to install tos
build-dir=tbs'build directory (where to install from)tforcetfs-force installation (overwrite existing files)tcompiletcscompile .py to .pyc [default]s
no-compilesdon't compile .py filess optimize=tOslalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]s
skip-buildsskip the build stepscCs:d|_d|_d|_d|_d|_d|_dS(Ni(tNonetinstall_dirt build_dirRR
toptimizet
skip_build(tself((s0/sys/lib/python/distutils/command/install_lib.pytinitialize_options4s c Cs�|iddddddd�|idjo
d
|_n|idjo
d|_nt|i�tj ogy>t|i�|_d|ijo
djnpt�Wq�ttfj
ot d
�q�XndS(Ntinstallt build_libRRRRR
RRiiisoptimize must be 0, 1, or 2(s build_libs build_dir(sinstall_libsinstall_dir(sforcesforce(scompilescompile(soptimizesoptimize(s
skip_builds
skip_build(
tset_undefined_optionsR
R
RttypeRtinttAssertionErrort
ValueErrorR(R((s0/sys/lib/python/distutils/command/install_lib.pytfinalize_options=s"
,cCsH|i�|i�}|dj o!|ii�o|i|�ndS(N(tbuildRR
tdistributionthas_pure_modulestbyte_compile(Rtoutfiles((s0/sys/lib/python/distutils/command/install_lib.pytrunWs
cCsT|ipF|ii�o|id�n|ii�o|id�qPndS(Ntbuild_pyt build_ext(RRRtrun_commandthas_ext_modules(R((s0/sys/lib/python/distutils/command/install_lib.pyRks
cCsNtii|i�o|i|i|i�}n|id|i�dS|S(Ns3'%s' does not exist -- no Python modules to install(tostpathtisdirRt copy_treeRtwarn(RR ((s0/sys/lib/python/distutils/command/install_lib.pyRrs c
Cs�ddkl}|id�i}|io,||ddd|id|d|i�n|idjo8||d|id|id|d |id|i�ndS(
Ni�(RRRiRtprefixtdry_runtverbose( tdistutils.utilRtget_finalized_commandtrootR
RR,RR-(RtfilesRtinstall_root((s0/sys/lib/python/distutils/command/install_lib.pyR{s
c
Cs�|pgSn|i|�}|i�}t||�}t|�tti�}g}x.|D]&} |itii|| |��q_W|S(N( R/tget_outputstgetattrtlenR&tseptappendR'tjoin(
Rthas_anyt build_cmdt
cmd_optiont
output_dirtbuild_filesRt
prefix_lentoutputstfile((s0/sys/lib/python/distutils/command/install_lib.pyt_mutate_outputs�s$cCs�g}x�|D]�}tiitii|��d}|tjoq
n|io|i|d�n|idjo|i|d�q
q
W|S(NiRito(R&R'tsplitexttnormcasetPYTHON_SOURCE_EXTENSIONR
R7R(Rtpy_filenamestbytecode_filestpy_filetext((s0/sys/lib/python/distutils/command/install_lib.pyt_bytecode_filenames�s"
cCsw|i|ii�dd|i�}|io|i|�}ng}|i|ii�dd|i�}|||S(s�Return the list of files that would be installed if this command
were actually run. Not affected by the "dry-run" flag or whether
modules have actually been built yet.
R"RR#(RARRRR
RJR%(Rtpure_outputstbytecode_outputstext_outputs((s0/sys/lib/python/distutils/command/install_lib.pyR3�s
cCsvg}|ii�o&|id�}|i|i��n|ii�o&|id�}|i|i��n|S(s�Get the list of files that are input to this command, ie. the
files that get installed as they are named in the build tree.
The files in this list correspond one-to-one to the output
filenames returned by 'get_outputs()'.
R"R#(RRR/textendR3R%(RtinputsR"R#((s0/sys/lib/python/distutils/command/install_lib.pyt
get_inputs�s(sinstall-dir=Rsdirectory to install to(s
build-dir=Rs'build directory (where to install from)(sforceR s-force installation (overwrite existing files)(scompileRscompile .py to .pyc [default]N(s
no-compileNsdon't compile .py files(s optimize=Rslalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0](s
skip-buildNsskip the build steps(t__name__t
__module__tdescriptionR
tuser_optionstboolean_optionstnegative_optRRR!RRRRARJR3RP(((s0/sys/lib/python/distutils/command/install_lib.pyRs* (t__revision__tsysR&tstringttypesRtdistutils.coreRtdistutils.errorsRthasattrRRER(((s0/sys/lib/python/distutils/command/install_lib.pys<module>s$
|