Your IP : 18.116.28.79


Current Path : /opt/alt/python310/lib64/python3.10/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/__pycache__/sysconfig.cpython-310.opt-1.pyc

o

6��f�k�@sDdZddlZddlZddlmZmZgd�ZdhZdddd	d
ddd
d�dddddddd
d�dddddddd
d�d�Zdd�Z	e	�duZ
e
reedddddddd�d d d!d!d"d#dd�d$d$d%d%d"d#dd�d&�OZdZej�
�dZejd�d'ejd(��Zejd�ejd(��Zej�ej�Zej�ej�Zej�ej�Zej�ej�ZdadZd)Zd*Zd+Z d,d-�Z!ej"r�ej�#e!ej"��Z$ne!e�%��Z$ej&d.kr�e$�'��(d/�r�e!ej�)e$ee��Z$d0ej*vr�e!ej*d0�Z$d1d2�Z+e,ed3d�Z-ej&d.k�rd4d5�Z.e.e$�Z$e.e-�Z-dsd7d8�Z/e/d9�Z0e0�r&d:D]Z1ee1Z1e1d;e1d<<d=e1d;<d>e1d?<�qd@dA�Z2dBdC�Z3dDdE�Z4dFdG�Z5dHdI�Z6dJdK�Z7dtdLdM�Z8dNdO�Z9dPdQ�Z:dRdS�Z;dTdU�Z<dVdW�Z=dudXdY�Z>dZd[�Z?d\d]�Z@d^d_�ZAe7�dd9fd`da�ZBe7�dd9fdbdc�ZCddde�ZDdfdg�ZEdhdi�ZFdjdk�ZGdldm�ZHdndo�ZIdpdq�ZJeKdrk�r�eJ�dSdS)vz-Access to Python's configuration information.�N)�pardir�realpath)�get_config_h_filename�get_config_var�get_config_vars�get_makefile_filename�get_path�get_path_names�	get_paths�get_platform�get_python_version�get_scheme_names�parse_config_hZMACOSX_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�
platstdlib�purelib�platlib�include�platinclude�scripts�dataz{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_home�ntcCs�tj�dd�}|r|StjdkrdSdd�}tjdkr(tj�d�p"d}||d�Stjd	krCtjrC|dd
tjtjd�dtjd
���S|dd�S)N�PYTHONUSERBASE�vxworkscWstj�tjj|��S�N)�os�path�
expanduser�join)�args�r"�0/opt/alt/python310/lib64/python3.10/sysconfig.py�joinuserIsz_getuserbase.<locals>.joinuserr�APPDATA�~�Python�darwin�Libraryr�.�z.local)r�environ�get�sys�platform�name�
_framework�version_info)�env_baser$�baser"r"r#�_getuserbase@s



�
r5z({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_user�osx_framework_userr*r+z"([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_]*)}cCs"zt|�WSty|YSwr)r�OSError)rr"r"r#�_safe_realpath�s

�r:r)z\pcbuild\win32z\pcbuild\amd64Z_PYTHON_PROJECT_BASEcCs,dD]}tj�tj�|d|��rdSqdS)N)ZSetupzSetup.localZModulesTF)rr�isfiler )�d�fnr"r"r#�_is_python_source_dir�s
�r>�_homecCs0|rtj�|��tj�tj�td���rtS|S)NZPCbuild)rr�normcase�
startswithr �_PREFIX)r<r"r"r#�_fix_pcbuild�s
�rCFcCs|rtrtt�Stt�Sr)�	_sys_homer>�
_PROJECT_BASE)Z
check_homer"r"r#�is_python_build�srFT)rrrZheadersz{srcdir}/Includez{projectbase}/.rcCshz	|jdi|��WSty3}zz|jditj��WWYd}~Sty.t|��d�wd}~ww)Nr")�format�KeyErrorrr,�AttributeError)�sZ
local_vars�varr"r"r#�_subst_vars�s ���rLcCs0|��}|��D]
\}}||vrq|||<qdSr)�keys�items)Ztarget_dictZ
other_dictZtarget_keys�key�valuer"r"r#�_extend_dict�s
�rQcCsbi}|duri}t|t��t|��D]\}}tjdvr#tj�|�}tj�t	||��||<q|S)N)�posixr)
rQr�_INSTALL_SCHEMESrNrr0rr�normpathrL)�scheme�vars�resrOrPr"r"r#�_expand_vars�s
rXcCs>tjdkrdddd�Stjdkrtjrdddd�Sdddd�S)	Nrrr6)�prefix�home�userr(rr8r7)rr0r.r/r1r"r"r"r#�_get_preferred_schemes�s
���r\cCs*t�|}|tvrt|�d|�d���|S)Nz
 returned z., which is not a valid scheme on this platform)r\rS�
ValueError)rOrUr"r"r#�get_preferred_scheme�s
�r^cCstd�S)NrY)r^r"r"r"r#�get_default_schemesr_c	CsVddl}|dur
i}i}i}t|t��dd��}|��}Wd�n1s&wY|D]S}|�d�s:|��dkr;q-|�t|�}	|	r�|	�	dd�\}
}|��}|�
d	d�}d
|vr^|||
<q-z|
tvret�t
|�}Wnty{|�
d	d
�||
<Yq-w|||
<q-t|���}
d}t|
�dk�r�t|
�D]�}||}|�t|�}|�t|�}|r�|r�|��|��kr�|n|}	n|r�|n|}	|	du�r{|	�	d�}
d}|
|vr�t||
�}n@|
|vr�d
}n9|
tjvr�tj|
}n.|
|v�r|�d�r�|dd�|vr�d}nd|
|v�rd
}nt|d|
�}nd||
<}|�rz||	��d�}|d|	���||}d
|v�r5|||<q�z
|tv�r=t�t
|�}Wnt�yR|��||<Ynw|||<|
�|�|�d��rz|dd�|v�rz|dd�}||v�rz|||<q�|�r�|||<|
�|�q�t|
�dks�|��D]\}}t|t��r�|��||<�q�|�|�|S)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.
    rN�surrogateescape)�encoding�errors�#�r+�z$$�$)ZCFLAGSZLDFLAGSZCPPFLAGSTFZPY_�)�re�openr.�getfilesystemencoding�	readlinesrA�strip�match�_variable_rx�group�replace�_ALWAYS_STRr]�int�listrM�len�tuple�search�_findvar1_rx�_findvar2_rx�start�strrr,�end�removerN�
isinstance�update)�filenamerVZkeep_unresolvedrhZdoneZnotdone�f�lines�line�m�n�vZtmpvZ	variablesZrenamed_variablesr0rPZm1Zm2�found�itemZafter�kr"r"r#�_parse_makefiles�
�
�
��







�

��D�
r�cCshtrtj�tptd�Sttd�rdt�tj	��}nd}ttj
d�r*|dtj
j��7}tj�td�|d�S)z Return the path of the Makefile.ZMakefile�abiflagszconfig-Zconfig�
_multiarch�-r)
�
_PYTHON_BUILDrrr rDrE�hasattrr.�_PY_VERSION_SHORTr��implementationr�r)Zconfig_dir_namer"r"r#r�s
rc	Cs2ttjdd�}tj�ddtj�dtj�d|���S)Nr�rdZ_PYTHON_SYSCONFIGDATA_NAMEZ_sysconfigdata_�_)�getattrr.r�rr,r-r�r/)Z	multiarchr"r"r#�_get_sysconfigdata_name�s
�r�c
Csddl}i}t�}zt||�Wn#ty3}zd|��}t|d�r+|�d|j�d�}t|��d}~wwt�}zt|dd��
}t||�Wd�n1sNwYWn#tyw}zd|��}t|d�ro|�d|j�d�}t|��d}~wwt	r�|d	|d
<t
�}dtjvr�ddl
}|�|�}	||	_|	tj|<dt��d
t��}
ttd�r�|
d7}
tj|
dd�tj�|
|d�}t|ddd��}|�d�|�d�|j||d�Wd�n1s�wYtdddd��}|�|
�Wd�dS1s�wYdS)z;Generate the Python module containing build-time variables.rNz,invalid Python installation: unable to open �strerrorz (�)zutf-8)raZLDSHAREDZ	BLDSHAREDr(z
build/lib.r�Zgettotalrefcountz-pydebugT)�exist_okz.py�w�utf8zB# system configuration generated and used by the sysconfig module
zbuild_time_vars = )�streamzpybuilddir.txt)�pprintrr�r9r�r�rrirr�r�r.r/�types�
ModuleType�build_time_vars�modulesrr�r�makedirsrr �write)r�rVZmakefile�e�msgZconfig_hr�r0r��moduleZ
pybuilddirZdestfiler"r"r#�_generate_posix_vars�s\

����

��





�"�r�cCs0t�}t|t�t�dgd�}|j}|�|�dS)z7Initialize the module as appropriate for POSIX systems.r�rN)r��
__import__�globals�localsr�r~)rVr0Z_tempr�r"r"r#�_init_posix�sr�cCsnddl}td�|d<td�|d<td�|d<|��d|d	<d
|d<t|d<tj�ttj	��|d
<d|d<dS)z+Initialize the module as appropriate for NTrNrZLIBDESTrZ
BINLIBDESTrZ	INCLUDEPY�
EXT_SUFFIXz.exeZEXEZVERSIONZBINDIRrdZTZPATH)
�_impr�extension_suffixes�_PY_VERSION_SHORT_NO_DOTrr�dirnamer:r.�
executable)rVr�r"r"r#�_init_non_posix�sr�c	Cs�|duri}ddl}|�d�}|�d�}	|��}|s	|S|�|�}|rH|�dd�\}}z|tvr4t�t|�}Wn	tyBYnw|||<n|�|�}|rVd||�d�<q)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.
    Nrz"#define ([A-Z][A-Za-z0-9_]+) (.*)
z&/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/
Tr+re)rh�compile�readlinermrorqr]rr)	�fprVrhZ	define_rxZundef_rxr�r�r�r�r"r"r#r�s2


��

�rcCsBtrtjdkrtj�tp
td�}n	tpt}ntd�}tj�|d�S)zReturn the path of pyconfig.h.rZPCrz
pyconfig.h)r�rr0rr rDrEr)Zinc_dirr"r"r#rs

rcCsttt��S)z,Return a tuple containing the schemes names.)ru�sortedrSr"r"r"r#r
!sr
cC�tS)z*Return a tuple containing the paths names.)�_SCHEME_KEYSr"r"r"r#r	&sr	cCs|rt||�St|S)z�Return a mapping containing an install scheme.

    ``scheme`` is the install scheme name. If not provided, it will
    return the default scheme for the current platform.
    )rXrS)rUrV�expandr"r"r#r
+s
r
cCst|||�|S)z[Return a path corresponding to the scheme.

    ``scheme`` is the install scheme name.
    )r
)r0rUrVr�r"r"r#r7srcGs�tdur�iattd<ttd<ttd<ttd<ttd<ttd<ttd<ttd	<ttd
<ttd<t	j
td<zt	jtd
<Wn
tyGdtd
<Ynwzt	j
�dd�td<Wn
ty`dtd<Ynwtjdkrjtt�tjdkrstt�t�d�}|dur�|td<tr�t�td<t�dt�}tjdkr�tr�tj�t��}tj�||�}ntj�t��}t|�td<t	jdkr�ddl}|�t�|r�g}|D]
}|�t�|��q�|StS)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.
    NrY�exec_prefixZ
