o2 dIdJd'Z?ej@d(ZAdKd,ZBdLd-ZCdLd.ZDdMd/ZEejFd0ZGejFd1ZHejFd2ZIdMd3ZJd4ZKdaLe dNd6ZMe dOd:ZMdPd<ZMe ed=dQdAZNe dRdBZNdRdCZNedSdFZOdS)TaProvide 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: ) annotationsN) TYPE_CHECKINGLiteraloverload) pass_none) CCompiler)py39)DistutilsPlatformError)is_mingw) deprecatedcdS)Nc|SN)fns q/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/setuptools/_distutils/sysconfig.pyzdeprecated.."s"r)messages rr r !s }r__pypy___PYTHON_PROJECT_BASEctj|dtfddDS)z] Return True if the target directory appears to point to an un-installed Python. Modulesc3fK|]+}|V,dSr)joinpathis_file).0rmoduless r z(_is_python_source_dir..As=QQ"w##++--QQQQQQr)Setupz Setup.local)pathlibPathrany)drs @r_is_python_source_dirr&;sD l1oo&&y11G QQQQ8PQQQ Q QQr_homectj|tj|S)z, Return True if a is a parent of b. )ospathnormcase startswith)dir_adir_bs r _is_parentr/Gs8 7  E " " - -bg.>.>u.E.E F FFrntc\ttf}fd|D}t|S)Nc3xK|]4}ttj|d0|V5dS)PCbuildN)r/r)r*join)rprefixr%s rr z_fix_pcbuild..TsW  !RW\\&)<<==       r)PREFIX BASE_PREFIXnext)r%prefixesmatcheds` r _fix_pcbuildr;PsI;&    "    GQrc`trttSttSr) _sys_homer& project_baserrr _python_buildr?_s&0$Y///  . ..rcLtjjdtjjS)zReturn a string containing the major and minor Python version, leaving off the patchlevel. Sample return values could be '1.5' or '2.2'. .)sys version_infomajorminorrrrget_python_versionrGus$ $ ? ?s'7'= ? ??rF plat_specificboolr5 str | Nonereturnstrc|rtnt}||n|}trdn tj} t d|}n+#t $rtdtjdwxYw||||S)aReturn 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'. Nposix_get_python_inc_zCI don't know where Python installs its C header files on platform '')BASE_EXEC_PREFIXr7r r)nameglobalsKeyErrorr )rHr5default_prefixresolved_prefixos_namegetters rget_python_incrY}s*7G%%KN & 2ffO!0ggG 7g778    $ 'G ' ' '    6/6= 9 99s A (A4cHtj|r|ndS)z5 Replace path with None if it doesn't exist. N)r)r*exists)r*s r_extantr\s! 7>>$'' 144T1rcxt|p+tt||pt|Sr)_get_python_inc_posix_pythonr\_get_python_inc_from_config_get_python_inc_posix_prefixr5 spec_prefixrHs r_get_python_inc_posixrcs=$]33 0 .}kJJ K K 0 ' / /rctsdS|rtptStjt dd}tj|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. NsrcdirInclude) python_buildr=r>r)r*r4get_config_varnormpath)rHincdirs rr^r^sW )(L( W\\.22I > >F 7  F # ##rc4|td|zdzSdS)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' NCONF INCLUDEPY)rh)rHrbs rr_r_s*&f}4{BCCCrctrdnd}|tztz}tj|d|S)Npypypythoninclude)IS_PYPYrG build_flagsr)r*r4)r5implementation python_dirs rr`r`s>&4VVHN"4"6"66DJ 7<< : 6 66rctrctj|dtjjztjt jzStj|dS)Nrq)rgr)r*r4pathsepdirname sysconfigget_config_h_filenameras r_get_python_inc_ntr{sh  GLL + +go gooi=??@@ A 7<< * **rcJ|r|Stj|dS)N site-packages)r)r*r4) standard_lib libpython early_prefixr5s r _posix_librs&8w||I777rr~c@|}|#|r|rtpt}n|rtpt}tjdkst rj|s|rttdd}nd}trdnd}tj |||tz}t||||StjdkrC|r tj |dStj |dd Std tjd ) 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'. NrN platlibdirlibrorpr0Libr}z>*h77jnn]K@@ jnn  J   h-- d33 &11h,,:>>*h77 e44 e$$FE**h..h.. e44 Z^^D" % %8bjnnYAAAcF")h&   x/ #cMH4% !  rz ! !h&:&>&>x&N&N !  $ $BJx,@ $ A A A(4%%%[ ,+++rc(tjS)z2Return full pathname of installed pyconfig.h file.)ryrzrrrrzrz~  * , ,,rc(tjS)zAReturn full pathname of installed Makefile from the Python build.)ryget_makefile_filenamerrrrrrrc.tj||S)zParse 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)ryparse_config_h)fpgs rrrs  #BQ / / //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_]*)}c6ddlm}||dddd}|i}i}i} |}|nt|}|r|dd\}} | } | d d } d | vr| ||<n? t| } | ||<n)#t$r| d d ||<YnwxYwd } |rt|D]} || } t | pt | }|rl|d}d}||vrt||}nz||vrd }ns|tjvrtj|}nR|| vrG| dr| dd| vrd }n*d|z|vrd }n t|d|z}nd x||<}|r| |d}| d||z|z} d |vr| || <8 t| } | || <n'#t$r| || <YnwxYw|| =| dr| dd| vr| dd} | |vr| || <|| =|||D]1\}} t-| tr| ||<2|||S)zParse 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)TextFileTsurrogateescape)strip_comments skip_blanks join_lineserrorsNrz$$r@$)rLDFLAGSCPPFLAGSFPY_)distutils.text_filerreadline _variable_rxmatchgroupstripreplaceint ValueErrorlist _findvar1_rxsearch _findvar2_rxrLr)rr,endstartcloseitems isinstanceupdate)rrrrdonenotdonelinemnvtmpvrenamed_variablesrRvaluefounditemafterks rparse_makefilers-,,,,,      B y  DG {{}} <    t $ $  771a==DAq A99T2&&Dd{{  AA  DGG "333iic22DGGG3! 4: /"MM. ". "DDME##E**Hl.A.A%.H.HA+ "GGAJJ99tAw<O2O2O!g-- % #4 ?33%''DGd3!!%%'')),E!+AGGII+.5=Ee||(- /$'JJE*/DJJ *777).DJJJ7$DM??5113d122hBS6S6S#'8D#4//-2T DMM_ /"bHHJJJ   1 a   ggiiDGHHTNNN Hs$!B66#CC-I!I&%I&c$ t|pt|}|rV|\}}|d|||dz||dz}nn|S)aExpand 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'. TrrN)rrrspanrr)srrbegrs rexpand_makefile_varsr s    " " tjat jt|r d|DntS)aWith 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. NcBg|]}t|Sr) _config_varsr)rrRs r z#get_config_vars..8s& 4 4 4tL  T " " 4 4 4r)r ryrcopyr add_ext_suffix)rs rrr)sT 0227799  L)))8< N 4 4t 4 4 4 4,NrzrSO is deprecated, use EXT_SUFFIX. Support will be removed when this module is synchronized with stdlib Python 3.11rR Literal['SO']int | str | NonecdSrrrRs rrhrh;s >ASrcdSrrrs rrhrh@s363rc|dkr ddl}|dtdt|S)zReturn 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_SUFFIXr)warningswarnDeprecationWarningrr)rRrs rrhrhBsH  t|| 8:LaPPP     & &&rrtypec\tj|d}|r|d|n|S)z Add any flags from the environment for the given type. type is the prefix to FLAGS in the environment key (e.g. "C" for "CFLAGS"). FLAGSr)r)rr)rrflagss rrrNs; JNNd>>> * *E!& 1e  e   E1r)FN)rHrIr5rJrKrL)FFN)rHrIr~rIr5rJrKrL)rr rKr)rKrLr)rKr)rrLrrLrKr)rrLrKr )rRrrKr)rRrLrKr)rrLrrLrKrL)P__doc__ __future__r functoolsr)r"rerCrytypingrrrjaraco.functoolsr ccompilerr compatr rr utilr typing_extensionsr builtin_module_namesrrr*rir5r6 exec_prefixr base_prefixr7base_exec_prefixrQrabspathr> executablerxgetcwdr&rr=r/rRr;r?rgrsabiflagsAttributeErrorrGrYr\rcr^r_r`r{rr lru_cacherrrzrrcompilerrrrrr rrhrrrrr3s(  #"""""  3333333333&&&&&& ******,,,,,,, 0 0   #* % %gs// gs// 7##C$899 RZ''7??2:.D#EFFLL ~#wrws~'F'FGG !ry{{ RRR GC$ ' ' GGG7d??  Y  < --L Y''I/// }   #l     D @@@:::::2 22 2 $ $ $ DDD.777 +++888SW, , , , , ^ "T5T5T5T5n---- ---- 0000rz?@@ rz:;; rz899 m m m m `   2  222 2 DDD DOOOO$  xA@@ A 666 6 ' ' ' ' 222 222s& F00F87F8