Your IP : 3.139.86.74


Current Path : /proc/self/root/opt/alt/python37/lib64/python3.7/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python37/lib64/python3.7/__pycache__/platform.cpython-37.opt-2.pyc

B

YI~d���@s dZdZddlZddlZddlZddlZddlZddlZy
ejZ	Wn(e
k
rjejdkrbdZ	ndZ	YnXdZdd	d	d
d
dddd
d
d�
Z
e�d�Zdd�Ze�dej�Zejdddfdd�Zdd�Ze�dej�Ze�dej�Ze�dej�ZdZdd�Zdddedfd d!�Zd"d#�Zdddefd$d%�Zd�d(d)�Zd�d*d+�Ze�d,�Z d�d.d/�Z!d0d1d2d3d4d5d6d7d8d9d:d;�Z"d2d<d=d>d?d@dA�Z#d�dBdC�Z$dDdE�Z%d�dGdH�Z&dIdJ�Z'd�dKdL�Z(dMdN�Z)dOdP�Z*d�dQdR�Z+dSdT�Z,d�dUdV�Z-d�dWdX�Z.dYdZd[d-�Z/ejddfd\d]�Z0e�1d^d_�Z2da3d`da�Z4dbdc�Z5ddde�Z6dfdg�Z7dhdi�Z8djdk�Z9dldm�Z:e�dnej�Z;e�doej�Z<e�dp�Z=e�dq�Z>iZ?d�drds�Z@dtdu�ZAdvdw�ZBdxdy�ZCdzd{�ZDd|d}�ZEd~d�ZFd�d��ZGiZHd�d�d��ZeId�k�rd�ejJk�p�d�ejJkZKd�ejJk�od�ejJkZLeMeeLeK��e�Nd�dS)�a
    Copyright (c) 1999-2000, Marc-Andre Lemburg; mailto:mal@lemburg.com
    Copyright (c) 2000-2010, eGenix.com Software GmbH; mailto:info@egenix.com

    Permission to use, copy, modify, and distribute this software and its
    documentation for any purpose and without fee or royalty is hereby granted,
    provided that the above copyright notice appear in all copies and that
    both that copyright notice and this permission notice appear in
    supporting documentation or portions thereof, including modifications,
    that you make.

    EGENIX.COM SOFTWARE GMBH DISCLAIMS ALL WARRANTIES WITH REGARD TO
    THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
    FITNESS, IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL,
    INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
    FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
    NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
    WITH THE USE OR PERFORMANCE OF THIS SOFTWARE !

z1.0.8�N)�dos�win32�win16ZNULz	/dev/nullz/etc�
���(�2��)
ZdevZalpha�aZbeta�b�cZRC�rc�pl�pz([0-9]+|[._+-])c	Csfg}x\t�|�D]N}|dkryt|d�}d}Wn tk
rNt�|d�}YnX|�||f�qW|S)Nz._+-r�dr)�
_component_re�split�int�
ValueError�_ver_stages�get�extend)�version�result�v�t�r�-/opt/alt/python37/lib64/python3.7/platform.py�_comparable_version�s
rsC(__libc_init)|(GLIBC_([0-9.]+))|(libc(_\w+)?\.so(?:\.(\d[0-9.]*))?)�i@c	Cs�t}ttjd�rtj�|�}t|d���X}|�|�}d}�x@|t|�k�rzd|ksZd|krht�	||�}nd}|r�|�
�t|�kr�|�|�}	|	r�|t|t|�d�d�|	}d}q<|s�Pdd�|��D�\}
}}}
}}|
r�|s�d	}n�|�r|d
kr�d
}|}n||�||�k�rp|}n\|
�rp|d
k�rpd	}|�rJ|�rF||�||�k�rJ|}|�rp|t|�d�|k�rp||}|�
�}q<WWdQRX||fS)N�realpath�rbrslibcsGLIBCi�cSs"g|]}|dk	r|�d�n|�qS)N�latin1)�decode)�.0�srrr�
<listcomp>�szlibc_ver.<locals>.<listcomp>Zlibc�glibc)
r�hasattr�os�pathr!�open�read�len�_libc_search�search�end�max�groups)�
executable�librZ	chunksize�V�fZbinary�pos�m�chunkZlibcinitr(ZglibcversionZsoZthreadsZ	soversionrrr�libc_ver�sJ


r;c	Csptj�d�r�d}td��`}xX|D]P}|��}t|�dkr |\}}nq |dkrV|��}q |dkr |�d�}|d}q WWdQRX|||fStj�d�r�td��D}x<|D]4}|�d�}	t|	�dkr�|	dd	kr�d	|	d
|fSq�WWdQRXtj�d��rft�d�}
x:t	t|
�d
dd�D]"}|
|dd
�dk�r|
|=�qW|
�rf|
�
�d}|
dd
d�}|||fS|||fS)Nz/var/adm/inst-log/info�SuSE�ZMIN_DIST_VERSIONZ
DIST_IDENT�-z/etc/.installedrZ	OpenLinux�z/usr/lib/setup����zslack-version-�	slackware)r*r+�existsr,rr.�strip�isdir�listdir�range�sort)�distnamer�idr7�lineZtv�tag�value�valuesZpkgZverfiles�nrrr�_dist_try_harder�s>	










rPz(\w+)[-_](release|version)z'(.+) release ([\d.]+)[^(]*(?:\((.+)\))?z1([^0-9]+)(?: release )?([\d.]+)[^(]*(?:\((.+)\))?)r<ZdebianZfedoraZredhatZcentosZmandrakeZmandrivaZrocksrBZ	yellowdogZgentooZUnitedLinuxZ
turbolinuxZarchZmageiacCszd}d}t�|�}|dk	r&t|���St�|�}|dk	rDt|���S|����}|rp|d}t|�dkrp|d}d||fS)Nr rr?)�_lsb_release_version�match�tupler3�_release_versionrDrr.)�	firstlinerrJr9�lrrr�_parse_release_file0s

rWr?cCs(ddl}|jdtdd�t|||||�S)NrzFdist() and linux_distribution() functions are deprecated in Python 3.5r=)�
stacklevel)�warnings�warn�DeprecationWarning�_linux_distribution)rIrrJ�supported_dists�full_distribution_namerYrrr�linux_distributionKs


r_c	Cs�yt�t�}Wntk
r(|||fSX|��xD|D]0}t�|�}|dk	r8|��\}}	||kr8|}Pq8Wt|||�St	tj
�t|�dddd��}
|
��}WdQRXt
|�\}}}
|r�|r�|}|r�|}|
r�|
}|||fS)N�rzutf-8�surrogateescape)�encoding�errors)r*rF�_UNIXCONFDIR�OSErrorrH�_release_filenamerRr3rPr,r+�join�readlinerW)rIrrJr]r^Zetc�filer9Z	_distnameZdummyr7rUZ_versionZ_idrrrr\Us0

r\cCs*ddl}|jdtdd�t||||dd�S)NrzFdist() and linux_distribution() functions are deprecated in Python 3.5r=)rX)r]r^)rYrZr[r\)rIrrJr]rYrrr�dist�s
rjr`r@cCs&ddl}|jdtdd�t�|||�S)Nrzuse os.popen insteadr=)rX)rYrZr[r*�popen)�cmd�mode�bufsizerYrrrrk�srkcCsd|�d�}|r|�|�ytt|�}Wntk
r>|}YnXttt|��}d�|dd��}|S)N�.�)r�append�maprr�list�strrg)r�buildrVZints�stringsrrr�
_norm_version�s


