efI dZddlZddlZddlZddlZddlZddlmZddlm Z ddl m Z dej vZ ejejZejejZejejZejejZdejvr&ejejdZnNejr8ejejejZnejZd Zeed dZ d Z!ej"d kr!e d Z#e#eZe#e Z dZ$e$Z%dZ& e%sej'Z&n #e($rYnwxYwdZ)d%dZ*e dZ+dZ,dZ-dZ.dZ/dZ0dZ1d&dZ2dZ3dZ4dZ5d'dZ6ej7dZ8ej7dZ9ej7d Z:d'd!Z;d"Zd$Z?dS)(aProvide 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_BASEctj|dtfddDS)z] Return True if the target directory appears to point to an un-installed Python. Modulesc3fK|]+}|V,dSN)joinpathis_file).0fnmoduless /builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/setuptools/_distutils/sysconfig.py z(_is_python_source_dir..2s=QQ"w##++--QQQQQQ)Setupz Setup.local)pathlibPathr any)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#8s8 7  E " " - -bg.>.>u.E.E F FFrntc\ttf}fd|D}t|S)Nc3xK|]4}ttj|d0|V5dS)PCbuildN)r#rrjoin)rprefixrs rrz_fix_pcbuild..EsW  !RW\\&)<<==       r)PREFIX BASE_PREFIXnext)rprefixesmatcheds` r _fix_pcbuildr/AsI;&    "    GQrc`trttSttSr ) _sys_homer project_baserr _python_buildr4Ps&0$Y///  . ..rc0dtjddzS)zReturn 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_infor3rrget_python_versionr:fs S%bqb) ))rc|rtnt}||n|} tdtj}n*#t $rt dtjzwxYw||||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'. N_get_python_inc_zFI don't know where Python installs its C header files on platform '%s')BASE_EXEC_PREFIXr+globalsrnameKeyErrorr) plat_specificr)default_prefixresolved_prefixgetters rget_python_incrEns*7G%%KN & 2ffO 7bg778    $ !# )    6/6= 9 99s !:'A!cHtj|r|ndS)z5 Replace path with None if it doesn't exist. N)rrexists)rs r_extantrHs! 7>>$'' 144T1rctr0tjdkr tj|dSt |p+tt||pt|S)Ninclude) IS_PYPYr8r9rrr(_get_python_inc_posix_pythonrH_get_python_inc_from_config_get_python_inc_posix_prefixr) spec_prefixrAs r_get_python_inc_posixrTsh/3#f,,w||FI...$]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_buildr1r2rrr(get_config_varnormpath)rAincdirs rrOrOsW )(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)rY)rArSs rrPrPs*&f}4{BCCCrctrdnd}|tztz}tj|d|S)NpypypythonrM)rNr: build_flagsrrr()r)implementation python_dirs rrQrQs>&4VVHN"4"6"66DJ 7<< : 6 66rctrStj|dtjjztj|dzStj|dS)NrMPC)rXrrr(pathseprRs r_get_python_inc_ntrhs`  GLL + +go gll64(( ) 7<< * **rcJ|r|Stj|dS)N site-packages)rrr() standard_lib libpython early_prefixr)s r _posix_librns&8w||I777rctrltjdkr\|t}|r1tj|dtjdStj|dS|}|#|r|rtpt}n|rtpt}tj dkrj|s|rttdd}nd}trd nd }tj|||tz}t||||Stj d krC|r tj|d Stj|d dStd tj z)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'. rJNz lib-pythonrrjposix platlibdirlibr`rar$Libz?I don't know where Python installs its library on platform '%s')rNr8r9r*rrr(versionr=r+ EXEC_PREFIXr?getattrr:rnr)rArkr)rmlibdirrcrls rget_python_librxss53#f,, >F  F7<< ck!nEE Ew||FO444L ~  ="7'7F;FF"2{>H 2:  D!B  " "Cx"*Y"77HHCx(*HcF"   x/ !    rz ! !h&:&>&>x&N&N !  $ $BJx,@ $ A A A(4%%%g('rc trktjdkr-tjt pt d}nt pt }tj|dStjS)z2Return full pathname of installed pyconfig.h file.r$rfz pyconfig.h) rXrr?rr(r1r2 sysconfigget_config_h_filename)inc_dirs rrrjs`1 7d??gll9#< dCCGG/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_varsrs    " " 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|Sr3)rr)rr?s r z#get_config_vars..#s& 4 4 4tL  T " " 4 4 4r)rrrcopyradd_ext_suffix)argss rrrsT 0227799 !,///8< N 4 4t 4 4 4 4,Nrc|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_SUFFIXr7)warningswarnDeprecationWarningrr)r?rs rrYrY&sH  t|| 8:LaPPP     & &&r)rN)rrNr )@__doc__rrer8rrrrr5r _functoolsrbuiltin_module_namesrNrrZr)r* exec_prefixru base_prefixr+base_exec_prefixr=rabspathr2 executabledirnamegetcwdrrvr1r#r?r/r4rXrbabiflagsAttributeErrorr:rErHrTrOrPrQrhrnrxrrrrcompilerrrrrrrrYr3rrrs   ******!!!!!! 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 ***::::. 22 2 $ $ $ DDD.777 + + +8883 3 3 3 lY5Y5Y5x 1 1 1--- 0000rz?@@ rz:;; rz899 i i i i X   2 OOO$ ' ' ' ' 's: FF  F