grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026a —`ã"ã@slddlZddlZzeWney.eZYn0dd„Zdd„Zdd„Zdd „Zd d „Z d d „Z dd„Z dS)éNcCsddlm}||ƒ‚dS)Nr)ÚDistutilsSetupError)Zdistutils.errorsr)Úmsgr©rú9/usr/lib64/python3.9/site-packages/cffi/setuptools_ext.pyÚerror s rcCsTt|ƒ�}| ¡}Wdƒn1s&0Y|d7}t||dƒ}t|||ƒdS)NÚ Úexec)ÚopenÚreadÚcompiler)ÚfilenameÚglobÚfÚsrcÚcoderrrÚexecfiles  & rc Csœddlm}t|tƒs*tdt|ƒjfƒt|ƒ}z| d¡\}}Wn t ydtd|fƒYn0t j   |¡s´d}|  dd¡d }t j   |¡r¤d |d|f}td ||fƒd |d œ}t||ƒz ||}Wn"työtd||fƒYn0t||ƒ�s |ƒ}t||ƒ�s,td|t|ƒjfƒt|dƒ�sFtd|fƒ|j\} } } } |j�rn|  ¡} | | ¡| du�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'ÚÚ.ú/ú.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) ÚdistÚmod_specrZbuild_file_nameZ ffi_var_nameÚextZ rewrittenZmod_varsÚffiÚ module_nameÚsourceÚsource_extensionÚkwdsrrrÚadd_cffi_modulesV   ÿ ÿ    ÿ    ÿ  ÿ   r2cCstddlm}d|vrpttdƒsp|jrpddl}z(t|j d¡dƒ}|dkrRd|d<Wnt ynd|d<Yn0|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©Ú recompilerZpy_limited_apiZgettotalrefcountNréT) Úcffir4r&ÚsysZUSE_LIMITED_APIÚ setuptoolsÚintÚ __version__Ú partitionr )Ú Extensionr1r4r8Zsetuptools_major_versionrrrÚ_set_py_limited_apiIs ÿ  r=c sÞddlm}ddlm}ddlm‰ddlm‰ddlm ‰dg}|  |  dg¡¡t ||ƒ}|fˆ|d œ|¤Ž‰d‡‡‡‡‡‡‡‡ fd d „ ‰|j duržg|_ |j  ˆ¡|j d |¡‰G‡‡‡fd d„dˆƒ} | |jd <dS)Nr)r<©Ú build_ext©Úmkpath©Úlogr3ú $PLACEHOLDERÚsources)ÚnamerEcs\tj |ˆˆ¡}ˆ d|¡ˆ|ƒ|dur:|ˆˆƒˆ ˆˆˆ|¡}|sXˆ d¡|S©Nzgenerating cffi module %rzalready up-to-date)r!r"ÚjoinÚinfoZ make_c_source)ZtmpdirÚpre_runZc_fileÚupdated)r,r-rCrAr.r4r/r0rrÚmake_modws  z_add_c_module..make_modr?cseZdZ‡‡‡fdd„ZdS)z)_add_c_module..build_ext_make_modcs:ˆjddkr,t|ddƒ}ˆ|j|ƒˆjd<ˆ |¡dS)NrrDrJ)rEÚgetattrZ build_tempÚrun)ÚselfrJ©Ú base_classr,rLrrrNŒs z-_add_c_module..build_ext_make_mod.runN©rÚ __module__Ú __qualname__rNrrPrrÚbuild_ext_make_mod‹srU)N)Zdistutils.corer<Úsetuptools.command.build_extr?Údistutils.dir_utilrAÚ distutilsrCr6r4ÚextendÚpopr=Z ext_modulesÚappendÚcmdclassÚget) r*r-r.r/r0r1r<r?Z allsourcesrUr) rQr,r-rCrLrAr.r4r/r0rr)js         r)csÐddlm‰ddlm}ddlm}ddlm‰ddlm ‰‡‡‡‡‡fdd„‰|j   d |¡‰G‡‡‡fd d „d ˆƒ}||j d <|j dur�g|_ |j   ˆ¡|j   d |¡‰G‡‡‡fd d„dˆƒ}||j d <dS)Nrr@)Úbuild_pyr>rBr3cs>ˆ d|¡ˆtj |¡ƒˆ ˆˆ|¡}|s:ˆ d¡dSrG)rIr!r"ÚdirnameZmake_py_source)Zpy_filerK)r-rCrAr.r4rrÚ generate_modŸs z$_add_py_module..generate_modr^cs*eZdZ‡‡‡fdd„Z‡‡fdd„ZdS)z)_add_py_module..build_py_make_modcsBˆ |¡ˆ d¡}|dd7<ˆtjj|jg|¢RŽƒdS)Nréÿÿÿÿr)rNrr!r"rHZ build_lib)rOÚ module_path©rQr`r.rrrN¨s  z-_add_py_module..build_py_make_mod.runcs>|j}z*|r ‡fdd„|Dƒ|_ˆ |¡W||_S||_0dS)Ncsg|]}|ˆkr|‘qSrr)Ú.0Úm)r.rrÚ ³sÿzN_add_py_module..build_py_make_mod.get_source_files..)Ú py_modulesÚget_source_files)rOZsaved_py_modules)rQr.rrrh­s þz:_add_py_module..build_py_make_mod.get_source_filesN)rrSrTrNrhrrcrrÚbuild_py_make_mod§srir?cseZdZ‡‡‡fdd„ZdS)z*_add_py_module..build_ext_make_modcsbˆ |¡|jr^ˆ d¡}d |dd…¡}| d¡}| |¡}|dd}ˆtj ||¡ƒdS)Nrrar^r)rNZinplacerrHZget_finalized_commandZget_package_dirr!r")rOrbÚpackager^Z package_dirÚ file_name©Ú base_class_2r`r.rrrNÉs     z._add_py_module..build_ext_make_mod.runNrRrrlrrrUÈsrU)rWrAZsetuptools.command.build_pyr^rVr?rXrCr6r4r\r]rgr[)r*r-r.r^r?rirUr)rQrmr-r`rCrAr.r4rr(˜s        r(cCs(t|tƒr|g}|D]}t||ƒqdS)N)rrr2)r*ÚattrÚvalueZ cffi_modulerrrÚ cffi_modulesÕs rp) r!r7rÚ NameErrorrrrr2r=r)r(rprrrrÚs   -!.=