HEX
Server: LiteSpeed
System: Linux standart9.isimtescil.net 3.10.0-962.3.2.lve1.5.26.7.el7.x86_64 #1 SMP Wed Oct 2 07:53:12 EDT 2019 x86_64
User: karalev (5310)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //opt/alt/python37/lib64/python3.7/site-packages/cffi/__pycache__/setuptools_ext.cpython-37.pyc
B

ل=^�"�@snddlZddlZyeWnek
r0eZYnXdd�Zdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�ZdS)�NcCsddlm}||��dS)Nr)�DistutilsSetupError)Zdistutils.errorsr)�msgr�r�F/opt/alt/python37/lib64/python3.7/site-packages/cffi/setuptools_ext.py�error
src	Cs@t|��}|��}WdQRX|d7}t||d�}t|||�dS)N�
�exec)�open�read�compiler)�filenameZglob�f�src�coderrr�execfiles

rc
Cs�ddlm}t|t�s*tdt|�jf�t|�}y|�d�\}}Wn"t	k
rftd|f�YnXt
j�|�s�d}|�
dd�d	}t
j�|�r�d
|d|f}td||f�d|d
�}t||�y||}Wn$tk
r�td||f�YnXt||��s|�}t||��s0td|t|�jf�t|d��sJtd|f�|j\}	}
}}|j�rr|��}|�|�|
dk�r�t|||	�nt|||	|
||�dS)Nr)�FFIzEargument to 'cffi_modules=...' must be a str or a list of str, not %r�:z3%r must be of the form 'path/build.py:ffi_variable'��.�/z.pyz (rewrite cffi_modules to [%r])z#%r does not name an existing file%sZ__cffi__)�__name__�__file__z!%r: object %r not found in modulez"%r is not an FFI instance (got %r)�_assigned_sourcez*%r: the set_source() method was not called)Zcffi.apir�
isinstance�
basestringr�typer�str�split�
ValueError�os�path�exists�replacer�KeyError�hasattrrZ_windows_unicode�copyZ_apply_windows_unicode�_add_py_module�
_add_c_module)
�distZmod_specrZbuild_file_nameZffi_var_name�extZ	rewrittenZmod_vars�ffi�module_name�source�source_extension�kwdsrrr�add_cffi_modulesL




r/cCsnd|krjttd�sjtjdkrjddl}y(t|j�d�d�}|dkrJd|d<Wntk
rhd|d<YnX|S)	a
    Add py_limited_api to kwds if setuptools >= 26 is in use.
    Do not alter the setting if it already exists.
    Setuptools takes care of ignoring the flag on Python 2 and PyPy.

    CPython itself should ignore the flag in a debugging version
    (by not listing .abi3.so in the extensions it supports), but
    it doesn't so far, creating troubles.  That's why we check
    for "not hasattr(sys, 'gettotalrefcount')" (the 2.7 compatible equivalent
    of 'd' not in sys.abiflags). (http://bugs.python.org/issue28401)

    On Windows, with CPython <= 3.4, it's better not to use py_limited_api
    because virtualenv *still* doesn't copy PYTHON3.DLL on these versions.
    For now we'll skip py_limited_api on all Windows versions to avoid an
    inconsistent mess.
    Zpy_limited_apiZgettotalrefcountZwin32rNr�T)r$�sys�platform�
setuptools�int�__version__�	partitionr)�	Extensionr.r3Zsetuptools_major_versionrrr�_set_py_limited_apiIs
r8c
	s�ddlm}ddlm}ddlm�ddlm�ddlm	�dg}|�
|�dg��t||�}|f�|d	�|���d��������	fd
d�	�|j
dkr�g|_
|j
���|j�d|��G���fd
d�d��}	|	|jd<dS)Nr)r7)�	build_ext)�mkpath)�log)�
recompilerz$PLACEHOLDER�sources)�namer=cs\tj�|���}��d|��|�|dk	r:|��������|�}|sX��d�|S)Nzgenerating cffi module %rzalready up-to-date)rr �join�infoZ
make_c_source)Ztmpdir�pre_runZc_file�updated)r)r*r;r:r+r<r,r-rr�make_modus

z_add_c_module.<locals>.make_modr9cseZdZ���fdd�ZdS)z)_add_c_module.<locals>.build_ext_make_modcs:�jddkr,t|dd�}�|j|��jd<��|�dS)Nrz$PLACEHOLDERrA)r=�getattrZ
build_temp�run)�selfrA)�
base_classr)rCrrrE�sz-_add_c_module.<locals>.build_ext_make_mod.runN)r�
__module__�__qualname__rEr)rGr)rCrr�build_ext_make_mod�srJ)N)Zdistutils.corer7�setuptools.command.build_extr9�distutils.dir_utilr:�	distutilsr;�cffir<�extend�popr8Zext_modules�append�cmdclass�get)
r(r*r+r,r-r.r7r9Z
allsourcesrJr)
rGr)r*r;rCr:r+r<r,r-rr'hs 

r'cs�ddlm�ddlm}ddlm}ddlm�ddlm	������fdd��|j
�d	|��G���fd
d�d��}||j
d	<|jdkr�g|_|j�
��|j
�d|��G���fd
d�d��}||j
d<dS)Nr)r:)�build_py)r9)r;)r<cs>��d|��tj�|������|�}|s:��d�dS)Nzgenerating cffi module %rzalready up-to-date)r@rr �dirnameZmake_py_source)Zpy_filerB)r*r;r:r+r<rr�generate_mod�s
z$_add_py_module.<locals>.generate_modrTcs*eZdZ���fdd�Z��fdd�ZdS)z)_add_py_module.<locals>.build_py_make_modcs@��|���d�}|dd7<�tjj|jf|���dS)Nr���z.py)rErrr r?Z	build_lib)rF�module_path)rGrVr+rrrE�s

z-_add_py_module.<locals>.build_py_make_mod.runcs6|j}z"|r �fdd�|D�|_��|�S||_XdS)Ncsg|]}|�kr|�qSrr)�.0�m)r+rr�
<listcomp>�szN_add_py_module.<locals>.build_py_make_mod.get_source_files.<locals>.<listcomp>)�
py_modules�get_source_files)rFZsaved_py_modules)rGr+rrr]�s
z:_add_py_module.<locals>.build_py_make_mod.get_source_filesN)rrHrIrEr]r)rGrVr+rr�build_py_make_mod�sr^r9cseZdZ���fdd�ZdS)z*_add_py_module.<locals>.build_ext_make_modcsb��|�|jr^��d�}d�|dd��}|�d�}|�|�}|dd}�tj�||��dS)NrrWrTz.py)rEZinplacerr?Zget_finalized_commandZget_package_dirrr )rFrX�packagerTZpackage_dir�	file_name)�base_class_2rVr+rrrE�s



z._add_py_module.<locals>.build_ext_make_mod.runN)rrHrIrEr)rarVr+rrrJ�srJ)rLr:Zsetuptools.command.build_pyrTrKr9rMr;rNr<rRrSr\rQ)r(r*r+rTr9r^rJr)rGrar*rVr;r:r+r<rr&�s


r&cCs8|dkst�t|t�r|g}x|D]}t||�q"WdS)N�cffi_modules)�AssertionErrorrrr/)r(�attr�valueZcffi_modulerrrrb�s


rb)rr1r�	NameErrorrrrr/r8r'r&rbrrrr�<module>s

-.=