&UdZddlmZddlZddlZddlZddlZddlZddlm Z m Z m Z ddl m Z ddlmZmZddlmZddlmZd d lmZmZdd lmZdd lmZmZerdd lmZedZde d<dZ!dZ"dZ#d0dZ$GddeZ%e&'d(Z)de d<dZ*dZ+d0dZ,dd d!Z-d"Z.d#Z/d1d%Z0gd&Z1 d2d3d/Z2dS)4z6setuptools.command.bdist_egg Build .egg distributions) annotationsN)get_path get_platformget_python_version)CodeType) TYPE_CHECKINGLiteral)Command)Library)StrPathTensure_directory)log)mkpath remove_tree) TypeAlias)rwxar _ZipFileModec tdS)Npurelib)rn/builddir/build/BUILD/cloudlinux-venv-1.0.10/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, importlib.resources as irs, importlib.util with irs.as_file(irs.files(__name__).joinpath(%r)) as __file__: __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=pzZplatform name to embed in generated filenames (by default uses `sysconfig.get_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))rDrGrCchd|_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/r0c0|dx}|_|j|_|j?|dj}t j|d|_|jt|_| dd|j p| t|jo|j}t j|j|dz|_ dSdS)Negg_infobdistegg)rLrL) py_versionplatformz.egg)get_finalized_commandei_cmdrTrI bdist_baser!r"joinrJrset_undefined_optionsrN_get_egg_basenamer distributionhas_ext_modulesrL)rQrZr[basenames rfinalize_optionszbdist_egg.finalize_optionshs#99*EEE > !33G<<GJW\\*e< !)^^DN ""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)rIrY install_libr!r"normcaserealpathrr_ data_files isinstancetuplelenisabs startswithsepappendrinfo call_command)rQ site_packagesolditemrk normalizeds rdo_install_datazbdist_egg.do_install_data~s<@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)rNrPs r get_outputszbdist_egg.get_outputss   rc tD]}|||j|d|j|d|j|j|fi|}|||S)z8Invoke reinitialized command `cmdname` with keyword argsrMdry_run)INSTALL_DIRECTORY_ATTRS setdefaultrIrMr~reinitialize_command run_command)rQcmdnamekwdirnamecmds rruzbdist_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)NrTzinstalling library code to %srd build_clibriF)warn_dir.pyzcreating stub loader for %s/EGG-INFOscriptszinstalling scripts to %sinstall_scriptsT) install_dirno_epznative_libs.txtz writing %swtr2r3 z removing %sz depends.txtzxWARNING: 'depends.txt' will not be used by setuptools 0.6! Use the install_requires/extras_require setup() args instead.)verboser~moder~ dist_filesr@)2rrrtrIrYrhr_has_c_librariesrMruget_ext_outputsstubs enumerater!r"r#r\r&rsr~r>rareplacerr byte_compilerlrzrrcopy_metadata_torr8r9isfileunlinkwrite_safety_flagzip_safeexistsrTwarnrO zap_pyfiles make_zipfilerNr gen_headerrKrgetattrr)rQinstcmdold_rootr all_outputs ext_outputs to_compilerBext_namer%_extr; archive_rootrT 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 [])rrtwalk_eggrIr!r"r\r$debugrrematchpardirgroupremoveOSErrorrename) rQr+r,r-rr"path_oldpatternmpath_news rrzbdist_egg.zap_pyfiless_ >???!)$.!9!9 2 2 D$ 2 2w||D$//==''$ImT222IdOOO==// 2#HDG$//A!w||D")QWWV__v=UVVHHOHOOHOOOPPP (++++"Ih111% 2 2 2sD33 E?Ect|jdd}||Stjdt |j|jS)Nrz4zip_safe flag not set; analyzing archive contents...)rr_rr analyze_eggrIr)rQsafes rrzbdist_egg.zip_safesFt(*d;;  K GHHH4>4:666r Literal['w']cdS)NrrrPs 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"normpathrTr\rZfilelistr-rqror copy_file)rQ 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)reN)r!r"r#lowerNATIVE_EXTENSIONS).0r%r+pathss r z,bdist_egg.get_ext_outputs..-se7##H--a066888&L&LMM5#**8444K''rNr/r0)r/r)__name__ __module__ __qualname__ description user_optionsboolean_optionsrRrbrzr|rurrrrrrrrrr@r@Gs0KL&JIIO)))MMMM,////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 rrrFss  ! !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 rrrPs &&((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)Nrr2r3r) rrr!r"r\rboolrr8r9)rrrrr=s rrrbs &&((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 stuffNTrerrrrb)__file____path__z%s: module references %sFinspect) getsource getabsfilegetfile getsourcefilegetsourcelines findsource getcomments getframeinfogetinnerframesgetouterframesstacktracez"%s: module MAY be using inspect.%s)r!r"r\rorrrr#r8readmarshalloadclosedictfromkeys iter_symbolsrr) rr+rrr%pkgr skipr=codersymbolsbads rrrts`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_constsrmstrrr)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)sysrXrqrrrrrrrs] < " "6 * *s|u/D/DtH @AAAH D 5r)rirrf install_baseFTr zip_filenamer rr~rcddl}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)Nrez adding '%s') r!r"rr\rror9rr)zrnamesrr"rBbase_dirr~s rvisitzmake_zipfile..visits , ,D7##BGLL$$?$?@@Dw~~d## ,X*,,-%GGD!$$$ -+++  , ,r) compression) zipfilerr!r"rrrt ZIP_DEFLATED ZIP_STOREDZipFiler.r ) r r%rr~compressrr(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 rrr~rrrr/r )3__doc__ __future__rr r!rrr5 sysconfigrrrtypesrtypingrr setuptoolsr setuptools.extensionr _pathr r distutilsrdistutils.dir_utilrrtyping_extensionsrr__annotations__rr&r.r>r@rrsplitrrrrrrrrrrrrrr:s#""""" @@@@@@@@@@))))))))((((((........22222222,++++++""45 5555   ++++$y(y(y(y(y(y(y(y(x&*]]3I3O3O3Q3Q%R%RRRRR$       %%%P+++    YXX   %%%%%%%r