rwz'(?:([\w ]+) ([\w.]+) .*\[.* ([\d.]+)\])�rrrc	Cs�tj|kr|||fSxddD]R}y&t�|�}|��}|��rBtd��Wn$tk
rh}zwWdd}~XYqXPqW|||fS|��}t�	|�}|dk	r�|�
�\}}}|ddkr�|dd�}|ddkr�|dd�}t|�}|||fS)N)Zverzcommand /c verz
cmd /c verzcommand failedr@ro)�sys�platformr*rkr-�closererD�_ver_outputrRr3rw)	�system�releaserZsupported_platformsrl�pipe�infoZwhyr9rrr�_syscmd_ver�s,





r�Z2000ZXPZ
2003ServerZpost2003�Vista�7�8z8.1zpost8.1Z10Zpost10))�r)r�r?)r�r=)r�N)�r)r�r?)r�r=)r�rp)r�N)rr)rNZ
2008ServerZ2008ServerR2Z
2012ServerZ2012ServerR2Zpost2012ServerR2))r�r=)r�r)r�r?)r�r=)r�rp)r�Nc	Cs�yddlm}Wntk
r,||||fSX|�}|jpD|dd�\}}}d�|||�}t�||f�pxt�|df�px|}|dd�||fkr�yd�|j�}Wn4tk
r�|dd�dkr�d	|dd�}YnXt	|d
d�dk�r
t
�||f��pt
�|df��p|}y0yddl}	Wntk
�r6ddl}	YnXWntk
�rPYnLXy2d}
|	�
|	j|
��}|	�|d�d}WdQRXWntk
�r�YnX||||fS)
Nr)�getwindowsversionrpz{0}.{1}.{2}r=zSP{}�
z
Service Pack ZSPZproduct_typez,SOFTWARE\Microsoft\Windows NT\CurrentVersionZCurrentType)ryr��ImportErrorZplatform_version�format�_WIN32_CLIENT_RELEASESrZservice_pack_major�AttributeError�getattr�_WIN32_SERVER_RELEASES�winreg�_winregZ	OpenKeyEx�HKEY_LOCAL_MACHINEZQueryValueExre)r~r�csd�ptyper�ZwinverZmaj�minrur�Zcvkey�keyrrr�	win32_versDr�c	Cs�d}tj�|�sdSyddl}Wntk
r4dSXt|d��}|�|�}WdQRX|d}d}t��j}|dkrxd}|||fS)Nz0/System/Library/CoreServices/SystemVersion.plistrr"ZProductVersion)r r r )ZppczPower MacintoshZPowerPC)	r*r+rC�plistlibr�r,�load�uname�machine)�fnr�r7rr~�versioninfor�rrr�_mac_ver_xmlEs
r��r r r cCst�}|dk	r|S|||fS)N)r�)r~r�r�r�rrr�mac_ver[sr�cCs@ddlm}y|�|�}|dkr$|S|Stk
r:|SXdS)Nr)�System)�	java.langr�ZgetPropertyr�)�name�defaultr�rMrrr�
_java_getpropns
r�cCs�yddl}Wntk
r(||||fSXtd|�}td|�}|\}}}td|�}td|�}td|�}|||f}|\}}	}
td|
�}
td|�}td	|	�}	||	|
f}||||fS)
Nrzjava.vendorzjava.versionzjava.vm.namezjava.vm.vendorzjava.vm.versionzjava.os.archzjava.os.namezjava.os.version)r�r�r�)r~�vendor�vminfo�osinfo�javaZvm_nameZ
vm_releaseZ	vm_vendor�os_name�
os_version�os_archrrr�java_verys"












