ef`DddlZddlZddlZddlmZddlmZddlm Z m Z m Z m Z ddl mZddlmZddlmZddlmZmZdd lmZdd lmZdd lmZmZ ddlmZe d n #e!$reZYnwxYwed ddlm"Z#dZ$dZ%dZ&dZ'ej(dkrdZ&n*ej)dkr ddl*Z*e+e*dxZ&Z%n #e!$rYnwxYwdZ,dZ-GddeZe&s ej)dkr ddZ.dSdZ' ddZ.dS)NEXTENSION_SUFFIXES)cache_from_source)DictIteratorListTuple)Path) build_ext) new_compiler)customize_compilerget_config_var)log) BaseError) ExtensionLibraryzCython.Compiler.MainLDSHARED) _config_varscptjdkrtj} dtd<dtd<dtd<t |tjtj|dS#tjtj|wxYwt |dS)Ndarwinz0gcc -Wl,-x -dynamiclib -undefined dynamic_lookuprz -dynamiclibCCSHAREDz.dylibSO)sysplatform _CONFIG_VARScopyr clearupdate)compilertmps |/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/setuptools/command/build_ext.py_customize_compiler_for_shlibr" s |x!! %C  (6L $!)L  x ( ( (     $ $ $ $ $     $ $ $ $8$$$$$s -A;;)B$FsharedrTntRTLD_NOWctr|ndS)N) have_rtld)ss r!if_dlr*Ds !11r!c>tD]}d|vr|cS|dkr|cSdS)z;Return the file extension for an abi3-compliant Extension()z.abi3z.pydNr)suffixs r!get_abi3_suffixr.HsH$ f  MMM v  MMMr+cTeZdZUdZeed<dZeed<dZdede e e ffdZ dZ ded e de fd Z dee e e ffd Zd Zd ZdZdZdZdZdZdee fdZdee fdZdee fdZdee e ffdZdZdZddZdde defdZ de fdZ!dS)r F editable_modeinplacec|jdc}|_tj|||_|r|dSdS)z;Build extensions in build directory, then copy if --inplacerN)r1 _build_extruncopy_extensions_to_source)self old_inplaces r!r4z build_ext.runUsS$(L!! T\t"  -  * * , , , , , - -r+extreturnc||j}||}|d}d|dd}||}t j|t j|}t j|j |} || fS)N.) get_ext_fullnamenameget_ext_filenamesplitjoinget_package_dirospathbasename build_lib) r6build_pyr8fullnamefilenamemodpathpackage package_dir inplace_file regular_files r!_get_inplace_equivalentz!build_ext._get_inplace_equivalent]s((22((22..%%((73B3<((..w77 w||K1A1A(1K1KLL w||DNH== l++r+cf|d}|jD]}|||\}}tj|s|js||||j|j r.| ||}| ||ddS)NrG)levelT)compile) get_finalized_command extensionsrOrCrDexistsoptional copy_fileverbose _needs_stub_get_equivalent_stub_write_stub_file)r6rGr8rMrN inplace_stubs r!r5z#build_ext.copy_extensions_to_sourcegs--j99? G GC)-)E)EhPS)T)T &L, w~~l++ O3< O|\NNN G#88lKK %%lC%FFF G Gr+ output_filectj|}|jd\}}}tj||dSNr;.py)rCrDdirnamer> rpartitionrA)r6r8r]dir__r>s r!rZzbuild_ext._get_equivalent_stubxsOw{++X((-- 1d',,tT**////r+c#K|jsdS|d}|djpd}|jD]|}|||\}}||fV|jrT|||}|||}t||}t||} | |fV}dS)NrG install_libr') optimization)r1rSoptimizerTrOrYrZ_compiled_file_name) r6rGoptr8rMrNr\ regular_stub inplace_cache output_caches r!_get_output_mappingzbuild_ext._get_output_mapping}s|  F--j99((77@FB? 4 4C)-)E)EhPS)T)T &L,. . . . 4 $88lKK #88lKK 3Ls S S S 2tr7t&j|jvr$|jt&jG|jr d|_dSdS)Nc<g|]}t|t|S)rwr).0r8s r! z.build_ext.finalize_options..s'RRRsC9Q9QRsRRRr+r;r<FT)r3finalize_optionsrTcheck_extensions_listrsetup_shlib_compilerr=r> _full_namertr@links_to_dynamicr|rwrr}rYr? _file_namerCrDrarArF library_dirsappendcurdirruntime_library_dirsr0r1)r6r8rHltdnsrIlibdirs r!rzbuild_ext.finalize_optionss#D)))//R ""4?333RRdoRRR ; (  % % ' ' '? = =C!2238<valuemacros r!rzbuild_ext.setup_shlib_compilers])5]DL * * *  4& &h///   (  % %d&7 8 8 8 ; "#{ 3 3 e%%dE2222 : ! / /''.... > %  " "4> 2 2 2   (  % %d&7 8 8 8 : !  - -dj 9 9 9   (  % %d&7 8 8 8'9&@&@&J&J###r+cdt|tr|jStj||SN)rwrexport_symbolsr3get_export_symbols)r6r8s r!rzbuild_ext.get_export_symbolss0 c7 # # &% %,T3777r+c>||j} t|tr |j|_t j|||jr0|dj }| ||||_dS#||_wxYw)NrG) _convert_pyx_sources_to_langrrwrryr3build_extensionrYrSrF write_stub)r6r8 _compilerrFs r!rzbuild_ext.build_extensions ((***M  &#w'' 4 $ 3  &tS 1 1 1 0 66zBBL  3///%DMMMIDM % % % %s A-B Bc td|jDd|jddddgzt fd|jDS)z?Return true if 'ext' links to a dynamic lib in the same packagecg|] }|j Sr)r)rlibs r!rz.build_ext.links_to_dynamic..s!H!H!HS#.!H!H!Hr+r;Nr<r'c3&K|] }|zvV dSrr)rlibnamelibnamespkgs r! z-build_ext.links_to_dynamic..s,JJ3=H,JJJJJJr+)dictfromkeysrrArr@anyr)r6r8rrs @@r!rzbuild_ext.links_to_dynamics ==!H!HDK!H!H!HIIhhs~++C00"5<==JJJJJCMJJJJJJr+cVgtj||Sr)r3get_source_files_get_internal_dependsrs r!rzbuild_ext.get_source_files s)R,T22RT5O5O5Q5QRRr+c#XKt|jjp tj}d|jD}dtdtddfd}|D]}t|}|r ||d2d|j vr ||d H ||z d }n#t$r||d Y{wxYw | |n#t$r||d YwxYw| VdS)zAYield ``ext.depends`` that are contained by the project directoryc3.K|]}|jD]}|VdSr)depends)rr8deps r!rz2build_ext._get_internal_depends..s1II3S[IIc3IIIIIIIr+ orig_pathreasonr9Nc2tjd||dS)NzJdependency %s won't be automatically included in the manifest: the path %s)rinfo)rrs r!skipz-build_ext._get_internal_depends..skips+ H8      r+zmust be relativez..zcan't have `..` segmentsT)strictz doesn't existzmust be inside the project root)r distributionsrc_rootrCrresolverTstr is_absolutepartsOSError relative_to ValueErroras_posix)r6 project_rootrrrrDresolveds r!rzbuild_ext._get_internal_depends sD-6C")DDLLNN II$/III C       " "C99D!! S,---tz!!S4555 (4/888EE   S/***  $$\2222   S;<<< --// ! ! ! !/ " "s$*CCC!C77DDc|jr3t|St t j||zSr)r1listget_output_mappingkeyssortedr3 get_outputs_build_ext__get_stubs_outputsrs r!rzbuild_ext.get_outputs2s\ < ://11668899 9j,T22T5M5M5O5OOPPPr+ch|}tt|dS)z1See :class:`setuptools.commands.build.SubCommand`c|dS)Nrr)xs r!z.build_ext.get_output_mapping..:s !A$r+)key)rnrr)r6mappings r!rzbuild_ext.get_output_mapping7s0**,,F7777888r+cfdjD}tj|}t d|DS)Nc3K|]?}|j tjjjg|jdRV@dS)r;N)rYrCrDrArFrr@)rr8r6s r!rz0build_ext.__get_stubs_outputs..>se   GL D#.*>*>s*C*C D D D      r+c3&K|] \}}||zV dSrr)rbasefnexts r!rz0build_ext.__get_stubs_outputs..Es*::[T5D5L::::::r+)rT itertoolsproduct!_build_ext__get_output_extensionsr)r6 ns_ext_basespairss` r!__get_stubs_outputszbuild_ext.__get_stubs_outputs<sj       !,0L0L0N0NOO::E::::::r+c#ZKdVdV|djrdVdSdS)Nr`z.pycrGz.pyo)rSrhrs r!__get_output_extensionsz!build_ext.__get_output_extensionsGsH   % %j 1 1 : LLLLL  r+ctjj|g|jdRdz}||||dSr_)rCrDrArr@r[)r6 output_dirr8rR stub_files r!rzbuild_ext.write_stubMsNGLHcn.B.B3.G.GHHH5P  ig66666r+rc\tjd|j||r1tj|rt |dz|jst|d}| d dddtdzd tj |j zd d d td dddtddddddtddddg||r||dSdS)Nz writing stub loader for %s to %sz already exists! Please delete.w zdef __bootstrap__():z- global __bootstrap__, __file__, __loader__z0 import sys, os, pkg_resources, importlib.utilz, dlz: __file__ = pkg_resources.resource_filename(__name__,%r)z del __bootstrap__z if '__loader__' in globals():z del __loader__z# old_flags = sys.getdlopenflags()z old_dir = os.getcwd()z try:z( os.chdir(os.path.dirname(__file__))z$ sys.setdlopenflags(dl.RTLD_NOW)z3 spec = importlib.util.spec_from_file_location(z# __name__, __file__)z0 mod = importlib.util.module_from_spec(spec)z! spec.loader.exec_module(mod)z finally:z" sys.setdlopenflags(old_flags)z os.chdir(old_dir)z__bootstrap__()r')rrrrCrDrUrropenwriterAr*rErclose_compile_and_remove_stub)r6rr8rRfs r!r[zbuild_ext._write_stub_fileQsQ 3S^YOOO  Krw~~i00 KI(IIJJ J| Y$$A GG .GJ--((*,'*:*:3>*J*JK.:/CDD2!BDEEM=J;%BCC0)/   : GGIII  5  ) )) 4 4 4 4 4 5 5r+c"ddlm}||gdd|j|dj}|dkr||g|d|jt j|r|jst j|dSdSdS)Nr) byte_compileT)rhrrrf) distutils.utilrrrSrhrCrDrUunlink)r6rrrhs r!rz"build_ext._compile_and_remove_stubxs////// i[1D$,OOOO--m<<E a<< L hdDL     7>>) $ $ !T\ ! Ii  ! ! ! !r+N)F)"__name__ __module__ __qualname__r0bool__annotations__r1r4rr rrOr5rZrrnr?rrrrrrrrrrrrrrrr[rrr+r!r r QsAM4GT---,Y,5c?,,,, G G G"0 000000 4XeCHo%>44442.###   >KKK6888 & & &KKKS$s)SSSS$"x}$"$"$"$"LQT#YQQQQ 9DcN9999 ; ; ; 7777%5%5#%5I%5%5%5%5N !# ! ! ! ! ! !r+r c R||j||||||||| | | | dSr)linkSHARED_LIBRARY) r6objectsoutput_libnamerrrrrdebug extra_preargsextra_postargs build_temp target_langs r!rrsN                  r+staticc ,|Jtj|\}} tj| \}}|ddr |dd}|||||| dS)Nrr)rCrDr@rxrz startswithcreate_static_lib)r6r r rrrrrr r rrrrIrEr8s r!rrs*!!!!w}}^<< H((22 #   % % 0 0 7 7 $ |H w*e[QQQQQr+) NNNNNrNNNN)/rCrrimportlib.machineryrimportlib.utilrritypingrrrr pathlibr distutils.command.build_extr _du_build_extdistutils.ccompilerr distutils.sysconfigr r distutilsrsetuptools.errorsrsetuptools.extensionrrCython.Distutils.build_extr3 __import__ ImportErrorrrr"r(r|r{rr>dlhasattrr*r.rrr+r!r&s 222222CCCCCC............BBBBBB,,,,,,BBBBBBBB''''''33333333BBBBBBJ%&&&&JJJz<<<<<<%%%*   <8IIW__  'J 7 77 II      """q!q!q!q!q! q!q!q!h  CR4!      BG !RRRRRRs$A&&A0/A0'B::CC