D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
3023067
/
root
/
opt
/
saltstack
/
salt
/
lib
/
python3.10
/
distutils
/
__pycache__
/
Filename :
util.cpython-310.pyc
back
Copy
o �j(R � @ s d Z ddlZddlZddlZddlZddlZddlZddlm Z ddl mZ ddlm Z ddlmZ ddlmZ dd � Zd d� Zdd � Zdd� Zdadd� Zdd� Zd*dd�Zd a aadd� Zdd� Zd+dd�Zdd� Z d,d d!�Zd"d#� Z d-d$d%�Z! d.d&d'�Z"G d(d)� d)�Z#dS )/zudistutils.util Miscellaneous utility functions -- anything that doesn't fit into one of the other *util.py modules. � N)�DistutilsPlatformError)�newer)�spawn)�log)�DistutilsByteCompileErrorc C s� t jdkr#dtj�� v rdS dtj�� v rdS dtj�� v r dS tjS dt jv r-t jd S t jd ks7tt d �s:tjS t �� \} }}}}| �� � dd�} |� d d�}|� dd�}| dd� dkred| |f S | dd� dkr�|d dkr�d} dt |d �d |dd� f }ddd�}|d|tj 7 }nL| dd� dkr�dd lm } |� S | dd!� d"kr�d"} t�d#tj�}|�|�}|r�|�� }n| dd!� d$kr�ddl} ddl} | �| j�� | ||�\} }}d%| ||f 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; eg. 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'. �nt�amd64� win-amd64z(arm)� win-arm32z(arm64)z win-arm64Z_PYTHON_HOST_PLATFORM�posix�uname�/� � �_�-N� �linuxz%s-%sZsunosr �5Zsolarisz%d.%s� � �32bit�64bit)i���l ���� z.%s�aix)�aix_platform� �cygwinz[\d.]+�darwinz%s-%s-%s)�os�name�sys�version�lower�platform�environ�hasattrr �replace�int�maxsizeZ_aix_supportr �re�compile�ASCII�match�group�_osx_supportZdistutils.sysconfigZget_platform_osx� sysconfig�get_config_vars)Zosname�host�releaser! �machineZbitnessr Zrel_re�mr. � distutils� r6 �4/opt/saltstack/salt/lib/python3.10/distutils/util.py�get_host_platform sT � � �r8 c C s4 t jdkrdddd�} | �t j�d��pt� S t� S )Nr �win32r r )�x86Zx64ZarmZVSCMD_ARG_TGT_ARCH)r r �getr$ r8 )ZTARGET_TO_PLATr6 r6 r7 �get_platformc s �r<