/usr/lib64/python3.9/site-packages/cffi/__pycache__
NameSizeModeActions
api.cpython-39.opt-1.pyc342910644editdlrm
api.cpython-39.pyc343260644editdlrm
backend_ctypes.cpython-39.opt-1.pyc396540644editdlrm
backend_ctypes.cpython-39.pyc399230644editdlrm
cffi_opcode.cpython-39.opt-1.pyc46910644editdlrm
cffi_opcode.cpython-39.pyc47190644editdlrm
commontypes.cpython-39.opt-1.pyc18260644editdlrm
commontypes.cpython-39.pyc18640644editdlrm
cparser.cpython-39.opt-1.pyc235720644editdlrm
cparser.cpython-39.pyc236870644editdlrm
error.cpython-39.opt-1.pyc14840644editdlrm
error.cpython-39.pyc14840644editdlrm
ffiplatform.cpython-39.opt-1.pyc35410644editdlrm
ffiplatform.cpython-39.pyc35410644editdlrm
lock.cpython-39.opt-1.pyc3810644editdlrm
lock.cpython-39.pyc3810644editdlrm
model.cpython-39.opt-1.pyc195920644editdlrm
model.cpython-39.pyc197230644editdlrm
pkgconfig.cpython-39.opt-1.pyc51190644editdlrm
pkgconfig.cpython-39.pyc51190644editdlrm
recompiler.cpython-39.opt-1.pyc464780644editdlrm
recompiler.cpython-39.pyc469180644editdlrm
setuptools_ext.cpython-39.opt-1.pyc72390644editdlrm
setuptools_ext.cpython-39.pyc72580644editdlrm
vengine_cpy.cpython-39.opt-1.pyc352310644editdlrm
vengine_cpy.cpython-39.pyc354440644editdlrm
vengine_gen.cpython-39.opt-1.pyc207330644editdlrm
vengine_gen.cpython-39.pyc209810644editdlrm
verifier.cpython-39.opt-1.pyc92710644editdlrm
verifier.cpython-39.pyc92880644editdlrm
__init__.cpython-39.opt-1.pyc4830644editdlrm
__init__.cpython-39.pyc4830644editdlrm
Edit: /usr/lib64/python3.9/site-packages/cffi/__pycache__/verifier.cpython-39.pyc (9288B)
a (ˆ`Ç+ã@sêddlZddlZddlZddlZddlZddlmZddlmZddlm Z ej dkrhddl Z dd„Z nddlZd d„Z ej d krŠejZnGd d „d ejƒZGd d„deƒZdZdd„Zdadd„Zdd„Zddd„Zdd„Zdd„ZdS)éNé)Ú__version_verifier_modules__)Ú ffiplatform)ÚVerificationError)ércCstjjdd…S©N)Ú importlibÚ machineryÚEXTENSION_SUFFIXES©r r ú3/usr/lib64/python3.9/site-packages/cffi/verifier.pyÚ_extension_suffixes sr cCsdd„t ¡DƒS)NcSs g|]\}}}|tjkr|‘qSr )ÚimpÚ C_EXTENSION)Ú.0ÚsuffixÚ_Útyper r r Ú s ÿz'_extension_suffixes..)rZ get_suffixesr r r r r s©rcseZdZ‡fdd„Z‡ZS)ÚNativeIOcs(t|tƒr| d¡}tt|ƒ |¡dS)NÚascii)Ú isinstanceZunicodeÚencodeÚsuperrÚwrite)ÚselfÚs©Ú __class__r r rs  zNativeIO.write)Ú__name__Ú __module__Ú __qualname__rÚ __classcell__r r rr rsrc@szeZdZddd„Zd dd„Zd d „Zd d „Zd d„Zdd„Zdd„Z dd„Z dd„Z dd„Z d!dd„Z dd„Zdd„ZdS)"ÚVerifierNÚFú.cc Ksv|jjrtd|jjfƒ‚||_||_|s4t | ¡} t||ƒ} | |ƒ|_|j  | ¡| |_ |  | | ¡|_ |rz|rxt dƒ‚n¢d tjdd…t|| g|j¡}tjdkr°| d¡}tt |ddd…¡d @ƒ}| d ¡ d ¡}tt |d dd…¡d @ƒ}| d ¡ d ¡}d||jj||f}tƒd}|�p0tƒ|_tj |j||¡|_ tj |j||¡|_!||_"d|_#d|_$dS)NzKfeature not supported with ffi.verify(), but only with ffi.set_source(): %sz)can't specify both 'modulename' and 'tag'úrrzutf-8rélÿÿÚ0xÚLrÚ0z_cffi_%s_%s%s%sF)%Z_parserZ_uses_new_featurerÚffiÚpreamblerZflattenÚ_locate_engine_classÚ_vengineZpatch_extension_kwdsÚflagsÚmake_relative_toÚkwdsÚ TypeErrorÚjoinÚsysÚversionrZ _cdefsourcesÚ version_inforÚhexÚbinasciiÚcrc32ÚlstripÚrstripZ _class_keyÚ_get_so_suffixesÚ_caller_dir_pycacheÚtmpdirÚosÚpathÚsourcefilenameÚmodulefilenameÚ ext_packageÚ _has_sourceÚ _has_module)rr,r-r?Z modulenamerDÚtagÚforce_generic_engineZsource_extensionr0Ú relative_tor2Zflattened_kwdsZ vengine_classÚkeyZk1Zk2rr r r Ú__init__ sNÿÿ     ÿþ   ÿ zVerifier.__init__cCsL|jj�0|jr |dur tdƒ‚| |¡Wdƒn1s>0YdS)zkWrite the C source code. It is produced in 'self.sourcefilename', which can be tweaked beforehand.Nzsource code already written)r,Ú_lockrErÚ _write_source©rÚfiler r r Ú write_sourceHs  ÿzVerifier.write_sourcecCsP|jj�4|jrtdƒ‚|js&| ¡| ¡Wdƒn1sB0YdS)z„Write the C source code (if not done already) and compile it. This produces a dynamic link library in 'self.modulefilename'.zmodule already compiledN)r,rLrFrrErMÚ_compile_module©rr r r Úcompile_moduleQs  zVerifier.compile_modulecCs^|jj�B|js4| ¡|js4|js,| ¡| ¡| ¡WdƒS1sP0YdS)a"Get a C module from this Verifier instance. Returns an instance of a FFILibrary class that behaves like the objects returned by ffi.dlopen(), but that delegates all operations to the C module. If necessary, the C code is written and compiled first. N)r,rLrFÚ_locate_modulerErMrQÚ _load_libraryrRr r r Ú load_library[s zVerifier.load_librarycCsBtj |j¡}| dd¡d}| d¡r>ttdƒr>|dd…}|S)NÚ.rrZ_dZgettotalrefcountéþÿÿÿ)r@rAÚbasenamerCÚsplitÚendswithÚhasattrr5)rrYr r r Úget_module_nameks  zVerifier.get_module_namecCsnt ¡|jsD|jj�|js&| ¡Wdƒn1s:0Yt |j¡}| ¡}tj ||fi|j ¤ŽSr) rZ_hack_at_distutilsrEr,rLrMZmaybe_relative_pathrBr]Ú get_extensionr2)rZ sourcenameÚmodnamer r r r^vs & zVerifier.get_extensioncCs|jjSr)r/Z_gen_python_modulerRr r r Úgenerates_python_module€sz Verifier.generates_python_modulecsz|rvtj |¡rvtj |¡‰| ¡}tjD]J}||vr*||}t|ttfƒsZt d|fƒ‚‡fdd„|Dƒ}|||<q*|S)Nz&keyword '%s' should be a list or tuplecsg|]}tj ˆ|¡‘qSr )r@rAr4)rÚfn©Údirnamer r r�óz-Verifier.make_relative_to..) r@rArcÚcopyrZLIST_OF_FILE_NAMESrÚlistÚtupler3)rr2rIrJZlstr rbr r1ƒs  ÿ zVerifier.make_relative_tocCsˆtj |j¡st|jrHzt|jdddgƒ}Wnty>YdS0|j}nd}|j  |  ¡|t ƒ¡}|durndS||_|j  ¡d|_ dS)NÚ__doc__T)r@rAÚisfilerCrDÚ __import__Ú ImportErrorÚ__path__r/Ú find_moduler]r=Z collect_typesrF)rÚpkgrAÚfilenamer r r rT“s  ÿ zVerifier._locate_modulecCs*||j_z|j ¡W|j`n|j`0dSr)r/Z_fZwrite_source_to_frNr r r Ú_write_source_to¦s zVerifier._write_source_tocCsÈ|dur| |¡n°tƒ}| |¡| ¡}tj |j¡rvt|jdƒ�}| ¡|k }Wdƒqz1sj0Ynd}|r¾t |jƒt|jdƒ�}|  |¡Wdƒn1s´0Yd|_ dS)NÚrTÚw) rprÚgetvaluer@rAÚexistsrBÚopenÚreadÚ _ensure_dirrrE)rrOÚfZ source_dataÚfpZ needs_writtenr r r rM­s  . (zVerifier._write_sourcecCsntj |j¡}t || ¡¡}zt ||j¡}Wnt yFd}Yn0|sdt |jƒt   ||j¡d|_ dS)NFT)r@rArcrBrÚcompiler^ÚsamefilerCÚOSErrorrwÚshutilÚmoverF)rr?ZoutputfilenameZsamer r r rQÆs   zVerifier._compile_modulecCs0|js J‚|jdur"|j |j¡S|j ¡SdSr)rFr0r/rVrRr r r rUÓs  zVerifier._load_library)NNNr%Fr&NN)N)N)r r!r"rKrPrSrVr]r^r`r1rTrprMrQrUr r r r r$s þ (      r$FcCsztrd}|sNdtjvrd}n2z ddl}Wnty>d}Yn0|j|urNd}|rdddlm}|jSddlm }|j SdS)NTZ__pypy__rú?r)Ú vengine_gen)Ú vengine_cpy) Ú_FORCE_GENERIC_ENGINEr5Úbuiltin_module_namesÚ _cffi_backendrkZ_backendr%r€ZVGenericEnginer�ZVCPythonEngine)r,rHr„r€r�r r r r.Þs        r.cCsHtrtStj d¡}|r|St d¡jj}tj  tj  tj  |¡d¡¡S)NZ CFFI_TMPDIRr(Ú __pycache__) Ú_TMPDIRr@ÚenvironÚgetr5Ú _getframeÚf_codeÚ co_filenamerAÚabspathr4rc)Úresultror r r r>ös ÿr>cCs|adS)z:Set the temporary directory to use instead of __pycache__.N)r†rbr r r Ú set_tmpdirsrŽc Cs|ptƒ}zt |¡}Wnty,YdS0|r8d}ntƒd ¡}|D]Z}| ¡ d¡rJ| ¡ |¡sx| ¡ d¡rJzt tj   ||¡¡WqJty¢YqJ0qJtj   |d¡g}|D]^}zDt |¡D]4}tj   ||¡}tj   |¡rô|  |¡qÊt |¡qÊWqºt�yYqº0qºdS)z}Clean up the temporary directory by removing all files in it called `_cffi_*.{c,so}` as well as the `build` subdirectory.Nr&rZ_cffi_Zbuild) r>r@Úlistdirr|r=ÚlowerÚ startswithr[ÚunlinkrAr4ÚisdirÚappend)r?Zkeep_soZfilelistrraZ clean_dirÚdirr r r Úcleanup_tmpdirs8   ÿ ÿ   r–cCs&tƒ}|s"tjdkrdg}ndg}|S)NÚwin32z.pydz.so)r r5Úplatform)Úsuffixesr r r r=$s  r=cCs*tj |¡}|r&tj |¡s&t |¡dSr)r@rArcr“Úmakedirs)rorcr r r rw/s rw)NF)r5r@r9r}Úior%rrÚerrorrr7Zimportlib.machineryrr rÚStringIOrÚBytesIOÚobjectr$r‚r.r†r>rŽr–r=rwr r r r Ús*(      ?