\bgTBUdZddlmZddlZddlZddlZddlZddlZddlm Z m Z ddl m Z ddl mZmZddlmZddlmZd d lmZmZdd lmZdd lmZmZerdd lmZedZded<dZ dZ!dZ"d0dZ#GddeZ$e%&d'Z(ded<dZ)dZ*d0dZ+dd d!Z,d"Z-d#Z.d1d%Z/gd&Z0 d2d3d/Z1dS)4z6setuptools.command.bdist_egg Build .egg distributions) annotationsN)get_pathget_python_version)CodeType) TYPE_CHECKINGLiteral)Command)Library)StrPathTensure_directory)log)mkpath remove_tree) TypeAlias)rwxar _ZipFileModec tdS)Npurelib)rm/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/setuptools/command/bdist_egg.py _get_purelibrs I  rcd|vr%tj|d}|dr |dd}|S)N.rmodulei)ospathsplitextendswith)filenames r strip_moduler%#sM h7##H--a0""!CRC= Orc#Ktj|D]5\}}}|||||fV6dS)zbDo os.walk in a reproducible way, independent of indeterministic filesystem readdir order N)r walksort)dirbasedirsfiless r sorted_walkr-+s` WS\\  dE  D%  rreturnNonectjd}t|dd5}|||zddddS#1swxYwYdS)Na def __bootstrap__(): global __bootstrap__, __loader__, __file__ import sys, pkg_resources, importlib.util __file__ = pkg_resources.resource_filename(__name__, %r) __loader__ = None; del __bootstrap__, __loader__ spec = importlib.util.spec_from_file_location(__name__,__file__) mod = importlib.util.module_from_spec(spec) spec.loader.exec_module(mod) __bootstrap__() rutf-8encoding)textwrapdedentlstripopenwrite)resourcepyfile_stub_templatefs r write_stubr=5s_    fhh fcG , , ,+ )***++++++++++++++++++sAA#&A#cleZdZdZgdZgdZdZddZddZd Z d Z d Z d Z d Z ddZddZdZdS) bdist_eggzcreate an "egg" distribution))z bdist-dir=bz1temporary directory for creating the distribution)z plat-name=pzdplatform name to embed in generated filenames (by default uses `pkg_resources.get_build_platform()`))exclude-source-filesNz+remove all .py files from the generated egg) keep-tempkzPkeep the pseudo-installation tree around after creating the distribution archive)z dist-dir=dz-directory to put final built distributions in) skip-buildNz2skip rebuilding everything (for testing/debugging))rCrFrBchd|_d|_d|_d|_d|_d|_d|_dS)NF) bdist_dir plat_name keep_tempdist_dir skip_build egg_outputexclude_source_filesselfs rinitialize_optionszbdist_egg.initialize_options_s: $(!!!rr.r/c4|dx}|_|j|_|j?|dj}t j|d|_|jddl m }||_| dd|j p| t|jo|j}t j|j|dz|_ dSdS) Negg_infobdisteggr)get_build_platform)rKrK) py_versionplatformz.egg)get_finalized_commandei_cmdrSrH bdist_baser r!joinrI pkg_resourcesrVset_undefined_optionsrM_get_egg_basenamer distributionhas_ext_modulesrK)rPrZr[rVbasenames rfinalize_optionszbdist_egg.finalize_optionshs #99*EEE > !33G<<GJW\\*e< ! 8 8 8 8 8 8//11DN ""7,DEEE ? "//-//*::<<O0H !gll4=(V:KLLDOOO # "rc|j|d_tjtjt}|jj gc}|j_ |D]}t|trt|dkrtj |drtj|d}tj|}||ks"||tjzr"|t|dzd|df}|jj | t#jd|j|ddd||j_ dS#||j_ wxYw) Ninstallr rzinstalling package data to %s install_dataF)forceroot)rHrY install_libr r!normcaserealpathrr` data_files isinstancetuplelenisabs startswithsepappendrinfo call_command)rP site_packagesolditemrl normalizeds rdo_install_datazbdist_egg.do_install_datas<@N""9--9(()9)9,..)I)IJJ ,0,=,H")T  ) 6 6D$&& K3t99>>7==a))K!w//Q88H!#!1!1(!;!;J!]22j6K6K%.772 (M(:(:Q(>(@(@A47J   ( / / 5 5 5 5 / H4dn E E E   nE  E E E+.D  ( ( (3D  ( . . . .s 2GGc|jgS)N)rMrOs r get_outputszbdist_egg.get_outputss   rc tD]}|||j|d|j|d|j|j|fi|}|||S)z8Invoke reinitialized command `cmdname` with keyword argsrLdry_run)INSTALL_DIRECTORY_ATTRS setdefaultrHrLrreinitialize_command run_command)rPcmdnamekwdirnamecmds rrvzbdist_egg.call_commands. 3 3G MM'4> 2 2 2 2 lDO444 i...'d'66266 !!! rc |dtjd|j|d}|j}d|_|jr|js|d| dd}||_| \}}g|_ g}t|D]\}}tj|\} } tj|jt#| dz} |j | tjd ||js-t)tj|| || |tjd ||<|r|||jjr||j} tj| d } || |jjrMtj| d }tjd || d|d|| tj| d}|rtjd||jsvt=|t?|dd5}| d|| ddddn #1swxYwYnOtj!|r0tjd||jstj"|tGtj| d |$tj%tj|j&drtj'd|j(r|)tU|j+| |j,|j|-|j.st_|j|jta|jdgdtc|j+fdS)NrSzinstalling library code to %sre build_clibrjF)warn_dir.pyzcreating stub loader for %s/EGG-INFOscriptszinstalling scripts to %sinstall_scriptsT) install_dirno_epznative_libs.txtz writing %swtr1r2 z removing %sz depends.txtzxWARNING: 'depends.txt' will not be used by setuptools 0.6! Use the install_requires/extras_require setup() args instead.)verbosermoder dist_filesr?)2rrrurHrYrir`has_c_librariesrLrvget_ext_outputsstubs enumerater r!r"r\r%rtrr=rbreplacers byte_compilermr{rrcopy_metadata_tor r7r8isfileunlinkwrite_safety_flagzip_safeexistsrSwarnrN zap_pyfiles make_zipfilerMr gen_headerrJrgetattrr)rPinstcmdold_rootr all_outputs ext_outputs to_compilerAext_namer$_extr: archive_rootrS script_dir native_libs libs_files rrunz bdist_egg.runs $$$ 0$.AAA,,Y77<   , , . . +t +   \ * * * >> #'#7#7#9#9 [  $[11 ; ;KAxW--h77NHdW\\$.,x2H2H52PQQF J  f % % % H2H = = =< ?27++H55v>>>   f % % %%--bfc::KNN  )   Z ( ( (   ' #  " " "~ 7<< j99 H   $ Uh ::J H/ < < <   /Zt  T T T h'''gll8->??  ' H\; / / /< * ---+tg>>>*)OODIIk$:$:;;;OOD)))***************W^^K ( ( ' H]K 0 0 0< ' +&&&"',,|Z@@$--//RRR 7>>"',,t}mDD E E  HP     $         O LL""     ~ >  = = = = !<44;;   O=      s >MMMc tjdt|jD]1\}}}|D]&}tj||}|dr)tjd|t j ||dr|}d}tj ||}tj|tj | ddz} tjd|d | d  t j| n#t$rYnwxYwt j|| (3dS) Nz+Removing .py files from temporary directoryrz Deleting %s __pycache__z#(?P.+)\.(?P[^.]+)\.pycname.pyczRenaming file from [z] to [])rruwalk_eggrHr r!r\r#debugrrematchpardirgroupremoveOSErrorrename) rPr*r+r,rr!path_oldpatternmpath_news rrzbdist_egg.zap_pyfilessZ >???!)$.!9!9 2 2 D$ 2 2w||D$//==''$ImT222IdOOO==// 2#HDG$//A!w||D")QWWV__v=UVVHHH(((HHHUVVV (++++"Ih111% 2 2 2sD33 E?Ect|jdd}||Stjdt |j|jS)Nrz4zip_safe flag not set; analyzing archive contents...)rr`rr analyze_eggrHr)rPsafes rrzbdist_egg.zip_safesFt(*d;;  K GHHH4>4:666r Literal['w']cdS)NrrrOs rrzbdist_egg.gen_headerssrctj|j}tj|d}|jjjD]q}||rZtj||t|d}t|| ||rdS)z*Copy metadata (egg info) to the target_dirN) r r!normpathrSr\rZfilelistr,rrrpr copy_file)rP target_dir norm_egg_infoprefixr!targets rrzbdist_egg.copy_metadata_tos((77 mR00K(. - -Dv&& -j$s6{{}}2EFF (((tV,,,  - -rc g}g}|jdi t|jD]\\ }}| fd|D|D]1} |zdz tj |<2]|jr|d}|j D]}t|tr| |j }||}tj|dsWtjtj|j|r||||fS)zAGet a list of relative paths to C extensions in the output distrorc3K|]M}tj|dtv@|zVNdS)rfN)r r!r"lowerNATIVE_EXTENSIONS).0r$r*pathss r z,bdist_egg.get_ext_outputs../se7##H--a066888&L&LMM5#**8444K''rNr.r/)r.r)__name__ __module__ __qualname__ description user_optionsboolean_optionsrQrcr{r}rvrrrrrrrrrr?r?Gs2KL&JIIO)))MMMM0////2!!!R R R h222.777 - - - -(((((rr?z.dll .so .dylib .pydzdict[str, None]rc#Kt|}t|\}}}d|vr|d|||fV|Ed{VdS)z@Walk an unpacked egg's contents, skipping the metadata directoryrN)r-nextr)egg_dirwalkerr*r+r,s rrrHss  ! !FV D$T J e rctD]G\}}tjtj|d|r|cSHt sdSd}t|D]t\}}}|D]k}|ds|dr-|ds|drt||||o|}lu|S)NrFTrz.pywrz.pyo) safety_flagsitemsr r!rr\can_scanrr# scan_module) rrflagfnrr*r+r,rs rrrRs &&((b 7>>"',,w B?? @ @ KKK  ::u D%g..HHdE H HD}}U## Ht}}V'<'< Hv&& H$--*?*? H"7D$>>G4  H KrctD]\}}tj||}tj|r*|t ||krtj|n|Rt ||kr?t|dd5}| ddddn #1swxYwYdS)Nrr1r2r) rrr r!r\rboolrr7r8)rrrrr<s rrrds &&((b W\\'2 & & 7>>"   |tDzzT11 "  $t**"4"4b$111 Q                 s/CC C zzip-safez not-zip-safe)TFctj||}|dd|vrdS|t|dzdtjd}||rdpdztj|dz}d}t|d }||tj |} | d} t t| } d D]} | | vrtjd || d } d | vr!dD]} | | vrtjd|| d } | S)z;Check whether module possibly uses unsafe-for-zipfile stuffNTrfrrrrb)__file____path__z%s: module references %sFinspect) getsource getabsfilegetfile getsourcefilegetsourcelines findsource getcomments getframeinfogetinnerframesgetouterframesstacktracez"%s: module MAY be using inspect.%s)r r!r\rprrsr"r7readmarshalloadclosedictfromkeys iter_symbolsrr) rr*rrr$pkgrskipr<codersymbolsbads rrrvs`w||D$''H}t s7||a!! " * *263 7 7C CKC%2 &)9)9$)?)?)B BF D XtAFF4LLL <??DGGIII DmmL..//G' '>> H/ = = =DG    Cg~~=vsKKK Krc#K|jEd{V|jD]F}t|tr|Vt|trt |Ed{VGdS)zBYield names and strings used by `code` and its nested code objectsN)co_names co_constsrnstrrr)rconsts rrrs}++ eS ! ! +KKKK x ( ( +#E** * * * * * * * ++rrctjdstjdkrdStjdtjddS)NjavacliTz1Unable to analyze compiled code on this platform.zfPlease ask the author to include a 'zip_safe' setting (either True or False) in the package's setup.pyF)sysrXrrrrrrrrrs] < " "6 * *s|u/D/DtH @AAAH D 5r)rjrrg install_baseFTr zip_filenamer rrrcddl}ttj|t jd|fd}|r|jn|j}sP| |||} tD]\} } } || | | | n#tD]\} } } |d| | |S)aqCreate a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".zip". Uses either the "zipfile" Python module (if available) or the InfoZIP "zip" utility (if installed and found on the default search path). If neither tool is available, raises DistutilsExecError. Returns the name of the output zip file. rNrz#creating '%s' and adding '%s' to itcX|D]}tjtj||}tj|rG|t dzd}s|||tjd|dS)Nrfz adding '%s') r r!rr\rrpr8rr)zrnamesrr!rAbase_dirrs rvisitzmake_zipfile..visits , ,D7##BGLL$$?$?@@Dw~~d## ,X*,,-%GGD!$$$ -+++  , ,r) compression) zipfilerr r!rrru ZIP_DEFLATED ZIP_STOREDZipFiler-r) r!r&rrcompressrr)r'r(r$rr+r,s ` ` rrrsNNN 27??< ( ('::::H 2L(KKK,,,,,,+3J'&&8JK ( OOL$KO H H$/$9$9 % % GT5 E!We $ $ $ $  $/$9$9 ( ( GT5 E$ ' ' ' ' rr)r.r)FFTr) r!r rrrrrrr.r )2__doc__ __future__rr r rrr4 sysconfigrrtypesrtypingrr setuptoolsr setuptools.extensionr _pathr r distutilsrdistutils.dir_utilrrtyping_extensionsrr__annotations__rr%r-r=r?rrsplitrrrrrrrrrrrrrr;s#""""" 22222222))))))))((((((........22222222,++++++""45 5555   ++++${({({({({({({({(|&*]]3I3O3O3Q3Q%R%RRRRR$       %%%P+++    YXX   %%%%%%%r