r�cCs�|dkrd|||fS|dkr�|dkr0|||fS|�d�}|r�yt|d�}Wntk
rbYn X|d}t|�|d<d�|�}|dkr�d	}q�d	}n,|d
kr�d}|r�|d}q�d
}n|dkr�d}|||fS)NZRhapsodyzMacOS X ServerZSunOS�5rorrp�6ZSolarisZIRIX64ZIRIXz (64bit)�64bit)rr�Windows)rrrrtrg)r}r~rrV�majorrrr�system_alias�s2	



r�cGs�d�dd�tt|�D��}|�dd�}|�dd�}|�dd�}|�dd�}|�d	d�}|�d
d�}|�dd�}|�dd�}|�d
d�}x|�dd�}||kr�P|}q�Wx|ddkr�|dd�}q�W|S)Nr>css|]}|��VqdS)N)rD)r%�xrrr�	<genexpr>�sz_platform.<locals>.<genexpr>� �_�/�\�:�;�"�(�)�unknownr z--r@)rg�filterr.�replace)�argsrzZcleanedrrr�	_platform�s$r�cCsDyddl}Wntk
r |SXy|��Stk
r>|SXdS)Nr)�socketr�Zgethostnamere)r�r�rrr�_node�sr�cCsFtj�|�}x4tj�|�r@tj�tj�tj�|�t�|���}qW|S)N)r*r+�abspath�islink�normpathrg�dirname�readlink)�filepathrrr�_follow_symlinkss
"r�c	Csftjdkr|Syt�d|tf�}Wnttfk
r<|SX|����}|�	�}|rZ|r^|S|SdS)N)rrrzuname %s 2> %s)
ryrzr*rk�DEV_NULLr�rer-rDr{)�optionr�r7�outputrrrr�
_syscmd_unames
r�c	Csztjdkr|St|�}ytjd|gtjtjd�}Wnttfk
rJ|SX|�	�d�
d�}|��}|rn|rr|S|SdS)N)rrrri)�stdout�stderrrzlatin-1)ryrzr��
subprocess�Popen�PIPEZSTDOUTr�reZcommunicater$�wait)�targetr��procr�rrrr�_syscmd_files	

