HEX
Server: Apache
System: Linux sh-pro142.hostgator.com.br 5.14.0-162.23.1.9991722448259.nf.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 31 18:11:45 UTC 2024 x86_64
User: okform09 (1324)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: //usr/libexec/oracle-cloud-agent/plugins/osms/sysconfig.pyc
a

�6�f�c�
@sdZddlZddlZddlmZmZgd�ZdhZdddd	d
ddd
d�dddddddd
d�dddddddd
d�dddddddd�ddddd d!dd�d"d"d#d#d$d!dd�d%�Zd&Z	e
ed'�s�ejejks�d(ej
vr�d)ZdZej��dZd*ejdd+�Zd,ejdd+�Zej�ej�Zej�ej�Zej�ej�Zej�ej�ZdadZd-d.�Z ej!�rlej�"e ej!��Z#ne e�$��Z#ej%d/k�r�e#�&��'d0��r�e ej�(e#ee��Z#d1ej
v�r�e ej
d1�Z#d2d3�Z)e*ed4d�Z+ej%d/k�r�d5d6�Z,e,e#�Z#e,e+�Z+dnd7d8�Z-e-d9�Z.e.�r6d:D]Z/d;ee/d<<d=ee/d><�qd?d@�Z0dAdB�Z1dCdD�Z2dEdF�Z3dGdH�Z4dodIdJ�Z5dKdL�Z6dMdN�Z7dOdP�Z8dQdR�Z9dSdT�Z:dpdUdV�Z;dWdX�Z<dYdZ�Z=d[d\�Z>e3�dd9fd]d^�Z?e3�dd9fd_d`�Z@dadb�ZAdcdd�ZBdedf�ZCdgdh�ZDdidj�ZEdkdl�ZFeGdmk�reF�dS)qz-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_h�MACOSX_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}/Scriptsz#{userbase}/Python{py_version_nodot}z1{userbase}/Python{py_version_nodot}/site-packagesz+{userbase}/Python{py_version_nodot}/Includez+{userbase}/Python{py_version_nodot}/Scriptsz
{userbase})rrrrrrrz0{userbase}/{platlibdir}/python{py_version_short}z5{userbase}/lib/python{py_version_short}/site-packagesz>{userbase}/{platlibdir}/python{py_version_short}/site-packagesz+{userbase}/include/python{py_version_short}z{userbase}/binz{userbase}/lib/pythonz#{userbase}/lib/python/site-packagesz{userbase}/include)�posix_prefix�
posix_home�nt�nt_user�
posix_user�osx_framework_userF�real_prefix�RPM_BUILD_ROOTz/local�%d.%d�z%d%dcCs&z
t|�WSty |YS0dS�N)r�OSError)�path�r%�!/usr/lib64/python3.9/sysconfig.py�_safe_realpathxs
r'r)z\pcbuild\win32z\pcbuild\amd64�_PYTHON_PROJECT_BASEcCs,dD]"}tj�tj�|d|��rdSqdS)N)�SetupzSetup.local�ModulesTF)�osr$�isfile�join)�d�fnr%r%r&�_is_python_source_dir�sr0�_homecCs0|r,tj�|��tj�tj�td���r,tS|S)N�PCbuild)r+r$�normcase�
startswithr-�_PREFIX)r.r%r%r&�_fix_pcbuild�s
�r6cCs|rtrtt�Stt�Sr")�	_sys_homer0�
_PROJECT_BASE)�
check_homer%r%r&�is_python_build�sr:T)rrz{srcdir}/Includerz{projectbase}/.rc
Csvz|jfi|��WStypz|jfitj��WYStyj}ztd|�d�WYd}~n
d}~00Yn0dS)Nz{%s})�format�KeyErrorr+�environ�AttributeError)�s�
local_vars�varr%r%r&�_subst_vars�srBcCs0|��}|��D]\}}||vr"q|||<qdSr")�keys�items)�target_dict�
other_dict�target_keys�key�valuer%r%r&�_extend_dict�s
rJcCsbi}|duri}t|t��t|��D]4\}}tjdvrFtj�|�}tj�t	||��||<q(|S)N)�posixr)
rJr�_INSTALL_SCHEMESrDr+�namer$�
expanduser�normpathrB)�scheme�vars�resrHrIr%r%r&�_expand_vars�s
rScCstjdkrdStjS)NrKr)r+rMr%r%r%r&�_get_default_scheme�s
rTcCsztj�dd�}|r|Sdd�}tjdkrBtj�d�p6d}||d�Stjdkrptjrp|dd	tjd
tjdd��S|dd�S)
N�PYTHONUSERBASEcWstj�tjj|��Sr")r+r$rNr-)�argsr%r%r&�joinuser�sz_getuserbase.<locals>.joinuserr�APPDATA�~�Python�darwin�Libraryr r!z.local)r+r=�getrM�sys�platform�
_framework�version_info)�env_baserW�baser%r%r&�_getuserbase�s


