ef@NdZddlmZmZddlmZddlmZddlZddl Z ddl Z ddl Z ddl Z ddl mZddlmZdd lmZdd lmZmZd Zd Zd ZdZGddeZedZdZdZ dZ!dddZ"dZ#dZ$dZ%gdZ&ddZ'dS) z6setuptools.command.bdist_egg Build .egg distributions) remove_treemkpath)log)CodeTypeN)Library)Command)ensure_directory)get_pathget_python_versionc tdS)Npurelib)r |/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/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_modulersM h7##H--a0""!CRC= Orc#Ktj|D]5\}}}|||||fV6dS)zbDo os.walk in a reproducible way, independent of indeterministic filesystem readdir order N)rwalksort)dirbasedirsfiless r sorted_walkr#!s` WS\\  dE  D%  rctjd}t|d5}|||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__() w)textwrapdedentlstripopenwrite)resourcepyfile_stub_templatefs r write_stubr/+s_    fhh fc  +a )***++++++++++++++++++sAA!$A!cdeZdZdZgdZgdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdS) 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))r5r8r4chd|_d|_d|_d|_d|_d|_d|_dS)Nr) bdist_dir plat_name keep_tempdist_dir skip_build egg_outputexclude_source_filesselfs rinitialize_optionszbdist_egg.initialize_optionsUs: $(!!!rc4|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)r=r=) py_versionplatformz.egg)get_finalized_commandei_cmdrEr: bdist_baserrjoinr; pkg_resourcesrHset_undefined_optionsr?_get_egg_basenamer distributionhas_ext_modulesr=)rBrLrMrHbasenames rfinalize_optionszbdist_egg.finalize_options^s #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_data)forceroot)r:rK install_librrnormcaserealpathrrR data_files isinstancetuplelenisabs startswithsepappendrinfo call_command)rB site_packagesolditemr^ normalizeds rdo_install_datazbdist_egg.do_install_datavs<@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   nAD  A A A+.D  ( ( (3D  ( . . . .s 2GGc|jgS)N)r?rAs r get_outputszbdist_egg.get_outputss   rc tD]}|||j|d|j|d|j|j|fi|}|||S)z8Invoke reinitialized command `cmdname` with keyword argsr>dry_run)INSTALL_DIRECTORY_ATTRS setdefaultr:r>rqreinitialize_command run_command)rBcmdnamekwdirnamecmds rrhzbdist_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||jspt=|t?|d}| d|| d|!nOtj"|r0tjd||jstj#|tItj| d |%tj&tj|j'drtj(d|j)r|*tW|j,| |j-|j|.|j/sta|j|jtc|jdgdte|j,fdS)NrEzinstalling library code to %srW build_clibr\r)warn_dir.pyzcreating stub loader for %s/EGG-INFOscriptszinstalling scripts to %sinstall_scriptsrX) install_dirno_epznative_libs.txtz writing %swt z removing %sz depends.txtzxWARNING: 'depends.txt' will not be used by setuptools 0.6! Use the install_requires/extras_require setup() args instead.)verboserqmoderq dist_filesr1)3rurrgr:rKr[rRhas_c_librariesr>rhget_ext_outputsstubs enumeraterrrrNrrfrqr/rTreplacere byte_compiler_rmrrcopy_metadata_tor r)r*closeisfileunlinkwrite_safety_flagzip_safeexistsrEwarnr@ zap_pyfiles make_zipfiler?r gen_headerr<rgetattrr )rBinstcmdold_rootry all_outputs ext_outputs to_compiler3ext_namerextr, archive_rootrE script_dir native_libs libs_files rrunz bdist_egg.runsv $$$ 0$.AAA,,Y77<   , , . . +t +   \ * * * :: #'#7#7#9#9 [  $[11 ; ;KAxG,,X66MHcW\\$.,x2H2H52PQQF J  f % % % H2H = = =< ?27++H55v>>>   f % % %%--bfc::KNN  )   Z ( ( (   ' #  " " "~ 7<< j99 H   $ Rh ::J H/ < < <   /Zq  Q Q Q h'''gll8->??  ' H\; / / /< " --- d33  + 6 6777%%%!!! W^^K ( ( ' H]K 0 0 0< ' +&&&"',,|Z@@$--//RRR 7>>"',,t}mDD E E  HP     $         O LL""     ~ >  = = = = !<44;; ,.. @     rc 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 directoryr}z Deleting %s __pycache__z#(?P.+)\.(?P[^.]+)\.pycname.pyczRenaming file from [z] to [])rrgwalk_eggr:rrrNrdebugrrematchpardirgroupremoveOSErrorrename) rBr r!r"rrpath_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...)rrRrr analyze_eggr:r)rBsafes rrzbdist_egg.zip_safesFt(*d;;  K GHHH4>4:666rcdS)Nr%rrAs rrzbdist_egg.gen_header ssrctj|j}tj|d}|jjjD]q}||rZtj||t|d}t|| ||rdS)z*Copy metadata (egg info) to the target_dirN) rrnormpathrErNrLfilelistr"rdrbr copy_file)rB target_dir norm_egg_infoprefixrtargets rrzbdist_egg.copy_metadata_tos((77 mR00K(. - -Dv&& -j$s6{{}}2EFF (((tV,,,  - -rcg}g}|jdi}t|jD]\}}}|D]^}tj|dt vr||||z_|D]1}|||zdz|tj||<2|j r| d}|j D]} t| tr|| j} || }tj|dsWtjtj|j|r||||fS)zAGet a list of relative paths to C extensions in the output distrorrXr~ build_extzdl-)r:r#rrrlowerNATIVE_EXTENSIONSrfrNrRrSrK extensionsr`rget_ext_fullnamerget_ext_filenamerTrdr) rBrrpathsr r!r"r build_cmdrfullnames rrzbdist_egg.get_ext_outputss  $!,T^!>>  S S6;DkH6Ls6Rbgll42233 S   , , . . 522;??I + 5 5c7++$55ch??$55h??w''11<8&L&LMM5#**8444K''rN)__name__ __module__ __qualname__ description user_optionsboolean_optionsrCrUrmrorhrrrrrrrrrr1r1=s2KL&JIIO)))MMM0///2!!!Q Q Q f222.777 - - -(((((rr1z.dll .so .dylib .pydc#Kt|}t|\}}}d|vr|d|||fV|D]}|VdS)z@Walk an unpacked egg's contents, skipping the metadata directoryrN)r#nextr)egg_dirwalkerr r!r"bdfs rrr;sy  ! !FV D$T J e  rctD]G\}}tjtj|d|r|cSHt sdSd}t|D]t\}}}|D]k}|ds|dr-|ds|drt||||o|}lu|S)NrFTr}z.pywrz.pyo) safety_flagsitemsrrrrNcan_scanrr scan_module) rrflagfnrr r!r"rs rrrFs &&((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|Lt ||kr9t|d}| d| dS)Nrr) rrrrrNrboolrr)r*r)rrrrr.s rrrXs &&((b W\\'2 & & 7>>"   |tDzzT11 "  $t**"4"4RA GGDMMM GGIIIrzzip-safez not-zip-safe)TFctj||}|dd|vrdS|t|dzdtjd}||rdpdztj|dz}tjdkrd }nd }t|d }| |tj |} | d} tt!| } d D]} | | vrt#jd || d} d| vr!dD]} | | vrt#jd|| d} | S)z;Check whether module possibly uses unsafe-for-zipfile stuffNTrXrrr) rb)__file____path__z%s: module references %sFinspect) getsource getabsfile getsourcefilegetfilegetsourcelines findsource getcomments getframeinfogetinnerframesgetouterframesstacktracez"%s: module MAY be using inspect.%s)rrrNrbrrersys version_infor)readmarshalloadrdictfromkeys iter_symbolsrr) rr rrrpkgrskipr.codersymbolsbads rrrksuw||D$''H}t s7||a!! " * *263 7 7C CKC%2 &)9)9$)?)?)B BF &   XtAFF4LLL <??DGGIII DmmL..//G' '>> H/ = = =DG    Cg~~=vsKKK Krc#K|jD]}|V|jD]G}t|tr|Vt|trt |D]}|VHdS)zBYield names and strings used by `code` and its nested code objectsN)co_names co_constsr`strrr)rrconsts rrrs   eS ! ! KKKK x ( ( $U++   rctjdstjdkrdStjdtjddS)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.py)rrJrdrrrrrrrs` < " "6 * *s|u/D/DtH @AAAH Dr)r\rrY install_baseTr%cddl}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)NrXz adding '%s') rrrrNrrbr*rr)zrxnamesrrr3base_dirrqs rvisitzmake_zipfile..visits , ,D7##BGLL$$?$?@@Dw~~d## ,X*,,-%GGD!$$$ -+++  , ,r) compression) zipfilerrrrxrrg ZIP_DEFLATED ZIP_STOREDZipFiler#r) zip_filenamerrrqcompressrrrrrrxr!r"s ` ` rrrsNNN 27??< ( ('::::H 2L(KKK,,,,,,+3J'&&8JK ( OOL$KO H H$/$9$9 % % GT5 E!We $ $ $ $  $/$9$9 ( ( GT5 E$ ' ' ' ' r)rrTr%)(__doc__distutils.dir_utilrr distutilsrtypesrrrrr&rsetuptools.extensionr setuptoolsr_pathr sysconfigr r rrr#r/r1rrsplitrrrrrrrrrrrrrrr&s32222222 (((((($$$$$$22222222   +++$x(x(x(x(x(x(x(x(vMM"8">">"@"@AA$      '''T   YXXr