lf+ddlZddlZddlZddlZddlZddlmZddlmZddlm Z ej dkrddl Z dZ nddlZdZ ej d krejZnGd d ejZGd d eZdZdZdadZdZddZdZdZdS)N)__version_verifier_modules__) ffiplatform)VerificationError)rc4tjjddSN) importlib machineryEXTENSION_SUFFIXESo/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib64/python3.11/site-packages/cffi/verifier.py_extension_suffixesr s"5aaa88rc<dtjDS)Nc:g|]\}}}|tjk|Sr )imp C_EXTENSION).0suffix_types r z'_extension_suffixes..s4,,,?61d3?*****r)r get_suffixesr rrrrs+,,c.>.@.@,,, ,rrceZdZfdZxZS)NativeIOct|tr|d}tt||dS)Nascii) isinstanceunicodeencodesuperrwrite)selfs __class__s rr$zNativeIO.writesJ!W%% &HHW%% (D ! ! ' ' * * * * *r)__name__ __module__ __qualname__r$ __classcell__)r's@rrrs8 + + + + + + + + +rrcheZdZ ddZddZdZdZd Zd Zd Z d Z d Z dZ ddZ dZdZdS)VerifierNF.cc  |jjrtd|jj||_||_|st j| } t||} | ||_|j | | |_ | | | |_ |r|rtdn ddtjddzt"|| g|jz}tjdkr|d}t)t+j|dddd z}|d d }t)t+j|d ddd z}|d d }d|d|jj||}t5d}|p t7|_t:j|j||z|_t:j|j||z|_ ||_!d|_"d|_#dS)NzIfeature not supported with ffi.verify(), but only with ffi.set_source(): z)can't specify both 'modulename' and 'tag'z%d.%drzutf-8rl0xLr0_cffi_rF)$_parser_uses_new_featurerffipreamblerflatten_locate_engine_class_venginepatch_extension_kwdsflagsmake_relative_tokwds TypeErrorjoinsys version_infor _cdefsourcesr"hexbinasciicrc32lstriprstrip _class_key_get_so_suffixes_caller_dir_pycachetmpdirospathsourcefilenamemodulefilename ext_package _has_source _has_module)r%r9r:rO modulenamerTtagforce_generic_enginesource_extensionr? relative_torAflattened_kwds vengine_classkeyk1k2rs r__init__zVerifier.__init__ sj ; ( P##/2{/L/LOPP P   7(066N,S2FGG % d++  **4000 ))$ <<  6 M KLLL M++w)9"1")==;'9"./00C4''jj))X^C1I..;<>#q))!,   T " " %ws4F'G'G %}Hrc>tj|js?|jj5|js|dddn #1swxYwYtj|j}|}tj ||fi|j Sr ) r_hack_at_distutilsrUr9rcrdmaybe_relative_pathrRry get_extensionrA)r% sourcenamemodnames rr}zVerifier.get_extensionws&((( ) ) )')&&((( ) ) ) ) ) ) ) ) ) ) ) ) ) ) )!4T5HII &&(((WJJ JJJsAAAc|jjSr )r=_gen_python_modulerjs rgenerates_python_modulez Verifier.generates_python_modules }//rcj|rtj|rtj||}tjD]P}||vrJ||}t |ttfstd|dfd|D}|||<Q|S)Nz keyword 'z' should be a list or tuplecPg|]"}tj|#Sr )rPrQrC)rfndirnames rrz-Verifier.make_relative_to..s)CCC27<<44CCCr) rPrQrcopyrLIST_OF_FILE_NAMESr listtuplerB)r%rAr[r^lstrs @rr@zVerifier.make_relative_tos  $27??;77 $gook22G99;;D"5 $ $$;;s)C%cD%=992'i+.33)1222CCCCsCCCC #DI rctj|js|jr3 t |jdddg}n#t $rYdSwxYw|j}nd}|j | |t}|dS||_|j d|_ dS)N__doc__T)rPrQisfilerSrT __import__ ImportError__path__r= find_moduleryrM collect_typesrV)r%pkgrQfilenames rrmzVerifier._locate_modulesw~~d122 + $T%5tTI;OOCC"FF|}001E1E1G1G1A1C1CEEH"*D  ##%%%sA AAcx||j_ |j|j`dS#|j`wxYwr )r=_fwrite_source_to_fres r_write_source_tozVerifier._write_source_tosG  ! M + + - - -      s0 9c>|||dSt}|||}tj|jrGt|jd5}||k }dddn #1swxYwYnd}|rVt|jt|jd5}| |dddn #1swxYwYd|_ dS)NrTw) rrgetvaluerPrQexistsrRopenread _ensure_dirr$rU)r%rff source_datafp needs_writtens rrdzVerifier._write_sources    ! !$ ' ' ' ' ' A  ! !! $ $ $**,,Kw~~d122 %$-s33Cr)+k)A$BMCCCCCCCCCCCCCCC!%  *D/000$-s33*rHH[)))*************** $D   s$ B00B47B4)D  DDcftj|j}t j||} t j||j}n#t$rd}YnwxYw|s.t|jtj ||jd|_ dS)NFT)rPrQrrRrcompiler}samefilerSOSErrorrshutilmoverV)r%rOoutputfilenamesames rrizVerifier._compile_modules!455$,VT5G5G5I5IJJ '8KLLDD   DDD  = + , , , K(; < < <s A(( A76A7c|jsJ|j|j|jS|jSr )rVr?r=rorjs rrnzVerifier._load_librarysE : !=--dj99 9=--// /r)NNNr.Fr/NNr )r(r)r*rargrkroryr}rr@rmrrdrirnr rrr-r-s>B@E@D'!'!'!'!R%%%%###(((   KKK000       &!!!$$$$2    00000rr-Fctrd}|s4dtjvrd}n# ddl}n#t$rd}YnwxYw|j|urd}|r ddlm}|jSddlm }|j S)NT__pypy__r?r) vengine_gen) vengine_cpy) _FORCE_GENERIC_ENGINErDbuiltin_module_names _cffi_backendr_backendr.rVGenericEnginerVCPythonEngine)r9rYrrrs rr<r<s$#  , 1 1 1#'  $$$$$$ $ $ $ #  $|=00'+$*!!!!!!))!!!!!!))s # 22cTtrtStjd}|r|St jdjj}tj tj tj |dS)N CFFI_TMPDIRr2 __pycache__) _TMPDIRrPenvirongetrD _getframef_code co_filenamerQabspathrCr)resultrs rrNrNs Z^^M * *F  }Q&2H 7??27<<(A(A(** + ++rc |adS)z:Set the temporary directory to use instead of __pycache__.N)r)rs r set_tmpdirrs GGGrc|p t} tj|}n#t$rYdSwxYw|rd}n&t d}|D]}|dr||s'|drD tjtj ||#t$rYwxYwtj |dg}|D]} tj|D]k}tj ||}tj |r| |Wtj|l#t$rYwxYwdS)z}Clean up the temporary directory by removing all files in it called `_cffi_*.{c,so}` as well as the `build` subdirectory.Nr/rr6build) rNrPlistdirrrMlower startswithrwunlinkrQrCisdirappend)rOkeep_sofilelistrr clean_dirdirs rcleanup_tmpdirrs ,*,,F:f%% /!##A&,,.. 88::  * *  ##F++ /1xxzz/B/B4/H/H   "',,vr223333    fg../I   joo " "W\\#r**7==$$"$$R((((IbMMMM  "     D   s1' 552D DDBG GGcTt}|stjdkrdg}ndg}|S)Nwin32z.pydz.so)rrDplatform)suffixess rrMrM%s7"$$H  <7 " "xHHwH Orctj|}|r5tj|stj|dSdSdSr )rPrQrrmakedirs)rrs rrr0s\gooh''Grw}}W-- Gr)NF)rDrPrHrior.rrerrorrrEimportlib.machineryr rrStringIOrBytesIOobjectr-rr<rrNrrrMrr rrrs%$$$$$$$$$$$$$$$$$$$******$$$$$$v9999JJJ,,, t{HH+++++2:+++{0{0{0{0{0v{0{0{0~***, +++ >   r