�rdc	Csrddl}|�d�}|�d�}|�d�}|dur2i}i}i}t|dd��}|��}	Wd�n1sd0Y|	D]�}
|
�d�sr|
��d	kr�qr|�|
�}|rr|�d
d�\}}
|
��}
|
�dd	�}d
|vr�|
||<qrz|t	vr�t
�t|
�}
Wn$t
�y|
�dd
�||<Yqr0|
||<qrt|�
��}d}t|�dk�r8t|�D�]�}||}|�|�}|�|�}|�r�|�r�|��|��k�r�|n|}n|�r�|n|}|du�r|�d
�}d}||v�r�t||�}n�||v�r�d}nx|tjv�r�tj|}n`||v�rD|�d��r|dd�|v�rd	}n$d||v�r2d}nt|d|�}nd	||<}|�r0||��d�}|d|���||}d
|v�r�|||<n�z|t	v�r�t
�t|�}Wn t
�y�|��||<Yn
0|||<|�|�|�d��r0|dd�|v�r0|dd�}||v�r0|||<n|||<|�|��q@�q*|��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.
    rNz"([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_]*)}�surrogateescape)�errors�#��r!z$$�$)�CFLAGS�LDFLAGS�CPPFLAGSTF�PY_�)�re�compile�open�	readlinesr4�strip�match�group�replace�_ALWAYS_STR�
ValueError�int�listrC�len�tuple�search�start�strr+r=�end�removerD�
isinstance�update)�filenamerQrp�_variable_rx�_findvar1_rx�_findvar2_rx�done�notdone�f�lines�line�m�n�v�tmpv�	variables�renamed_variablesrMrI�m1�m2�found�item�after�kr%r%r&�_parse_makefile�s�	


&









�



�


r�cCsdtrtj�tptd�Sttd�r0dttj	f}nd}ttj
d�rP|dtj
j7}tj�td�|d�S)z Return the path of the Makefile.�Makefile�abiflagszconfig-%s%s�config�
_multiarchz-%sr)
�
_PYTHON_BUILDr+r$r-r7r8�hasattrr^�_PY_VERSION_SHORTr��implementationr�r)�config_dir_namer%r%r&rfs
rc
Cs(tj�ddjtjtjttjdd�d��S)N�_PYTHON_SYSCONFIGDATA_NAMEz+_sysconfigdata_{abi}_{platform}_{multiarch}r�rh)�abir_�	multiarch)	r+r=r]r;r^r�r_�getattrr�r%r%r%r&�_get_sysconfigdata_namess��r�c
Csddl}i}t�}zt||�WnLtyl}z4d|}t|d�rP|d|j}t|��WYd}~n
d}~00t�}z6t|��}t||�Wd�n1s�0YWnLty�}z4d|}t|d�r�|d|j}t|��WYd}~n
d}~00t	�r
|d|d<t
�}dtjv�r>ddl
}|�|�}	||	_|	tj|<d	t�tf}
ttd
��r`|
d7}
tj|
dd
�tj�|
|d�}t|ddd��2}|�d�|�d�|j||d�Wd�n1�s�0Ytdddd��}|�|
�Wd�n1�s0YdS)z;Generate the Python module containing build-time variables.rNz.invalid Python installation: unable to open %s�strerrorz (%s)�LDSHARED�	BLDSHAREDr[zbuild/lib.%s-%s�gettotalrefcountz-pydebugT)�exist_okz.py�w�utf8)�encodingzB# system configuration generated and used by the sysconfig module
zbuild_time_vars = )�streamzpybuilddir.txt)�pprintrr�r#r�r�rrrrr�r�r^r_�types�
ModuleType�build_time_vars�modulesrr�r+�makedirsr$r-�write)r�rQ�makefile�e�msg�config_hr�rMr��module�
pybuilddir�destfiler%r%r&�_generate_posix_vars|sL

,





.r�cCs0t�}t|t�t�dgd�}|j}|�|�dS)z7Initialize the module as appropriate for POSIX systems.r�rN)r��
__import__�globals�localsr�r�)rQrM�_tempr�r%r%r&�_init_posix�sr�cCsfddl}td�|d<td�|d<td�|d<|��d|d	<d
|d<t|d<tj�ttj	��|d
<dS)z+Initialize the module as appropriate for NTrNr�LIBDESTr�
BINLIBDESTr�	INCLUDEPY�
EXT_SUFFIXz.exe�EXE�VERSION�BINDIR)
�_impr�extension_suffixes�_PY_VERSION_SHORT_NO_DOTr+r$�dirnamer'r^�
executable)rQr�r%r%r&�_init_non_posix�sr�c	Cs�|duri}ddl}|�d�}|�d�}|��}|s6q�|�|�}|r�|�dd�\}}z|tvrbt�t|�}Wnty~Yn0|||<q(|�|�}|r(d||�d�<q(|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.
    Nrz"#define ([A-Z][A-Za-z0-9_]+) (.*)
z&/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/
rir!)rprq�readlinerurvrxryrz)	�fprQrp�	define_rx�undef_rxr�r�r�r�r%r%r&r�s,




