³ò žl‡Jc @s›dZddkZddkZddkZddklZddklZddkl Z e edƒoei dZ ndZ d efd „ƒYZ dS( s8$Id: install_lib.py 37946 2004-12-02 20:14:16Z lemburg $iÿÿÿÿN(tIntType(tCommand(tDistutilsOptionErrortextseptpys.pyt install_libc Bs¡eZdZddd d!d#d$d%gZdd dgZhd d t|iƒ|_d |ijo d jnpt‚WqÖttfj ot d ‚qÖXndS(Ntinstallt build_libRRRRR RRiiisoptimize must be 0, 1, or 2(s build_libs build_dir(s install_libs install_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 t distributionthas_pure_modulest byte_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(RRRt run_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-(RtfilesRt install_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/t get_outputstgetattrtlenR&tseptappendR'tjoin( Rthas_anyt build_cmdt cmd_optiont output_dirt build_filesRt prefix_lentoutputstfile((s0/sys/lib/python/distutils/command/install_lib.pyt_mutate_outputss $cCs•g}xˆ|D]€}tiitii|ƒƒd}|tjoq n|io|i|dƒn|idjo|i|dƒq q W|S(NiR ito(R&R'tsplitexttnormcasetPYTHON_SOURCE_EXTENSIONR R7R(Rt py_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%(Rt pure_outputstbytecode_outputst ext_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(s install-dir=Rsdirectory to install to(s build-dir=Rs'build directory (where to install from)(sforceR s-force installation (overwrite existing files)(scompileR scompile .py to .pyc [default]N(s no-compileNsdon't compile .py files(s optimize=R slalso 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__t descriptionR t user_optionstboolean_optionst negative_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.pyss$