YL i$fddlZddlZddlZ edZdZdZdZ dZ dZ dZ y#e$reZYwxYw) Ncddlm}||)Nr)DistutilsSetupError)cffi._shimmed_dist_utilsr)msgrs Y/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/cffi/setuptools_ext.pyerrorr s< c ""ct|5}|j}ddddz }t||d}t|||y#1swY)xYw)N exec)openreadcompiler )filenameglobfsrccodes rexecfilersP h1ffh4KC 3& )DtT s AAcddlm}t|ts!t dt |j t|} |jd\}}tjjsRd}|jddd z}tjj|r d |dzzd }t |d |d |d}t|| |}t|s|}t||s$t |dt |j dt!|dst |d|j"\} } } } |j$r!| j'} |j)| | t+||| yt-||| | | | y#t$rt |dY^wxYw#t$rt |ddYwxYw)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 + >225 68}H(0s(;% 77>>/ *#++C5= 77>>) $C,.1C LM&ODH _h'D|$ c3 e c3  h6:3i6H6HJ K 3* + hHI252F2F/K)4 yy{ ""4( ~tS+.dCf6FME    D X5AC DDs$FF:F76F7:GGcddlm}ddlm}d|vrRt t dsB|j r6ddl} t|jjdd}|dk\rd |d<tjd r'|jdr|jd d |d<|jdd ur!|j!d gj#d|S#t$rd |d<YwxYw)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_apirZJs"-$WS:L-M** *'*:+A+A+K+KC+PQR+S'T $'2-)-%& 12 88$ % HHL M!&  xx !U* ,334RS K! *&*D! "  *s1CC&%C&c  ddlm}ddlm}m mddlmdg}|j|jdgt||}|d |d| d  fd |jg|_ |jj |jjd | G fd d } | |jd <y)Nr build_ext)rXrBmkpathrC $PLACEHOLDERsources)namer`ctjj| z}jd|z|| | j  |}|sjd|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_modssfk4D&DE ,v56v   C **3 VVL HH) * r r]ceZdZfdZy))_add_c_module..build_ext_make_modcjddk(r-t|dd}|j|jd<j|y)Nrr_rg)r`getattr build_temprun)selfrg base_classr8rjs rrpz-_add_c_module..build_ext_make_mod.runsE{{1~/!$ 48!)$//7!C A NN4 r Nr __module__ __qualname__rp)rrr8rjsrbuild_ext_make_modrls !r rvN)setuptools.command.build_extr]rrXrBr^rKrDextendpoprZ ext_modulesrWcmdclassrT)r4r;r<r=r>r?r]rX allsourcesrvrrr8rBrjr^rDs ```` @@@@@@rr3r3ws6?? !Jdhhy"-. y$ /D  Aj AD AC   C ""; :J!!Z! "4DMM+r c ddlm}ddlm}ddlm m ddlm   fd |jjd|G fdd }||jd<|jg|_ |jj|jjd |G fd d }||jd <y) Nr)build_pyr\)rBr^rCcjd|ztjj|j |}|sjdyyrc)rUr)r*dirnamemake_py_source)py_filerir;rBr^r<rDs r generate_modz$_add_py_module..generate_modsS ,w67rwww'(++CgF HH) *r rc(eZdZfdZfdZy))_add_py_module..build_py_make_modcj|jd}|dxxdz cc<tjj|j g|y)Nrr)rpr'r)r*rd build_lib)rq module_pathrrrr<s rrpz-_add_py_module..build_py_make_mod.runsK NN4 %++C0K Ou $O dnnC{C Dr c|j} |r|Dcgc] }|k7r| c}|_j|||_Scc}w#||_wxYwrx) py_modulesget_source_files)rqsaved_py_modulesmrrr<s rrz:_add_py_module..build_py_make_mod.get_source_filess] $  3#2B'>Q,-,<()'>DO!2248"2 '>#3sAAAA AN)rrtrurpr)rrrr<srbuild_py_make_modrs E 3r rr]ceZdZfdZy)*_add_py_module..build_ext_make_modc,j||jrvjd}dj|dd}|j d}|j |}|ddz}t jj||yy)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 "||)//4 ((;s#3455jA&66w? 'Oe3 RWW\\+yABr Nrs)rrr<srrvrs  Cr rv) setuptools.command.build_pyrryr]rrBr^rKrDr}rTrrW) r4r;r<rr]rrvrrrrrBr^rDs `` @@@@@@rr2r2s464++"":x8J33J3"!2DMM* OO;'==$$[) !! !%$+ k*+r ) r)rLrRr$ NameErrorr&rrr@rZr3r2rrwr rrsU  # +NZ+Z%4X:4x+qJs &00