r�)r �	WindowsPE)r r�)r �MSDOScCs*|sLddl}y|�d�}Wn |jk
r:|�d�}YnXt|d�d}|r\t|d�}nd}|s�|tjkr�tjtkr�ttj\}}|r�|}|r�|}||fSd|kr�||fSd|kr�d	}nd
|kr�d}nd|kr�d
}d|kr�d}n>d|k�rd|kr�d}nd}n d|k�rd}nd|k�r"d}n||fS)Nr�PrV��bitr r4z32-bit�32bitZN32Zn32bitz64-bitr�ZELFZPEr�r�ZCOFFzMS-DOSr�)	�struct�calcsize�errorrtr�ryr4rz�_default_architecture)r4�bits�linkager��sizeZfileoutrrVrrr�architectureBsL




r��uname_resultz-system node release version machine processorcCs�d}tdk	rtSd}yt��\}}}}}Wntk
rBd}YnX|sbttd|||||f���s�|r~tj}d}d}t�}d}d}|dkr�t	�\}}}}	|r�|r�d}|s�dtj
kr�tj
�dd�}ntj
�dd�}|s�tj
�d|�}|�r:t|�\}}}|dk�rd	}n4|d
k�r:|d	k�r:d	}d|dd�k�r6d
}nd}|dk�rd|�s^|dk�rZd}nd}d	}n8|dd�dk�r�t
�\}}
}}d}d�|�}|�s�|
}|dk�r|�r�|dk�r�|}d}yddl}
Wntk
�r�Yn&X|
�dd�\}}|dk�rd}nd}|�stdd�}|dk�r$d}|dk�r2d}|dk�r@d}|dk�rNd}|dk�r\d}|dk�rjd}|d
k�r�|d	k�r�d	}d
}t||||||�atS)Nrr r?rZPROCESSOR_ARCHITEW6432ZPROCESSOR_ARCHITECTUREZPROCESSOR_IDENTIFIERzMicrosoft Windowsr�Z	Microsoftz6.0rpr�)rrr�Z16bit�r��Javaz, ZOpenVMS�0zSYI$_CPU�ZAlphaZVAXz-pr�)�_uname_cacher*r�r�rsr�ryrzr�r��environrr�r�rg�vms_libr�Zgetsyir�r�)Zno_os_uname�	processorr}�noder~rr�Zuse_syscmd_verr�r�r�r�r�r�ZcsidZ
cpu_numberrrrr��s�
















