|i$jddlZddlZddlZ en #e$reZYnwxYwdZdZdZdZ dZ dZ dZ dS) Nc$ddlm}||)Nr)DistutilsSetupError)cffi._shimmed_dist_utilsr)msgrs AC:\PYTHON\_runtimes\venv\Lib\site-packages\cffi/setuptools_ext.pyerrorr s%<<<<<<  c " ""ct|5}|}dddn #1swxYwY|dz }t||d}t|||dS)N exec)openreadcompiler )filenameglobfsrccodes rexecfilers h1ffhh4KC 3& ) )DtTs 155cDddlm}t|ts$t dt |jt|} |d\}}n"#t$rt |dYnwxYwtj |sZd}| ddd z}tj |r d |dz|zd }t |d |d |d}t|| ||}n%#t$rt |d|dYnwxYwt||s |}t||s't |dt |jdt!|dst |d|j\} } } } |jr)| } || | t+||| dSt-||| | | | dS)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 basestringrtyperstrsplit ValueErrorospathexistsreplacerKeyErrorhasattrr!_windows_unicodecopy_apply_windows_unicode_add_py_module _add_c_module) distmod_specrbuild_file_name ffi_var_nameext rewrittenmod_varsffi module_namesourcesource_extensionkwdss radd_cffi_moduler@s h + +6 >>225 6 6 68}}H(0s(;(;%  xx      7>>/ * *N#++C55= 7>>) $ $ 1 1C,...1C LMMM&ODDH _h'''D|$ DDD XXX5A\\C D D D D DD c3  cee c3  K hhh6:3ii6H6H6HJ K K K 3* + +J hhhHIII252F/K)4 )yy{{ ""4((( ~tS+.....dCf6FMMMMMs$A))BBD##EEc ddlm}ddlm}d|vrot t dsZ|jrSddl} t|j dd}|dkrd |d<n#t$rd |d<YnwxYwtj d r/|dr|d d |d<|dd ur)|d gd|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)log recompilerpy_limited_apigettotalrefcountNrTPy_GIL_DISABLEDz5Ignoring py_limited_api=True for free-threaded build.F define_macros)_CFFI_NO_LIMITED_APIN)rrBcffirDr.sysUSE_LIMITED_API setuptoolsint __version__ partitionr( sysconfigget_config_vargetinfo setdefaultappend) Extensionr?rBrDrNsetuptools_major_versions r_set_py_limited_apirZJsU"-,,,,,$$WS:L-M-M$* % *'*:+A+K+KC+P+PQR+S'T'T $'2--)-%& * * *&*D! " " "  *  122' 88$ % % N HHL M M M!&  xx !!U** ,,334RSSS Ks8A++A=<A=c  ddlm}ddlm}m mddlmdg}|| dgt||}|d |d| d  fd |j g|_ |j |j d | G fd d } | |j d <dS)Nr build_ext)rXrBmkpathrC $PLACEHOLDERsources)namer`ctj| z}d|z|| |  |}|sd|SNzgenerating cffi module %rzalready up-to-date)r)r*joinrU make_c_source) tmpdirpre_runc_fileupdatedr8r;rBr^r<rDr=r>s rmake_modz_add_c_module..make_modsfk4D&DEE ,v5666v   GC   **3 VVLL + HH) * * * r r]ceZdZfdZdS))_add_c_module..build_ext_make_modcjddkr*t|dd}|j|jd<|dS)Nrr_rg)r`getattr build_temprun)selfrg base_classr8rjs rrpz-_add_c_module..build_ext_make_mod.runsV{1~//!$ 488!)$/7!C!C A NN4 r Nr __module__ __qualname__rp)rrr8rjsrbuild_ext_make_modrls8 ! ! ! ! ! ! ! ! !r rv)N)setuptools.command.build_extr]rrXrBr^rKrDextendpoprZ ext_modulesrWcmdclassrT)r4r;r<r=r>r?r]rX allsourcesrvrrr8rBrjr^rDs ```` @@@@@@rr3r3wsw666666?????????? !Jdhhy"--... y$ / /D ) Aj A AD A AC              C   ""; ::J!!!!!!!!!Z!!! "4DM+r c ddlm}ddlm}ddlm m ddlm   fd |j d|G fdd }||j d<|j g|_ |j |j d |G fd d }||j d <dS) Nr)build_pyr\)rBr^rCcd|ztj||}|sddSdSrc)rUr)r*dirnamemake_py_source)py_filerir;rBr^r<rDs r generate_modz$_add_py_module..generate_mods{ ,w6777rww''(((++CgFF + HH) * * * * * + +r rc*eZdZfdZfdZdS))_add_py_module..build_py_make_modc|d}|dxxdz cc<tjj|jg|RdS)Nrr)rpr'r)r*rd build_lib)rq module_pathrrrr<s rrpz-_add_py_module..build_py_make_mod.runsj NN4 %++C00K OOOu $OOO LdnC{CCC D D D D Dr c|j} |rfd|D|_|||_S#||_wxYw)Nc g|] }|k| Srwrw).0mr<s r zN_add_py_module..build_py_make_mod.get_source_files..s-'>'>'>Q,-,<,<(),<,<,.build_py_make_mod.get_source_filessr $  3#>'>'>'>'>2B'>'>'>DO!22488"2"22222s ); AN)rrtrurpr)rrrr<srbuild_py_make_modrs] E E E E E E E 3 3 3 3 3 3 3 3r rr]ceZdZfdZdS)*_add_py_module..build_ext_make_modcd||jrd}d|dd}|d}||}|ddz}t j||dSdS)Nrrrr)rpinplacer'rdget_finalized_commandget_package_dirr)r*) rqrpackager package_dir file_name base_class_2rr<s rrpz._add_py_module..build_ext_make_mod.runs   T " " "| C)//44 ((;ss#34455jAA&66w?? 'Oe3  RW\\+yAABBBBB C Cr Nrs)rrr<srrvrsA C C C C C C C C Cr rv) setuptools.command.build_pyrrxr]rrBr^rKrDr|rTrrW) r4r;r<rr]rrvrrrrrBr^rDs `` @@@@@@rr2r2s44444466666644444444+++++++++"":x88J333333333J333"!2DM* O;'''=$$[)< ! ! ! !%$$++ k****++r ) r)rLrRr$ NameErrorr&rrr@rZr3r2rrwr rrs JJJJJ###   +N+N+NZ+++Z%4%4%4X:4:4:4x+++++s