%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/
Upload File :
Create Path :
Current File : //opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pyc

�
��]c@s>ddlZddlZddlZddlZddlZddlmZddlmZddlm	Z	ej
dkr�ddlZd�Z
nddlZd�Z
ej
dkr�ejZnd	ejfd
��YZdefd��YZeZd
�Zdad�Zd�Zded�Zd�Zd�ZdS(i����Ni(t__version_verifier_modules__(tffiplatform(tVerificationErroricCstjjS(N(t	importlibt	machinerytEXTENSION_SUFFIXES(((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pyt_extension_suffixesscCs5gtj�D]$\}}}|tjkr
|^q
S(N(timptget_suffixestC_EXTENSION(tsuffixt_ttype((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pyRstNativeIOcBseZd�ZRS(cCs;t|t�r!|jd�}ntt|�j|�dS(Ntascii(t
isinstancetunicodetencodetsuperR
twrite(tselfts((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pyRs(t__name__t
__module__R(((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pyR
stVerifierc	Bs�eZddddedddd�Zdd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
dd�Zd
�Zd�ZRS(ts.ccKs|jjr(td|jjf��n||_||_|sRtj|�}nt||�}
|
|�|_|jj	|�|	|_
|j||
�|_|r�|r�t
d��q�n�djtjd t||g|j�}tjdkr|jd�}nttj|ddd��d@�}|jd	�jd
�}ttj|ddd��d@�}|jd�jd
�}d
||jj||f}t�d}|p�t�|_tjj|j||�|_ tjj|j||�|_!||_"t#|_$t#|_%dS(NsKfeature not supported with ffi.verify(), but only with ffi.set_source(): %ss)can't specify both 'modulename' and 'tag'sisutf-8iiI����t0xtLit0s_cffi_%s_%s%s%s(i(&t_parsert_uses_new_featureRtffitpreambleRtflattent_locate_engine_classt_venginetpatch_extension_kwdstflagstmake_relative_totkwdst	TypeErrortjointsystversionRt_cdefsourcestversion_infoRthextbinasciitcrc32tlstriptrstript
_class_keyt_get_so_suffixest_caller_dir_pycachettmpdirtostpathtsourcefilenametmodulefilenametext_packagetFalset_has_sourcet_has_module(RRR R6t
modulenameR;ttagtforce_generic_enginetsource_extensionR%trelative_toR'tflattened_kwdst
vengine_classtkeytk1tk2R
((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pyt__init__ sD				
&&

		cCsH|jj�6|jr1|dkr1td��n|j|�WdQXdS(skWrite the C source code.  It is produced in 'self.sourcefilename',
        which can be tweaked beforehand.ssource code already writtenN(Rt_lockR=tNoneRt
_write_source(Rtfile((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pytwrite_sourceHs

cCsO|jj�=|jr%td��n|js;|j�n|j�WdQXdS(s�Write the C source code (if not done already) and compile it.
        This produces a dynamic link library in 'self.modulefilename'.smodule already compiledN(RRJR>RR=RLt_compile_module(R((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pytcompile_moduleQs
		
cCsc|jj�Q|jsO|j�|jsO|js?|j�n|j�qOn|j�SWdQXdS(s"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(RRJR>t_locate_moduleR=RLROt
_load_library(R((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pytload_library[s
	
		
cCsZtjj|j�}|jdd�d}|jd�rVttd�rV|d }n|S(Nt.iit_dtgettotalrefcounti����(R7R8tbasenameR:tsplittendswiththasattrR*(RRW((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pytget_module_nameks

cCsstj�|js?|jj�|js6|j�nWdQXntj|j�}|j�}tj	|||j
�S(N(Rt_hack_at_distutilsR=RRJRLtmaybe_relative_pathR9R[t
get_extensionR'(Rt
sourcenametmodname((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pyR^vs
	
	cCs
|jjS(N(R#t_gen_python_module(R((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pytgenerates_python_module�scCs�|r�tjj|�r�tjj|�}|j�}x�tjD]|}||kr@||}t|ttf�s�t	d|f��ng|D]}tjj
||�^q�}|||<q@q@Wn|S(Ns&keyword '%s' should be a list or tuple(R7R8tdirnametcopyRtLIST_OF_FILE_NAMESRtlistttupleR(R)(RR'RCRcRFtlsttfn((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pyR&�s
(cCs�tjj|j�s�|jr^yt|jdddg�}Wntk
rQdSX|j}nd}|j	j
|j�|t��}|dkr�dS||_n|j	j
�t|_dS(Nt__doc__(R7R8tisfileR:R;t
__import__RKtImportErrort__path__R#tfind_moduleR[R4t
collect_typestTrueR>(RtpkgR8tfilename((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pyRQ�s	

cCs.||j_z|jj�Wd|j`XdS(N(R#t_ftwrite_source_to_f(RRM((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pyt_write_source_to�scCs�|dk	r|j|�n�t�}|j|�|j�}tjj|j�r�t|jd��}|j	�|k}WdQXnt
}|r�t|j�t|jd��}|j|�WdQXnt
|_
dS(Ntrtw(RKRvR
tgetvalueR7R8texistsR9topentreadRqt_ensure_dirRR=(RRMtftsource_datatfpt
needs_written((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pyRL�s	

cCs�tjj|j�}tj||j��}ytj||j�}Wnt	k
r_t
}nX|s�t|j�tj
||j�nt|_dS(N(R7R8RcR9RtcompileR^tsamefileR:tOSErrorR<R}tshutiltmoveRqR>(RR6toutputfilenametsame((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pyRO�s


cCsB|jst�|jdk	r1|jj|j�S|jj�SdS(N(R>tAssertionErrorR%RKR#RS(R((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pyRR�sN(RRRKR<RIRNRPRSR[R^RbR&RQRvRLRORR(((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pyRs	&		
			
					
cCs�trt}n|srdtjkr-t}qryddl}Wntk
rVd}nX|j|k	rrt}qrn|r�ddlm}|j	Sddlm
}|jSdS(Nt__pypy__i����t?i(tvengine_gen(tvengine_cpy(t_FORCE_GENERIC_ENGINERqR*tbuiltin_module_namest
_cffi_backendRmt_backendRR�tVGenericEngineR�tVCPythonEngine(RRAR�R�R�((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pyR"�s 		

cCsftr
tStjjd�}|r&|Stjd�jj}tjj	tjj
tjj|�d��S(NtCFFI_TMPDIRit__pycache__(t_TMPDIRR7tenvirontgetR*t	_getframetf_codetco_filenameR8tabspathR)Rc(tresultRs((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pyR5�s!cCs
|adS(s:Set the temporary directory to use instead of __pycache__.N(R�(Rc((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pyt
set_tmpdirscCs�|pt�}ytj|�}Wntk
r6dSX|rFd}nt�dj�}x�|D]|}|j�jd�r`|j�j|�s�|j�jd�r`y tjtj	j
||��Wq�tk
r�q�Xq`q`Wtj	j
|d�g}x�|D]|}ybx[tj|�D]J}tj	j
||�}tj	j|�rU|j|�qtj|�qWWq�tk
rzq�Xq�WdS(s}Clean up the temporary directory by removing all files in it
    called `_cffi_*.{c,so}` as well as the `build` subdirectory.Ns.cit_cffi_tbuild(
R5R7tlistdirR�R4tlowert
startswithRYtunlinkR8R)tisdirtappend(R6tkeep_sotfilelistR
Rit	clean_dirtdir((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pytcleanup_tmpdirs2
	
* 


cCs:t�}|s6tjdkr*dg}q6dg}n|S(Ntwin32s.pyds.so(RR*tplatform(tsuffixes((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pyR4$s	cCs?tjj|�}|r;tjj|�r;tj|�ndS(N(R7R8RcR�tmakedirs(RsRc((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pyR}/s(ii(i(R*R7R/R�tioRRRterrorRR-timportlib.machineryRRRtStringIOR
tBytesIOtobjectRR<R�R"RKR�R5R�R�R4R}(((sD/opt/plesk/python/2.7/lib64/python2.7/site-packages/cffi/verifier.pyt<module>s(<	�		
		

Zerion Mini Shell 1.0