Qfy dZddlZddlZddlZddlmZgdZdhZdddd d d d d dddddddd d ddddddddd ddddd d d d d ddddddddd ddZejdk(r eded<neded<dZ e duZ e r!edddddd d!d"d#d#d$d$d%d&d!d"d'd'd(d(d%d&d!d"d)zZd"Z ejjdZej dd*ej d+Zej dej d+Zej&j)ej*Zej&j)ej.Zej&j)ej2Zej&j)ej6Zej:Zdad,a dZ!d-Z"d.Z#d/Z$d0Z%ejLr,ej&jOe%ejLZ(ne%ejRZ(e*ed1dZ+e+re+Z(ejdk(r"e%e(jYe%ed2reZ(d3ejZvre%ejZd3Z(dWd4Z.e.Z/e/rd5D]Z0ee0Z0e0d6e0d7<d8e0d6<d9e0d:<[0d;Z1d<Z2d=Z3d>Z4d?Z5d@Z6dXdBZ7dCZ8dDZ9dEZ:dFZ;dGZdJZ?dKZ@e6ddAfdLZAe6ddAfdMZBdNZCdOZDdPZEdQZFdRZGdSZHdTZIdUZJeKdVk(reJyy)Yz-Access to Python's configuration information.N)realpath) get_config_h_filenameget_config_varget_config_varsget_makefile_filenameget_pathget_path_names get_paths get_platformget_python_versionget_scheme_namesparse_config_hMACOSX_DEPLOYMENT_TARGETz6{installed_base}/{platlibdir}/python{py_version_short}z0{platbase}/{platlibdir}/python{py_version_short}z1{base}/lib/python{py_version_short}/site-packagesz>{platbase}/{platlibdir}/python{py_version_short}/site-packagesz;{installed_base}/include/python{py_version_short}{abiflags}z?{installed_platbase}/include/python{py_version_short}{abiflags}z {base}/binz{base})stdlib platstdlibpurelibplatlibinclude platincludescriptsdataz{installed_base}/lib/pythonz{base}/lib/pythonz{installed_base}/include/pythonz{installed_base}/Libz {base}/Libz{base}/Lib/site-packagesz{installed_base}/Includez{base}/Scripts) posix_prefix posix_homent posix_venvnt_venvrrvenvrc tjjdd}|r|Stjdvryd}tj dk(r,tjjdxsd}||dStjdk(rPtj r@|dd tj tjd d tjd S|dd S)NPYTHONUSERBASE>wasivxworks emscriptencttjjtjj|SN)ospath expanduserjoin)argss 0/opt/alt/python312/lib64/python3.12/sysconfig.pyjoinuserz_getuserbase..joinuserws$ww!!"'',,"566rAPPDATA~PythondarwinLibraryr.z.local)r%environgetsysplatformname _framework version_info)env_baser+bases r* _getuserbaser=nszz~~.5H ||887 ww$zz~~i(/Ch'' ||xCNNY++A./q1A1A!1D0EFH H C ""r,z({userbase}/Python{py_version_nodot_plat}z6{userbase}/Python{py_version_nodot_plat}/site-packagesz0{userbase}/Python{py_version_nodot_plat}/Includez0{userbase}/Python{py_version_nodot_plat}/Scriptsz {userbase})rrrrrrrz0{userbase}/{platlibdir}/python{py_version_short}z5{userbase}/lib/python{py_version_short}/site-packagesz+{userbase}/include/python{py_version_short}z{userbase}/binz{userbase}/lib/pythonz#{userbase}/lib/python/site-packages)nt_user posix_userosx_framework_userr2r3Fz"([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< t|S#t$r|cYSwxYwr$)rOSError)r&s r*_safe_realpathrCs%~  s _homez\PCbuild_PYTHON_PROJECT_BASEc|ddl}|jdtddD]F}tjj tjj td|sFyy) Nrz.check_home argument is deprecated and ignored.) stacklevel)Setupz Setup.localModulesTF)warningswarnDeprecationWarningr%r&isfiler( _PROJECT_BASE) check_homerKfns r*is_python_buildrRsW F(Q  8& 77>>"'',,}iD E' r,)rrrheadersz{srcdir}/Includez{projectbase}/.rc |jdi|S#t$rE} |jditjcYd}~S#t$rt |dwxYwd}~wwxYw)N)formatKeyErrorr%r4AttributeError)s local_varsvars r* _subst_varsr\se5qxx%*%% 5 5188)bjj) ) 5 C5* 4 55s% A"AA"AAA"ch|j}|jD]\}}||vr |||<yr$)keysitems) target_dict other_dict target_keyskeyvalues r* _extend_dictres<""$K &&( U +   C)r,cfi}|i}t|ttjdk(r|ddiz}t|j D]b\}}tjdvrtj j|}tj jt||||<d|S)Nr platlibdirlib)posixr) rerr%r8_INSTALL_SCHEMESr_r&r'normpathr\)schemevarsresrcrds r* _expand_varsro s C |() ww$|U++&v.446 U 77o %GG&&u-E77##Kt$<=C7 Jr,ctjdk(rddddStjdk(rtjrddddSddddS) Nrrr>)prefixhomeuserr0rr@r?)r%r8r6r7r9rUr,r*_get_preferred_schemesrts\ ww$    ||xCNN$ (  ! r,c|dk(r"tjtjk7ryt|}|tvrt |d|d|S)Nrqrz returned z., which is not a valid scheme on this platform)r6rq base_prefixrtrj ValueError)rcrls r*get_preferred_schemerx0sZ h3::8 # %c *F %%gZz*    Mr,ctdS)Nrq)rxrUr,r*get_default_schemerz<s  ))r,Tc ddl}|i}i}i}t|tjd5}|j }dddD]}|j ds|j dk(r(|jt|} | sA| jdd\} } | j } | jd d} d | vr| || < | tvrtt| } | || <t|j} d }t!| dkDrt#| D]}||}|j%t&|}|j%t(|}|r(|r&|j+|j+kr|n|} n|r|n|} | .| jd} d }| |vrt-|| }no| |vrd }nh| t.j0vrt.j0| }nB| |vr7|j dr |dd|vrd}n#d| z|vrd }nt-|d| z}ndx|| <}|s|| j3d}|d| j+z|z}d |vr|||<8 |tvrtt|}|||<| j5||j ds{|dd|vs|dd}||vs|||<|r|||<| j5|t!| dkDr|j7D])\}} t9| t,s| j ||<+|j;||S#1swYxYw#t$r| jd d || <YwxYw#t$r|j ||<Y wxYw)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. rNsurrogateescape)encodingerrors#r3rGz$$$)CFLAGSLDFLAGSCPPFLAGSTFPY_)reopenr6getfilesystemencoding readlines startswithstripmatch _variable_rxgroupreplace _ALWAYS_STRrwintlistr^lentuplesearch _findvar1_rx _findvar2_rxstartstrr%r4endremover_ isinstanceupdate)filenamermkeep_unresolvedrdonenotdoneflineslinemnvtmpv variablesrenamed_variablesr8rdm1m2founditemafterks r*_parse_makefiler@s | DG h!:!:!<& (+,  ( ??3 4::<2#5  HH\4 ( 771a=DAq A99T2&Dd{   K'((AA  DG-2W\\^$I : i.1 )$DDME</B</Bb((*rxxz1BrB"}GGAJ9tAw> 77<<*OZ HHr,c ttjdd}tjj ddtj dtjd|S)Nrr_PYTHON_SYSCONFIGDATA_NAME_sysconfigdata__)getattrr6rr%r4r5rr7) multiarchs r*_get_sysconfigdata_namersL**L"=I ::>>$ #,,qa {C r,c>ddl}i}t} t||t } t|d5}t||dddtr|d |d <t}d tjvr/ddl }|j|} || _| tj |<d t#d t$} t tdr| dz } t'j(| dt&j*j-| |dz} t| dd5}|j/d|j/d|j||dddtddd5}|j/| dddy#t$r3}d|}t |dr|d|j d}t|d}~wwxYw#1swYzxYw#t$r3}d|}t |dr|d|j d}t|d}~wwxYw#1swYxYw#1swYyxYw)z;Generate the Python module containing build-time variables.rNz,invalid Python installation: unable to open strerrorz ()zutf-8)r}LDSHARED BLDSHAREDr0z build/lib.rgettotalrefcountz-pydebugT)exist_okz.pywutf8zB# system configuration generated and used by the sysconfig module zbuild_time_vars = )streamzpybuilddir.txt)pprintrrrBrrrrrrrr6r7types ModuleTypebuild_time_varsmodulesr rr%makedirsr&r(write) rrmmakefileemsgconfig_hrr8rmodule pybuilddirdestfiles r*_generate_posix_varsrs D$&H$'%&H (W - 1d #. ,[ # $D3<<!!$'!%" Dln-Q/@.ABJs&'j KK T*ww||Ju 5H hf - * + $% d1 % . f 5   6 5i  Z   h 6F ww' 77??#8#:;DWW\\$/F WW__%:%<=F+F3L ||x**<8 $W &#% Z & 302 ,-3s$H15'I 1II I I ctst5t tddd|r/g}|D]&}|j tj |(|StS#1swY@xYw)anWith no arguments, return a dictionary of all configuration variables relevant for the current platform. 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. N)r_CONFIG_VARS_LOCKrrappendr5)r)valsr8s r*rrs\ $  #!#  D KK ((. /  s AA&c4tj|S)zReturn the value of a single variable using the dictionary returned by 'get_config_vars()'. Equivalent to get_config_vars().get(name) )rr5)r8s r*rrs    &&r,cHtjdk(rsdtjj vrydtjj vrydtjj vrytj Stjdk7st td stj Sd tjvrtjd Stj\}}}}}|j jd d }|jd d}|jd d}|dddk(r|d|S|dddk(rB|ddk\rd}t|ddz d|dd}ddd}|d|tjz }n|dddk(r ddl m }|S|ddd k(r;d }ddl}|jd!}|j!|} | r=| j#}n,|ddd"k(r$ddl} | j't)|||\}}}|d|d|S)#aReturn a string that identifies the current platform. This is used mainly to distinguish platform-specific build directories and platform-specific built distributions. Typically includes the OS name and version and the architecture (as supplied by 'os.uname()'), although the exact information included depends on the OS; on Linux, the kernel version isn't particularly important. Examples of returned values: linux-i586 linux-alpha (?) solaris-2.6-sun4u Windows will return one of: win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc) win32 (all others - specifically, sys.platform is returned) For other non-POSIX platforms, currently just returns 'sys.platform'. ramd64z win-amd64z(arm)z win-arm32z(arm64)z win-arm64riuname_PYTHON_HOST_PLATFORM/r rrNlinuxsunosr5solarisrr2rG32bit64bit)ilaix) aix_platformcygwinz[\d.]+r0)r%r8r6versionlowerr7rr4r%rrmaxsize _aix_supportr1rrrrrget_platform_osxr) osnamehostreleaser4machinebitnessr1rrel_rerrs r*r r s#* ww$ ckk'') ) ckk'') )  ))+ +|| ww'W!5||"**,zz122/1hhj+FD'7G\\^ # #C ,Fooc3'Gooc3'G bqzW(!G9%% w  1: FWQZ1,-Qwqr{m|U A: UG2,  3%tE7!$% ?r,c@dtjvr tytdt dtdt dtdt dttdtttdty) z*Display all information sysconfig detains.z--generate-posix-varsNz Platform: "rFzPython version: "zCurrent installation scheme: "Paths Variables) r6argvrrHr r rzrKr rrUr,r*_mainrP]s|#((* K 'q )* 0231 56 *+=+?*@ BC G% G _./r,__main__r$)NT)L__doc__r%r6 threadingos.pathr__all__rrjr8r=rrr4splitrr:rrr&rkrqrrvrrrbase_exec_prefixrRLockrrr _USER_BASErrrrCrrrOgetcwdr _sys_homerr4rRrrlr\rerortrxrzrrrrrrrrr r r rrrrr r rCrKrP__name__rUr,r*r]s,3    KHFS I M  0)&&48  )"---1# 8KHFS I M  )"---1#  }HV77d?/ :V/ =V #,.,ADOOII ILNND' .1<<D' )># kk!!$ ''*+1S-=-=a-@,AB!..q1233C3CA3F2GH ''  3:: &ww0 ww0 GG$$S%9%9:#IOO%    5 / -  >>GGOON3>>$BCM#9299;/M C$ '  M77d? m$// l^95 68$ RZZ'"2::.D#EFM ! 0 "&)"9-y.y 1}1 5!$( *}@ I=~!.D /+  ()T (-.T$1>$B<'N+b 4& 0 z Gr,