\bg 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)NF) install_dir build_dirr r optimize skip_buildselfs z/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/setuptools/_distutils/command/install_lib.pyinitialize_optionszinstall_lib.initialize_options5s1   c 2|ddddddd|jd|_|jd |_t|jtsC t |j|_n#t $rYnwxYw|jd vrt d dSdS) Ninstall) build_libr)rr)r r )r r )rr)rrTF)rrzoptimize must be 0, 1, or 2)set_undefined_optionsr r isinstanceint ValueErrorrrs rfinalize_optionszinstall_lib.finalize_options>s ""  & *  " $ (    < DL = !DM$--- J  #DM 2 2     }I--*+HIII  J J .-sA-- A:9A:c||}|0|jr||dSdSdSN)buildr distributionhas_pure_modules byte_compileroutfiless rrunzinstall_lib.runYsb <<>>  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.buildis| . 1133 -  ,,, 0022 .  -----  . . . .rctj|jr!||j|j}n |d|jddS|S)N'z0' does not exist -- no Python modules to install)ospathisdirr copy_treerwarnr*s rrzinstall_lib.installpsf 7== ( ( ~~dnd6FGGHH IITDNTTT    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_compilezs  "  II= > > > F'''''' 11)<<A <  Lj#      =1   Lj#          rc|sgS||}|}t||}t|ttjzfd|D}|S)Nc`g|]*}tj|d+Sr%)r4r5join).0file output_dir prefix_lens r z/install_lib._mutate_outputs..s2WWW427<< D,=>>WWWr)r@ get_outputsgetattrlenr4sep) rhas_any build_cmd cmd_optionrI build_filesroutputsrJs ` @r_mutate_outputszinstall_lib._mutate_outputss} I..y99 ++-- Iz22 ^^c"&kk1 WWWWW;WWWrcg}|D]}tjtj|d}|tkrP|jr4|tj |d|j dkr9|tj ||j |S)Nr) optimizationr) r4r5splitextnormcasePYTHON_SOURCE_EXTENSIONr append 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.rr/)rUr'r(rr rcr1)r pure_outputsbytecode_outputs ext_outputss rrLzinstall_lib.get_outputss ++   . . 0 0       < "#77 EE  ! **   - - / /       ..<rxs!!  )))))) YYYYY'YYYYYr