rcCsBtr,tjdkr"tj�tptd�}q4tp(t}ntd�}tj�|d�S)zReturn the path of pyconfig.h.r�PCrz
pyconfig-64.h)r�r+rMr$r-r7r8r)�inc_dirr%r%r&r�s

rcCsttt��S)z,Return a tuple containing the schemes names.)r}�sortedrLr%r%r%r&r
sr
cCstS)z*Return a tuple containing the paths names.)�_SCHEME_KEYSr%r%r%r&r	sr	cCs|rt||�St|SdS)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.
    N)rSrL)rPrQ�expandr%r%r&r
s
r
cCst|||�|S)z[Return a path corresponding to the scheme.

    ``scheme`` is the install scheme name.
    )r
)rMrPrQr�r%r%r&rsrcGs�tdu�rViattd<ttd<ttd<ttd<ttd<ttd<ttd<ttd	<ttd
<ttd<t	j
td<zt	jtd
<Wnty�dtd
<Yn0t
jdkr�tt�dtd<t
jdkr�tt�t�d�}|dur�|td<t�td<t�dt�}t
jdk�r,t�rt
j�t��}t
j�||�}nt
j�t��}t|�td<t	jdk�rVddl}|�t�|�r�g}|D]}|�t�|���qd|StSdS)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�prefix�exec_prefix�
py_version�py_version_short�py_version_nodot�installed_baserc�installed_platbase�platbase�projectbase�
platlibdirr�rhr�TZPATHrKr��SO�userbase�srcdirr[r)�_CONFIG_VARSr5�_EXEC_PREFIX�_PY_VERSIONr�r��_BASE_PREFIX�_BASE_EXEC_PREFIXr8r^r�r�r>r+rMr�r�r]rdr�r$r�rr-r'r_�_osx_support�customize_config_vars�append)rVr�r�rcr��valsrMr%r%r&r sT






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_SUFFIXr!)�warnings�warn�DeprecationWarningrr])rMr�r%r%r&rosrcCs�tjdkrFdtj��vrdSdtj��vr.dSdtj��vr@dStjStjdksZttd	�s`tjSd
tjvrttjd
St��\}}}}}|���	dd�}|�	d
d�}|�	dd�}|dd�dkr�d||fS|dd�dk�r,|ddk�r�d}dt
|d�d|dd�f}ddd�}|d|tj7}n�|dd�dk�rPdd lm
}|�S|dd!�d"k�r�d"}ddl}|�d#�}|�|�}	|	�r�|	��}n2|dd!�d$k�r�ddl}
|
�t�|||�\}}}d%|||fS)&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'.

    r�amd64z	win-amd64z(arm)z	win-arm32z(arm64)z	win-arm64rK�uname�_PYTHON_HOST_PLATFORM�/rh� �_�-N��linuxz%s-%s�sunosr�5�solarisz%d.%sror!�32bit�64bit)i���l����z.%s�aix)�aix_platform��cygwinz[\d.]+r[z%s-%s-%s)r+rMr^�version�lowerr_r�r=r�rwrz�maxsize�_aix_supportrrprqrurvr��get_platform_osxr)�osname�host�releaser�machine�bitnessrrp�rel_rer�r�r%r%r&r{sR


 



�
rcCstSr")r�r%r%r%r&r�srcCsFtt|����D]0\}\}}|dkr0td|�td||f�qdS)Nrz%s: z
	%s = "%s")�	enumerater�rD�print)�titler�indexrHrIr%r%r&�_print_dict�srcCsfdtjvrt�dStdt��tdt��tdt��t�tdt��t�tdt	��dS)z*Display all information sysconfig detains.z--generate-posix-varsNzPlatform: "%s"zPython version: "%s"z!Current installation scheme: "%s"�Paths�	Variables)
r^�argvr�rrrrTrr
rr%r%r%r&�_main�s
r�__main__)F)N)N)H�__doc__r+r^�os.pathrr�__all__rxrL�_PIP_USE_SYSCONFIGr�r��base_prefixr=�_prefix_additionr�r�splitr�rar�r�r$rOr5r�r�r��base_exec_prefixr�r��
_USER_BASEr'r�r�r8�getcwdrMr	�endswithr-r0r�r7r6r:r�rPrBrJrSrTrdr�rr�r�r�r�rrr
r	r
rrrrrrr�__name__r%r%r%r&�<module>s���
���
�
��A	

���
	
	

	?
"OQ