
    Mh"                     b    d dl Z d dlZ	 e n# e$ r eZY nw xY wd Zd Zd Zd Zd Z	d Z
d ZdS )	    Nc                 $    ddl m}  ||           )Nr   )DistutilsSetupError)cffi._shimmed_dist_utilsr   )msgr   s     S/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/cffi/setuptools_ext.pyerrorr   
   s%    <<<<<<

c
"
""    c                     t          |           5 }|                                }d d d            n# 1 swxY w Y   |dz  }t          || d          }t          |||           d S )N
exec)openreadcompiler   )filenameglobfsrccodes        r   execfiler      s     
h 1ffhh              4KC3&))DtTs   155c                 D   ddl m} t          |t                    s$t	          dt          |          j                   t          |          }	 |                    d          \  }}n"# t          $ r t	          |d           Y nw xY wt          j                            |          sZd}|                    dd          d	z   }t          j                            |          rd
|dz   |z   d}t	          |d|           d|d}t          ||           	 ||         }n%# t          $ r t	          |d|d           Y nw xY wt          ||          s
 |            }t          ||          s't	          |dt          |          j        d           t!          |d          st	          |d           |j        \  }	}
}}|j        r)|                                }|                    |           |
t+          | ||	           d S t-          | ||	|
||           d S )Nr   )FFIzCargument to 'cffi_modules=...' must be a str or a list of str, not :z1 must be of the form 'path/build.py:ffi_variable' ./.pyz (rewrite cffi_modules to [z])z does not name an existing file__cffi__)__name____file__z	: object z not found in modulez is not an FFI instance (got )_assigned_sourcez(: the set_source() method was not called)cffi.apir   
isinstance
basestringr   typer   strsplit
ValueErrorospathexistsreplacer   KeyErrorhasattrr!   _windows_unicodecopy_apply_windows_unicode_add_py_module_add_c_module)distmod_specr   build_file_nameffi_var_nameext	rewrittenmod_varsffimodule_namesourcesource_extensionkwdss                r   add_cffi_moduler@      s   h
++ 6>>225 	6 	6 	68}}H(0s(;(;%   xx 	 	 	 	 	 7>>/** N#++C55=	7>>)$$ 	1 	1C,...1CLMMM&ODDH_h'''D|$ D D DXXX5A\\C 	D 	D 	D 	D 	DD c3 ceec3 Khhh6:3ii6H6H6HJ 	K 	K 	K3*++ JhhhHIII252F/K)4
 )yy{{""4(((~tS+.....dCf6FMMMMMs$   A) )BBD# #EEc                     ddl m} d|vrot          t          d          sZ|j        rSddl}	 t          |j                            d          d                   }|dk    rd|d<   n# t          $ r d|d<   Y nw xY w|S )	a7  
    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.
    Recently (2020) we started shipping only >= 3.5 wheels, though.  So
    we'll give it another try and set py_limited_api on Windows >= 3.5.
    r   
recompilerpy_limited_apigettotalrefcountNr      T)
cffirC   r.   sysUSE_LIMITED_API
setuptoolsint__version__	partitionr(   )	Extensionr?   rC   rJ   setuptools_major_versions        r   _set_py_limited_apirP   I   s    "  $$WS:L-M-M$* 	%	*'*:+A+K+KC+P+PQR+S'T'T$'2--)-%& 	* 	* 	* &*D!"""		*
 Ks   8A% %A76A7c           	        
 ddl m} ddlm}mm ddlm dg}|                    |	                    dg                      t          ||          } |d|d|dfd	| j        g | _        | j                                       | j                            d	|          
 G 
fd
d
          }	|	| j        d	<   d S )Nr   	build_ext)rN   logmkpathrB   $PLACEHOLDERsources)namerW   c                    t           j                            | z             }                    d|z              |            | |           	                    
|          }|s                    d           |S Nzgenerating cffi module %rzalready up-to-date)r)   r*   joininfomake_c_source)tmpdirpre_runc_fileupdatedr8   r;   rT   rU   r<   rC   r=   r>   s       r   make_modz_add_c_module.<locals>.make_modu   s    fk4D&DEE,v5666v
 GC**3VVLL 	+HH)***r	   rS   c                       e Zd Z fdZdS ))_add_c_module.<locals>.build_ext_make_modc                     j         d         dk    r*t          | dd           } | j        |          j         d<                       |            d S )Nr   rV   r_   )rW   getattr
build_temprun)selfr_   
base_classr8   rb   s     r   rh   z-_add_c_module.<locals>.build_ext_make_mod.run   sV    {1~//!$	488!)$/7!C!CANN4     r	   Nr   
__module____qualname__rh   )rj   r8   rb   s   r   build_ext_make_modrd      s8        	! 	! 	! 	! 	! 	! 	! 	! 	!r	   rn    )N)setuptools.command.build_extrS   r   rN   rT   rU   rG   rC   extendpoprP   ext_modulesappendcmdclassget)r4   r;   r<   r=   r>   r?   rS   rN   
allsourcesrn   rj   r8   rT   rb   rU   rC   s    ````     @@@@@@r   r3   r3   j   sw   666666?????????? !Jdhhy"--...y$//D
)
Aj
A
AD
A
AC             C   "";	::J! ! ! ! ! ! ! ! !Z ! ! ! "4DM+r	   c                   	
 ddl m} ddlm} ddlm
m ddlm 
fd	| j	        
                    d|           G 	fdd	          }|| j	        d<   | j        g | _        | j                                       | j	        
                    d
|           G 	fdd          }|| j	        d
<   d S )Nr   )build_pyrR   )rT   rU   rB   c                                          d| z              t          j                            |                                          |           }|s                     d           d S d S rZ   )r\   r)   r*   dirnamemake_py_source)py_filera   r;   rT   rU   r<   rC   s     r   generate_modz$_add_py_module.<locals>.generate_mod   s{    ,w6777rww''(((++CgFF 	+HH)*****	+ 	+r	   ry   c                   *    e Zd Z fdZ fdZdS ))_add_py_module.<locals>.build_py_make_modc                                          |                                d          }|dxx         dz  cc<    t          j        j        | j        g|R             d S )Nr   r   )rh   r'   r)   r*   r[   	build_lib)ri   module_pathrj   r~   r<   s     r   rh   z-_add_py_module.<locals>.build_py_make_mod.run   sj    NN4   %++C00KOOOu$OOOLdnC{CCCDDDDDr	   c                     | j         }	 |rfd|D             | _                             |           || _         S # || _         w xY w)Nc                      g | ]
}|k    |S ro   ro   ).0mr<   s     r   
<listcomp>zN_add_py_module.<locals>.build_py_make_mod.get_source_files.<locals>.<listcomp>   s-     '> '> '>Q,-,<,< (),<,<,<r	   )
py_modulesget_source_files)ri   saved_py_modulesrj   r<   s     r   r   z:_add_py_module.<locals>.build_py_make_mod.get_source_files   sr      $3# >'> '> '> '>2B '> '> '>DO!22488"2"22222s	   ); 	AN)r   rl   rm   rh   r   )rj   r~   r<   s   r   build_py_make_modr      s]        	E 	E 	E 	E 	E 	E 	E

	3 
	3 
	3 
	3 
	3 
	3 
	3 
	3r	   r   rS   c                       e Zd Z fdZdS )*_add_py_module.<locals>.build_ext_make_modc                 d                        |            | j        r                    d          }d                    |d d                   }|                     d          }|                    |          }|d         dz   } t          j                            ||                     d S d S )Nr   r   ry   r   )rh   inplacer'   r[   get_finalized_commandget_package_dirr)   r*   )	ri   r   packagery   package_dir	file_namebase_class_2r~   r<   s	         r   rh   z._add_py_module.<locals>.build_ext_make_mod.run   s    T"""| C)//44((;ss#34455jAA&66w??'Oe3	RW\\+yAABBBBBC Cr	   Nrk   )r   r~   r<   s   r   rn   r      sA        		C 		C 		C 		C 		C 		C 		C 		C 		Cr	   rn   )setuptools.command.build_pyry   rp   rS   r   rT   rU   rG   rC   ru   rv   r   rt   )r4   r;   r<   ry   rS   r   rn   rj   r   r~   rT   rU   rC   s    ``    @@@@@@r   r2   r2      s   44444466666644444444+ + + + + + + + + "":x88J3 3 3 3 3 3 3 3 3J 3 3 3" !2DM* O;''' =$$[)<<L
C 
C 
C 
C 
C 
C 
C 
C 
C\ 
C 
C 
C "4DM+r	   c                 p    |dk    sJ t          |t                    r|g}|D ]}t          | |           d S )Ncffi_modules)r#   r$   r@   )r4   attrvaluecffi_modules       r   r   r      sX    >!!!!%$$  + +k****+ +r	   )r)   rH   r$   	NameErrorr&   r   r   r@   rP   r3   r2   r   ro   r	   r   <module>r      s    				 



JJ   JJJ# # #

 
 
+N +N +NZ  B%4 %4 %4X:4 :4 :4x+ + + + +s    