Ë �ò˜ós0†ãóf—dZddlZddlZddlZddlZddlZddlmZddlm Z ddl m Z dejvZ ejjej «Zejjej$«Zejjej(«Zejjej,«Zdej0vr)ejj3ej0d«Zn\ej6r?ejj9ejj3ej6««Znej:«Zd „Zeed d«Z d „Z!ejDd k(re d „«Z#e#e«Ze#e «Z d„Z$e$«Z%dZ& e%s ejNZ&d„Z)d%d„Z*e d„«Z+d„Z,d„Z-d„Z.d„Z/d„Z0d„Z1d&d„Z2d„Z3d„Z4d„Z5d'd„Z6ejnd«Z8ejnd«Z9ejnd «Z:d'd!„Z;d"„Zd$„Z?y#e($rYŒwxYw)(a�Provide access to Python's configuration information. The specific configuration variables available depend heavily on the platform and configuration. The values may be retrieved using get_config_var(name), and the list of variables is available via get_config_vars().keys(). Additional convenience functions are also available. Written by: Fred L. Drake, Jr. Email: éNé)ÚDistutilsPlatformError)Ú py39compat)Ú pass_noneÚ__pypy__Ú_PYTHON_PROJECT_BASEcót‡—tj|«jd«Štˆfd„dD««S)z] Return True if the target directory appears to point to an un-installed Python. ÚModulesc3ó\•K—|]#}‰j|«j«–—Œ%y­w©N)ÚjoinpathÚis_file)Ú.0ÚfnÚmoduless €úD/usr/lib/python3.12/site-packages/setuptools/_distutils/sysconfig.pyÚ z(_is_python_source_dir..2s(øèø€ÐQÑ8P°"ˆw×Ñ Ó#×+Ñ+×-Ñ8Pùsƒ),)ÚSetupz Setup.local)ÚpathlibÚPathr Úany)Údrs @rÚ_is_python_source_dirr,s/ø€ô �l‰l˜1‹o×&Ñ& yÓ1€GÜ ÓQÑ8PÓQÓ QÐQóÚ_homecó˜—tjj|«jtjj|««S)z, Return True if a is a parent of b. )ÚosÚpathÚnormcaseÚ startswith)Údir_aÚdir_bs rÚ _is_parentr#8s3€ô �7‰7× Ñ ˜EÓ "× -Ñ -¬b¯g©g×.>Ñ.>¸uÓ.EÓ FÐFrÚntcóJ‡—ttf}ˆfd„|D«}t|‰«S)Nc3óv•K—|]0}t‰tjj|d««r|–—Œ2y­w)ÚPCbuildN)r#rrÚjoin)rÚprefixrs €rrz_fix_pcbuild..Es2øèø€ð á"�ܘ!œRŸW™WŸ\™\¨&°)Ó<Ô=ô Ù"ùsƒ69)ÚPREFIXÚ BASE_PREFIXÚnext)rÚprefixesÚmatcheds` rÚ _fix_pcbuildr/As-ø€ôœ;Ð&ˆó á"ó ˆô �G˜QÓÐrcóJ—trtt«Stt«Sr )Ú _sys_homerÚ project_base©rrÚ _python_buildr4Ps€ÝÜ$¤YÓ/Ð/Ü ¤Ó .Ð.rÚcó.—dtjddzS)z–Return a string containing the major and minor Python version, leaving off the patchlevel. Sample return values could be '1.5' or '2.2'. z%d.%dNé)ÚsysÚ version_infor3rrÚget_python_versionr:fs€ð ”S×%Ñ% b qÐ)Ñ )Ð)rcóR—|rtnt}tjj dd«r"tjdj d«}|�|n|} t «dtj›�}||||«S#t$rtdtjz«‚wxYw)a¤Return the directory containing installed Python header files. If 'plat_specific' is false (the default), this is the path to the non-platform-specific header files, i.e. Python.h and so on; otherwise, this is the path to platform-specific header files (namely pyconfig.h). If 'prefix' is supplied, use it instead of sys.base_prefix or sys.base_exec_prefix -- i.e., ignore 'plat_specific'. ÚSTAGING_INCDIRr5ÚincludeÚ_get_python_inc_zFI don't know where Python installs its C header files on platform '%s') ÚBASE_EXEC_PREFIXr+rÚenvironÚgetÚrstripÚglobalsÚnameÚKeyErrorr)Ú plat_specificr)Údefault_prefixÚresolved_prefixÚgetters rÚget_python_incrJns¤€ñ*7Õ%¼K€NÜ ‡z�z‡~�~Ð&¨Ô+ÜŸ™Ð$4Ñ5×<Ñ<¸YÓGˆØ &Ð 2‘f¸€Oð Ü“Ð-¬b¯g©g¨YÐ7Ñ8ˆñ �/ 6¨=Ó 9Ð9øô ò Ü$ð Ü!#§¡ñ )ó ð ð ús ÁBÂ&B&cóH—tjj|«r|SdS)z5 Replace path with None if it doesn't exist. N)rrÚexists)rs rÚ_extantrM‡s€ô —7‘7—>‘> $Ô'ˆ4Ð1¨TÐ1rcóÒ—tr3tjdkr tjj |d«St |«xs"tt||««xs t|«S)N©éér=) ÚIS_PYPYr8r9rrr(Ú_get_python_inc_posix_pythonrMÚ_get_python_inc_from_configÚ_get_python_inc_posix_prefix©r)Ú spec_prefixrFs rÚ_get_python_inc_posixrX�sV€Ý”3×#Ñ# fÒ,Ü�w‰w�|‰|˜F IÓ.Ð.ä$ ]Ó3ò 0Ü Ô.¨}¸kÓJÓ Kò 0ä '¨Ó /ðrcóÀ—tsy|rtxstStjj t d«d«}tjj|«S)zú Assume the executable is in the build directory. The pyconfig.h file should be in the same directory. Since the build directory may not be the source directory, use "srcdir" from the makefile to find the "Include" directory. NÚsrcdirÚInclude)Ú python_buildr1r2rrr(Úget_config_varÚnormpath)rFÚincdirs rrSrS™sF€õ ØÙÜÒ(œLÐ(Ü �W‰W�\‰\œ.¨Ó2°IÓ >€FÜ �7‰7× Ñ ˜FÓ #Ð#rcó*—|€td|zdz«Sy)aj If no prefix was explicitly specified, provide the include directory from the config vars. Useful when cross-compiling, since the config vars may come from the host platform Python installation, while the current Python executable is from the build platform installation. >>> monkeypatch = getfixture('monkeypatch') >>> gpifc = _get_python_inc_from_config >>> monkeypatch.setitem(gpifc.__globals__, 'get_config_var', str.lower) >>> gpifc(False, '/usr/bin/') >>> gpifc(False, '') >>> gpifc(False, None) 'includepy' >>> gpifc(True, None) 'confincludepy' NÚCONFÚ INCLUDEPY)r])rFrWs rrTrT©s$€ð&Ðܘf }Ñ4°{ÑBÓCÐCðrcó€—trdnd}|t«ztz}tjj |d|«S)NÚpypyÚpythonr=)rRr:Ú build_flagsrrr()r)ÚimplementationÚ python_dirs rrUrUÀs5€Ý&‘V¨H€NØÔ"4Ó"6Ñ6¼ÑD€JÜ �7‰7�<‰<˜  ¨:Ó 6Ð6rcó—tr\tjj|d«tjjztjj|d«zStjj|d«S)Nr=ÚPC)r\rrr(ÚpathseprVs rÚ_get_python_inc_ntrlÆs\€Ýô �G‰G�L‰L˜ Ó +Ü�g‰g�o‰oñ ä�g‰g�l‰l˜6 4Ó(ñ )ð ô �7‰7�<‰<˜  Ó *Ð*rcóJ—|r|Stjj|d«S)Nú site-packages)rrr()Ú standard_libÚ libpythonÚ early_prefixr)s rÚ _posix_librrÓs €ÙØÐä�w‰w�|‰|˜I Ó7Ð7rcó—trotjdkr\|€t}|r2tj j |dtjd«Stj j |d«S|}tjjdd«r&tjdjd«d}nd }|€Ctjjdd«r#tjdj|«}n)|€'|r|xrtxst}n|xrtxst}tjd k(r\|s|rt!td d «}nd }trd nd }tj j |||t#«z«}t%||||«Stjdk(rC|r tj j |d«Stj j |dd«St'dtjz«‚)aSReturn the directory containing the Python library (standard or site additions). If 'plat_specific' is true, return the directory containing platform-specific modules, i.e. any module from a non-pure-Python module distribution; otherwise, return the platform-shared library directory. If 'standard_lib' is true, return the directory containing standard Python library modules; otherwise, return the directory for site-specific modules. If 'prefix' is supplied, use it instead of sys.base_prefix or sys.base_exec_prefix -- i.e., ignore 'plat_specific'. rOz lib-pythonrrnÚSTAGING_LIBDIRr5Ú/éÿÿÿÿÚlibÚposixÚ platlibdirrdrer$ÚLibz?I don't know where Python installs its library on platform '%s')rRr8r9r*rrr(Úversionr@rAÚsplitrBr?r+Ú EXEC_PREFIXrDÚgetattrr:rrr)rFror)rqÚ lib_basenameÚlibdirrgrps rÚget_python_libr�Ús¢€õ”3×#Ñ# fÒ,à ˆ>܈FÙ Ü—7‘7—<‘< ¨ ´c·k±kÀ!±nÓEÐ EÜ�w‰w�|‰|˜F OÓ4Ð4à€Lä ‡z�z‡~�~Ð&¨Ô+Ü—z‘zÐ"2Ñ3×9Ñ9¸#Ó>¸rÑB‰ àˆ Ø €~œ"Ÿ*™*Ÿ.™.Ð)9¸2Ô>Ü—‘Ð,Ñ-×4Ñ4°\ÓB‰Ø ˆÙ Ø"Ò7Ô'7ÒF¼;‰Fà"Ò2¤{Ò<´fˆFä ‡w�w�'ÒÙ ™LôœS ,°Ó6‰FðˆFÝ#*™°ˆÜ—G‘G—L‘L ¨°~ÔHZÓH\Ñ7\Ó]ˆ ܘ,¨ °<ÀÓHÐHÜ �‰�DŠÙ Ü—7‘7—<‘< ¨Ó.Ð .ä—7‘7—<‘< ¨¨Ó?Ð ?ä$ð Ü!#§¡ñ )ó ð rc ó—|jdk(�rÏtjdk(r-td«s"ddl}|j t «dt d<tddd d d d d d«\}}}}}}}} dtjvrItjd} d tjvr"|j|«r| |t|«dz}| }dtjvrtjd}d tjvrtjd }dtjvrtjd} n|dz} dtjvr|dztjdz}d tjvr2|dztjd z}|dztjd z}dtjvrK| dztjdz} |dztjdz}|dztjdz}d tjvrtjd }dtjvr|dztjdz} n|dz| z} |dz|z} |j| | | dz|z|||| ¬«dtjvr?|jjdd«r#|jtjd¬«||_yy)zÄDo any platform-specific customization of a CCompiler instance. Mainly needed on Unix, so we can plug in the information that varies across Unices and is stored in Python's Makefile. ÚunixÚdarwinÚCUSTOMIZED_OSX_COMPILERrNÚTrueÚCCÚCXXÚCFLAGSÚCCSHAREDÚLDSHAREDÚ SHLIB_SUFFIXÚARÚARFLAGSÚCPPz -EÚLDFLAGSÚ ÚCPPFLAGS)Ú preprocessorÚcompilerÚ compiler_soÚ compiler_cxxÚ linker_soÚ linker_exeÚarchiverÚRANLIBÚranlib)r›)Ú compiler_typer8Úplatformr]Ú _osx_supportÚcustomize_compilerÚ _config_varsÚget_config_varsrr@r ÚlenÚset_executablesÚ executablesrAÚshared_lib_extension)r”ržÚccÚcxxÚcflagsÚccsharedÚldsharedÚ shlib_suffixÚarÚar_flagsÚnewccÚcppr™Úcc_cmds rrŸrŸs¯€ð ×Ñ Ó'Ü �<‰<˜8Ò #ô"Ð";Ô<Û#à×/Ñ/´ Ô=Ø:@” Ð6Ñ7ô Ø Ø Ø Ø Ø Ø Ø Ø ó ñ Ø Ø Ø Ø Ø Ø Ø Ø ð ”2—:‘:Ñ Ü—J‘J˜tÑ$ˆEؤ§¡Ñ+°×0CÑ0CÀBÔ0Gð! 8¬C°«G¨IÐ#6Ñ6�؈BØ ”B—J‘JÑ Ü—*‘*˜UÑ#ˆCØ œŸ™Ñ #Ü—z‘z *Ñ-ˆHØ ”B—J‘JÑ Ü—*‘*˜UÑ#‰Cà�u‘*ˆCØ œŸ ™ Ñ "Ø #‘~¬¯ © °9Ñ(=Ñ=ˆHØ ”r—z‘zÑ !ؘc‘\¤B§J¡J¨xÑ$8Ñ8ˆFØ #‘~¬¯ © °8Ñ(<Ñ<ˆHØ œŸ™Ñ #ؘ‘)œbŸj™j¨Ñ4Ñ4ˆCؘc‘\¤B§J¡J¨zÑ$:Ñ:ˆFØ #‘~¬¯ © °:Ñ(>Ñ>ˆHØ ”2—:‘:Ñ Ü—‘˜DÑ!ˆBØ œŸ ™ Ñ "ؘC‘x¤"§*¡*¨YÑ"7Ñ7‰Hà˜C‘x (Ñ*ˆHà�c‘˜FÑ"ˆØ× Ñ ØØØ ™  xÑ/ØØØØð !ô ð ”r—z‘zÑ ! h×&:Ñ&:×&>Ñ&>¸xÈÔ&NØ × $Ñ $¬B¯J©J°xÑ,@Ð $Ô Aà(4ˆÕ%ðg(rcó—trntjdk(r-tjj t xst d«}nt xst }tjj |d«Stj«S)z2Return full pathname of installed pyconfig.h file.r$rjz pyconfig.h) r\rrDrr(r1r2Ú sysconfigÚget_config_h_filename)Úinc_dirs rr³r³rsW€åÜ �7‰7�dŠ?Ü—g‘g—l‘l¤9Ò#<´ ¸dÓC‰GäÒ/¤<ˆGÜ�w‰w�|‰|˜G \Ó2Ð2ä×.Ñ.Ó0Ð0rcó*—tj«S)zAReturn full pathname of installed Makefile from the Python build.)r²Úget_makefile_filenamer3rrr¶r¶~s€ä × *Ñ *Ó ,Ð,rcó0—tj||¬«S)zÌParse a config.h-style file. A dictionary containing name/value pairs is returned. If an optional dictionary is passed in as the second argument, it is used instead of a new dictionary. )Úvars)r²Úparse_config_h)ÚfpÚgs rr¹r¹ƒs€ô × #Ñ # B¨QÔ /Ð/rz"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)z\$\(([A-Za-z][A-Za-z0-9_]*)\)z\${([A-Za-z][A-Za-z0-9_]*)}cóF—ddlm}||dddd¬«}|€i}i}i} |j«}|€njtj |«}|rR|j dd«\}} | j «} | jd d «} d | vr| ||<n t| «} | ||<Œ}d } |�r^t|«D�]K} || } tj| «xstj| «}|�r|j d«}d}||vrt||«}no||vrd }nh|tj vrtj |}nB|| vr7| j#d«r | dd| vrd }n#d|z|vrd }nt|d|z«}nd x||<}|sŒÐ| |j%«d}| d|j'«z|z} d |vr| || <�Œ t| «} | || <|| =| j#d«s�Œ.| dd| vs�Œ7| dd} | |vs�ŒB| || <�ŒI|| =�ŒN|r�Œ^|j)«|j+«D])\}} t-| t«sŒ| j «||<Œ+|j/|«|S#t$r| jd d «||<Y�ŒäwxYw#t$r| j «|| <YŒÝwxYw)zÌParse a Makefile-style file. A dictionary containing name/value pairs is returned. If an optional dictionary is passed in as the second argument, it is used instead of a new dictionary. r)ÚTextFilerÚsurrogateescape)Ústrip_commentsÚ skip_blanksÚ join_linesÚerrorsNTr7z$$r5Ú$)r‰r�r’FÚPY_rP)Údistutils.text_filer½ÚreadlineÚ _variable_rxÚmatchÚgroupÚstripÚreplaceÚintÚ ValueErrorÚlistÚ _findvar1_rxÚsearchÚ _findvar2_rxÚstrrr@r ÚendÚstartÚcloseÚitemsÚ isinstanceÚupdate)rr»r½rºÚdoneÚnotdoneÚlineÚmÚnÚvÚtmpvÚrenamed_variablesrDÚvalueÚfoundÚitemÚafterÚks rÚparse_makefileræ”sÝ€õ-á Ø ˜1¨!¸ÐBSô €Bð €yØ ˆØ €DØ€Gà Ø�{‰{‹}ˆØ ˆ<Ø Ü × Ñ ˜tÓ $ˆÙ Ø—7‘7˜1˜a“=‰DˆAˆqØ—‘“ ˆAà—9‘9˜T 2Ó&ˆDà�d‰{Ø�˜’ ð ܘA›�Að  �D˜‘Gð) ð4:Ðò ܘ—MˆDؘD‘MˆEÜ×#Ñ# EÓ*ÒH¬l×.AÑ.AÀ%Ó.HˆAÚØ—G‘G˜A“J�Ø�ؘ‘9ܘt A™w›<‘Dؘ'‘\à!‘EØœ"Ÿ*™*‘_äŸ:™: a™=‘DàÐ+Ñ+Ø—‘ uÔ-°$°q°r°(Ð>OÑ2OØ!™à ™ gÑ-Ø %™ô # 4¨°© ¡?Ó3™à%'Ð'�D˜‘G˜dÚØ! !§%¡%£' )Ð,�EØ! + A§G¡G£IÐ.°Ñ5¸Ñ=�Eؘe‘|Ø(-˜ › ð/Ü$'¨£J˜Eð*/˜D ™JØ# D˜MàŸ?™?¨5Ö1°d¸1¸2°hÐBSÓ6SØ#'¨¨ 8˜DØ#¨4Ó/Ø-2  T£ ð˜D’Mð]"ó ðb‡H�H„Jð— ‘ – ‰ˆˆ1Ü �aœÕ Ø—g‘g“iˆD�ŠGðð ‡H�HˆT„NØ €HøôO"ò3àŸi™i¨¨cÓ2�D˜”Gð3ûô` *ò7Ø).¯©«˜D ›Jð7ús$ IÆ2 JÉI>É=I>ÊJ ÊJ cóè— tj|«xstj|«}|r@|j«\}}|d||j |j d««z||dz}n |SŒr)a¨Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in 'string' according to 'vars' (a dictionary mapping variable names to values). Variables not present in 'vars' are silently expanded to the empty string. The variable values in 'vars' should not contain further variable expansions; if 'vars' is the output of 'parse_makefile()', you're fine. Returns a variable-expanded version of 's'. rrN)rÏrÐrÑÚspanrArÉ)Úsr¸rÜÚbegrÓs rÚexpand_makefile_varsrësr€ð Ü × Ñ  Ó "Ò <¤l×&9Ñ&9¸!Ó&<ˆÙ ØŸ™›‰JˆS�#Ø�!�C�˜4Ÿ8™8 A§G¡G¨A£JÓ/Ñ/°!°C°D°'Ñ9‰Aà Ø €Hð rcóä—t€;tj«j«at j t«|r#|D�cgc]}tj |«‘Œc}StScc}w)aßWith no arguments, return a dictionary of all configuration variables relevant for the current platform. Generally this includes everything needed to build extensions and install both pure modules and extensions. On Unix, this means every variable defined in Python's installed Makefile; on Windows it's a much smaller set. With arguments, return a list of values that result from looking up each argument in the configuration variable dictionary. )r r²r¡ÚcopyrÚadd_ext_suffixrA)ÚargsrDs rr¡r¡sY€ôÐÜ ×0Ñ0Ó2×7Ñ7Ó9ˆ Ü×!Ñ!¤,Ô/á8<©tÓ 4©t tŒL× Ñ ˜TÕ "¨tÑ 4ÐNÄ,ÐNùÒ 4sÁA-cót—|dk(rddl}|jdtd«t«j |«S)z“Return the value of a single variable using the dictionary returned by 'get_config_vars()'. Equivalent to get_config_vars().get(name) ÚSOrNz SO is deprecated, use EXT_SUFFIXr7)ÚwarningsÚwarnÚDeprecationWarningr¡rA)rDròs rr]r].s4€ð  ˆt‚|Ûà� ‰ Ð8Ô:LÈaÔPÜ Ó × Ñ  Ó &Ð&r)rN)rrNr )@Ú__doc__rÚrer8r²rrÂrr5rÚ _functoolsrÚbuiltin_module_namesrRrr^r)r*Ú exec_prefixr}Ú base_prefixr+Úbase_exec_prefixr?r@Úabspathr2Ú executableÚdirnameÚgetcwdrr~r1r#rDr/r4r\rfÚabiflagsÚAttributeErrorr:rJrMrXrSrTrUrlrrr�rŸr³r¶r¹ÚcompilerÇrÏrÑrærër r¡r]r3rrÚrs6ðñ ó Û Û ÛÛå*ÝÝ!à ˜×0Ñ0Ð 0€ð �‰× Ñ ˜#Ÿ*™*Ó %€Ø�g‰g×јsŸ™Ó/€ Ø�g‰g×јsŸ™Ó/€ Ø—7‘7×#Ñ# C×$8Ñ$8Ó9Ðð ˜RŸZ™ZÑ'Ø—7‘7—?‘? 2§:¡:Ð.DÑ#EÓF�Là ‡~‚~Ø—w‘w—‘ r§w¡w§¡°s·~±~Ó'FÓG‰ ð!�r—y‘y“{ˆ òRñ �C˜ $Ó '€ òGð‡7�7ˆd‚?àñ óð ñ   Ó-€LÙ˜YÓ'€Iò/ñ ‹€ ð € ð Ù Ø—l‘lˆ ò*ó:ð2 ñ2ó ð2òò $ò Dò.7ò +ò8ó9 òxY5òx 1ò-ó 0ðˆr�z‰zÐ?Ó@€ ؈r�z‰zÐ:Ó;€ ؈r�z‰zÐ8Ó9€ ói òX ð2€ òOó$ 'øð]ò ñ ð úsÆ"H(È(H0È/H0