r�cCst�jS)N)r�r}rrrrr}%sr}cCst�jS)N)r�r�rrrrr�.sr�cCst�jS)N)r�r~rrrrr~8sr~cCst�jS)N)r�rrrrrrAsrcCst�jS)N)r�r�rrrrr�Jsr�cCst�jS)N)r�r�rrrrr�Ss
r�zL([\w.+]+)\s*\(#?([^,]+)(?:,\s*([\w ]*)(?:,\s*([\w :]*))?)?\)\s*\[([^\]]+)\]?z;IronPython\s*([\d\.]+)(?: \(([\d\.]+)\))? on (.NET [\d\.]+)zU([\d.]+)\s*\(IronPython\s*[\d.]+\s*\(([\d.]+)\) on ([\w.]+ [\d.]+(?: \(\d+-bit\))?)\)zE([\w.+]+)\s*\(#?([^,]+),\s*([\w ]+),\s*([\w :]+)\)\s*\[PyPy [^\]]+\]?cCs|dkrtj}t�|d�}|dk	r&|Sd|kr�d}|�d�rHt�|�}n
t�|�}|dkrjtdt	|���|�
�\}}}d}d}n�tj�d�r�d}t�|�}|dkr�tdt	|���|�
�\}}}}	}
|dkr�d}tj}n�d|k�r"d}t
�|�}|dk�rtdt	|���|�
�\}}}}	d}n\t�|�}|dk�rFtd	t	|���|�
�\}}}}	}d
}|dk�rld}n|	�r~|d|	}ttd��r�tj\}
}}n"ttd
��r�tj\}
}}nd}d}|�d�}
t|
�dk�r�|
�d�d�|
�}|||||||f}|t|<|S)NZ
IronPythonz*failed to parse IronPython sys.version: %sr r�ZJythonz&failed to parse Jython sys.version: %sZPyPyz$failed to parse PyPy sys.version: %sz'failed to parse CPython sys.version: %sZCPythonr��_git�
_mercurialror=r�)ryr�_sys_version_cacher�
startswith�_ironpython_sys_version_parserrR� _ironpython26_sys_version_parserr�reprr3rz�_sys_version_parser�_pypy_sys_version_parserr)r�r�rr.rqrg)�sys_versionrr�rRrZalt_versionZcompilerZbuildnoZ	builddateZ	buildtimer��branchZrevisionrVrrr�_sys_version}sx











r�cCs
t�dS)Nr)r�rrrr�python_implementation�sr�cCs
t�dS)Nr?)r�rrrr�python_version�sr�cCstt�d�d��S)Nr?ro)rSr�rrrrr�python_version_tuple�s	r�cCs
t�dS)Nr=)r�rrrr�
python_branchsrcCs
t�dS)Nrp)r�rrrr�python_revisionsrcCst�dd�S)Nr�r�)r�rrrr�python_build"srcCs
t�dS)Nr�)r�rrrr�python_compiler*src	Cs�t�||fd�}|dk	r|St�\}}}}}}||kr:d}|rPt|||�\}}}|dkr�t|�\}	}
}}|rxt||�}
nt||||�}
�n*|dk�r
t���"t�ddt	�t
d�\}}}WdQRX|r�|s�t||||d|||�}
n$ttj
�\}}t||||d||�}
n�|dk�rXt�\}}}\}}}|�s4|�sBt|||�}
nt|||d|||�}
n\|d	k�r�|�rtt||�}
nt|||�}
n2|�r�t||�}
n ttj
�\}}t||||||�}
|
t||f<|
S)
Nr r�)ZLinux�ignorez?dist\(\) and linux_distribution\(\) functions are deprecated .*�withr�ZonZMacOS)�_platform_cacherr�r�r�r�rY�catch_warnings�filterwarningsr[rjr;ryr4r�r�)�aliased�terserr}r�r~rr�r�ZrelZversr�r�rzrIZdistversionZdistidZlibcnameZlibcversionr`rr�r�r�r�r�r�rrrrz6s\






rz�__main__r
z--terseZ
nonaliasedz--nonaliased)r`r@)r )r r r rx)r r r r )r r�r )r r r�r�)r )r )r )N)rr)OZ
__copyright__�__version__�collectionsryr*�rer�rY�devnullr�r�rzrdr�compilerr�ASCIIr/r4r;rPrfrQrTZ_supported_distsrWr_r\rjrkrwr|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��
namedtupler�r�r�r}r�r~rr�r�r�r�r�r�r�r�r�r�r�rrrrr�__name__�argvr
r	�print�exitrrrr�<module>os� 




:26
	



0
0

#6 


T	
			
h




[


?>