py_versionZpy_version_shortZpy_version_nodotZinstalled_baser4Zinstalled_platbaseZplatbaseZprojectbase�
platlibdirr�rdr*Zpy_version_nodot_platrrRr��SO�userbase�srcdirr(r) �_CONFIG_VARSrB�_EXEC_PREFIX�_PY_VERSIONr�r��_BASE_PREFIX�_BASE_EXEC_PREFIXrEr.r�r�rI�winverrprr0r�r�r-�_HAS_USER_BASEr5r�rr�rr r:r/�_osx_supportZcustomize_config_vars�append)r!r�r�r4r�Zvalsr0r"r"r#r?s`
��






rcCs*|dkrddl}|�dtd�t��|�S)z�Return the value of a single variable using the dictionary returned by
    'get_config_vars()'.

    Equivalent to get_config_vars().get(name)
    r�rNz SO is deprecated, use EXT_SUFFIXre)�warnings�warn�DeprecationWarningrr-)r0r�r"r"r#r�srcCs�tjdkr#dtj��vrdSdtj��vrdSdtj��vr dStjStjdks-ttd	�s0tjSd
tjvr:tjd
St��\}}}}}|���	dd�}|�	d
d�}|�	dd�}|dd�dkrf|�d|��S|dd�dkr�|ddkr�d}t
|d�d�d|dd���}ddd�}|d|tj��7}nH|dd�dkr�ddlm
}|�S|dd�d kr�d }ddl}|�d!�}|�|�}	|	r�|	��}n|dd�d"kr�ddl}
|
�t�|||�\}}}|�d|�d|��S)#a�Return 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'.

    rZamd64z	win-amd64z(arm)z	win-arm32z(arm64)z	win-arm64rR�unameZ_PYTHON_HOST_PLATFORM�/rd� r�r�N�ZlinuxZsunosr�5Zsolarisrgr*reZ32bitZ64bit)i���l����Zaix)�aix_platform��cygwinz[\d.]+r()rr0r.�version�lowerr/r�r,r�rprr�maxsizeZ_aix_supportr�rhr�rmror�Zget_platform_osxr)ZosnameZhost�releaser��machineZbitnessr�rhZrel_rer�r�r"r"r#r�sV


