źh ZdZddlZddlZddlZddlmZddlmZdZ GddeZ dS) zkdistutils.command.install_lib Implements the Distutils 'install_lib' command (install all Python modules).N)Command)DistutilsOptionErrorz.pycfeZdZdZgdZgdZddiZdZdZdZ d Z d Z d Z d Z d ZdZdZdS) install_libz7install all Python modules (extensions and pure Python)))z install-dir=dzdirectory to install to)z build-dir=bz'build directory (where to install from))forcefz-force installation (overwrite existing files))compileczcompile .py to .pyc [default]) no-compileNzdon't compile .py files)z optimize=Ozlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]) skip-buildNzskip the build steps)r r rrr cZd|_d|_d|_d|_d|_d|_dS)Nr) install_dir build_dirr r optimize skip_buildselfs /builddir/build/BUILD/imunify360-venv-2.5.2/opt/imunify360/venv/lib/python3.11/site-packages/setuptools/_distutils/command/install_lib.pyinitialize_optionszinstall_lib.initialize_options6s1   c H|ddddddd|jd|_|jd |_t|jtsP t |j|_|jd vrt dS#t t f$rtd wxYwdS) Ninstall) build_libr)rr)r r )r r )rr)rrTF)rrzoptimize must be 0, 1, or 2)set_undefined_optionsr r isinstanceintAssertionError ValueErrorrrs rfinalize_optionszinstall_lib.finalize_options?s ""  & *  " $ (    < DL = !DM$--- J J #DM 2 2 = 11((21/ J J J*+HIII J  J Js )A>>!Bc||}|0|jr||dSdSdSN)buildr distributionhas_pure_modules byte_compileroutfiless rrunzinstall_lib.runZsb <<>>  D$5$F$F$H$H    h ' ' ' ' '   rc|js^|jr|d|jr|ddSdSdS)Nbuild_py build_ext)rr(r) run_commandhas_ext_modulesrs rr'zinstall_lib.buildjs| . 1133 -  ,,, 0022 .  -----  . . . .rctj|jr!||j|j}n|d|jzdS|S)Nz3'%s' does not exist -- no Python modules to install)ospathisdirr copy_treerwarnr+s rrzinstall_lib.installqs` 7== ( ( ~~dnd6FGGHH IIEV    Frc2tjr|ddSddlm}|dj}|jr||d|j||j |j dkr'|||j |j||j |j dSdS)Nz%byte-compiling is disabled, skipping.r)r*rr)rr prefixdry_run)rr r:verboser;) sysdont_write_bytecoder8utilr*get_finalized_commandrootr r r;rr<)rfilesr* install_roots rr*zinstall_lib.byte_compile{s  "  II= > > > F'''''' 11)<<A <  Lj#      =1   Lj#          rc V|sgS||}|}t||}t|ttjz}g}|D]=} |tj|| |d>|Sr&) r@ get_outputsgetattrlenr4sepappendr5join) rhas_any build_cmd cmd_option output_dir build_filesr prefix_lenoutputsfiles r_mutate_outputszinstall_lib._mutate_outputss I..y99 ++-- Iz22 ^^c"&kk1  H HD NN27<< D4EFF G G G Grcg}|D]}tjtj|d}|tkrP|jr4|tj |d|j dkr9|tj ||j |S)Nr) optimizationr) r4r5splitextnormcasePYTHON_SOURCE_EXTENSIONr rI importlibr?cache_from_sourcer)r py_filenamesbytecode_filespy_fileexts r_bytecode_filenameszinstall_lib._bytecode_filenamess#  G'""27#3#3G#<#<==a@C---| %%N44W24NN}q  %%N44dm5 rc ||jdd|j}|jr||}ng}||jdd|j}||z|zS)zReturn 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/rr0)rSr(r)rr r`r2)r pure_outputsbytecode_outputs ext_outputss rrEzinstall_lib.get_outputss ++   . . 0 0       < "#77 EE  ! **   - - / /       ..<rus!!   )))))) [[[[['[[[[[r