"
�

�
�rcCr�r)r�r"r"r"r#r�srcCsdddl}	|�t|�p|�t|�}|r.|��\}}|d|�|�|�d��||d�}n	|Sq)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'.
    rNTr+)rhrvrwrx�spanr-ro)rJrVrhr�Zbegr{r"r"r#�expand_makefile_vars�s*�r�cCsNtt|����D]\}\}}|dkrt|�d��td|�d|�d��qdS)Nrz: �	z = "�")�	enumerater�rN�print)�titler�indexrOrPr"r"r#�_print_dict
s
�r�cCsrdtjvr
t�dStdt��d��tdt��d��tdt��d��t�tdt��t�tdt	��dS)	z*Display all information sysconfig detains.z--generate-posix-varsNzPlatform: "r�zPython version: "zCurrent installation scheme: "ZPathsZ	Variables)
r.�argvr�r�rrr_r�r
rr"r"r"r#�_mains
r��__main__)F)NTr)L�__doc__rr.Zos.pathrr�__all__rqrSr5r�r�r��splitr�r2r�r�rrTrYrB�base_prefixr�r�r��base_exec_prefixr�r�Z
_USER_BASErnrwrxr:r�r�rE�getcwdr0r��endswithr r,r>r�rDrCrFr�rUrLrQrXr\r^r_r�rr�r�r�r�rrr
r	r
rrrrrr�r�r��__name__r"r"r"r#�<module>s��
���&
�
�
��
�

	



?
"SQ

�

?>