AlkantarClanX12

Your IP : 3.145.110.99


Current Path : /proc/thread-self/root/lib64/python3.8/__pycache__/
Upload File :
Current File : //proc/thread-self/root/lib64/python3.8/__pycache__/platform.cpython-38.pyc

U

e5d��@sldZdZdZddlZddlZddlZddlZddddddd	d	d
d
d�
Ze�d�Z	d
d�Z
e�dej�Zdwdd�Z
dxdd�Ze�d�Zdydd�Zddddddd d!d"d#d$d%�Zdd&d'd(d)d*d+�Zd,d-�Zd.d/�Zdzd0d1�Zd2d3�Zd{d5d6�Zd7d8�Zd|d9d:�Zd;d<�Zd=d>�Zd}d?d@�ZdAdB�Zd~dCdD�ZddEdF�ZdGdHdId�Z ej!ddfdJdK�Z"e�#dLdM�Z$da%dNdO�Z&dPdQ�Z'dRdS�Z(dTdU�Z)dVdW�Z*dXdY�Z+dZd[�Z,e�d\ej�Z-e�d]ej�Z.e�d^�Z/e�d_�Z0iZ1d�d`da�Z2dbdc�Z3ddde�Z4dfdg�Z5dhdi�Z6djdk�Z7dldm�Z8dndo�Z9iZ:d�dpdq�Z;e<drk�rhdsej=k�p8dtej=kZ>duej=k�oNdvej=kZ?e@e;e?e>��e�Ad�dS)�a8 This module tries to retrieve as much platform-identifying data as
    possible. It makes this information available via function APIs.

    If called from the command line, it prints the platform
    information concatenated as single string to stdout. The output
    format is useable as part of a filename.

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�
���(�2��)
ZdevZalpha�aZbeta�b�cZRCZrc�pl�pz([0-9]+|[._+-])c	Csbg}t�|�D]N}|dkrzt|d�}d}Wn tk
rLt�|d�}YnX|�||f�q|S)Nz._+-r�dr)�
_component_re�split�int�
ValueError�_ver_stages�get�extend)�version�result�v�t�r� /usr/lib64/python3.8/platform.py�_comparable_version�s
rsC(__libc_init)|(GLIBC_([0-9.]+))|(libc(_\w+)?\.so(?:\.(\d[0-9.]*))?)��@c
Cs�|dkrZz0t�d�}|jdd�}t|�dkr6t|�WSWntttfk
rRYnXtj	}t
}ttjd�rvtj�
|�}t|d���`}|�|�}d}	|	t|�k�r�d	|ks�d
|kr�t�||	�}
nd}
|
r�|
��t|�k�r|�|�}|�r|t|	t|�d�d�|}d}	q�|
�s�q�dd
�|
��D�\}}
}}}}|�rF|�sFd}n�|
�rx|dk�r`d}|}n||�||�k�r�|}n\|�r�|dk�r�d}|�r�|�r�||�||�k�r�|}|�r�|t|�d�|k�r�||}|
��}	q�W5QRX||fS)a Tries to determine the libc version that the file executable
        (which defaults to the Python interpreter) is linked against.

        Returns a tuple of strings (lib,version) which default to the
        given parameters in case the lookup fails.

        Note that the function has intimate knowledge of how different
        libc versions add symbols to the executable and thus is probably
        only useable for executables compiled using gcc.

        The file is read and scanned in chunks of chunksize bytes.

    N�CS_GNU_LIBC_VERSION�)�maxsplit��realpath�rbrslibcsGLIBCi�cSs"g|]}|dk	r|�d�n|�qS)N�latin1)�decode)�.0�srrr�
<listcomp>�s�zlibc_ver.<locals>.<listcomp>Zlibc�glibc)�os�confstrr�len�tuple�AttributeErrorr�OSError�sys�
executabler�hasattr�pathr"�open�read�_libc_search�search�end�max�groups)r1�librZ	chunksize�ver�parts�V�fZbinary�pos�m�chunkZlibcinitr)ZglibcversionZsoZthreadsZ	soversionrrr�libc_ver�s^


�

rCcCs`|�d�}|r|�|�zttttt|���}Wntk
rH|}YnXd�|dd��}|S)z� Normalize the version and build strings and return a single
        version string using the format major.minor.build (or patchlevel).
    �.N�)r�append�list�map�strrr�join)r�build�lZstringsrrr�
_norm_version�s


rMz'(?:([\w ]+) ([\w.]+) .*\[.* ([\d.]+)\])��win32�win16�dosc	Cs�tj|kr|||fSddl}dD]R}z|j||jddd�}Wn0t|jfk
rl}zWY�q W5d}~XYq Xq~q |||fS|��}t�	|�}|dk	r�|�
�\}}}|ddkr�|dd�}|ddkr�|dd�}t|�}|||fS)a+ Tries to figure out the OS version used and returns
        a tuple (system, release, version).

        It uses the "ver" shell command for this which is known
        to exists on Windows, DOS. XXX Others too ?

        In case this fails, the given parameters are used as
        defaults.

    rN)r<zcommand /c verz
cmd /c verT)�stderr�text�shell���rD)r0�platform�
subprocess�check_output�DEVNULLr/�CalledProcessError�strip�_ver_output�matchr:rM)	�system�releaserZsupported_platformsrW�cmd�infoZwhyrArrr�_syscmd_vers0

�


rbZ2000ZXPZ
2003ServerZpost2003�Vista�7�8z8.1zpost8.1Z10Zpost10))�r)rfr�rfr!)rfN��r�rir�rir!�rirE�riN)rr)rNZ
2008ServerZ2008ServerR2Z
2012ServerZ2012ServerR2Zpost2012ServerR2)rgrhrjrkrlrmcCs
t�dkS)N)ZIoTUAPZ
NanoServerZWindowsCoreHeadlessZ	IoTEdgeOS)�
win32_editionrrrr�win32_is_iotOsroc
Cs�z.zddl}Wntk
r*ddl}YnXWntk
rBYnTXz<d}|�|j|�� }|�|d�dW5QR�WSQRXWntk
r�YnXdS)Nr�,SOFTWARE\Microsoft\Windows NT\CurrentVersionZ	EditionId)�winreg�ImportError�_winreg�	OpenKeyEx�HKEY_LOCAL_MACHINE�QueryValueExr/)rq�cvkey�keyrrrrnRs(rnc	Cs�zddlm}Wn tk
r0||||fYSX|�}z ttt�d�d��\}}}Wn,tk
r�|jpx|dd�\}}}YnXd�	|||�}t
�||f�p�t
�|df�p�|}|dd�||fk�rzd�	|j�}Wn8t
k
�r|dd�d	k�rd
|dd�}YnXt|dd�dk�rJt�||f��pHt�|df��pH|}z0zddl}	Wntk
�rvddl}	YnXWntk
�r�YnLXz2d}
|	�|	j|
��}|	�|d
�d}W5QRXWntk
�r�YnX||||fS)Nr)�getwindowsversionr!rDrEz{0}.{1}.{2}zSP{}�
z
Service Pack ZSPZproduct_typerpZCurrentType)r0ryrrrHrrbrrZplatform_version�format�_WIN32_CLIENT_RELEASESrZservice_pack_majorr.�getattr�_WIN32_SERVER_RELEASESrqrsrtrurvr/)r_r�csd�ptyperyZwinver�major�minorrKrqrwrxrrr�	win32_verdsR ����r�c	Cs�d}tj�|�sdSzddl}Wntk
r6YdSXt|d��}|�|�}W5QRX|d}d}t��j}|dkrzd}|||fS)Nz0/System/Library/CoreServices/SystemVersion.plistrr#ZProductVersion�rrr)ZppczPower MacintoshZPowerPC)	r*r3�exists�plistlibrrr4�load�uname�machine)�fnr�r?rr_�versioninfor�rrr�_mac_ver_xml�s
r�r�cCst�}|dk	r|S|||fS)a< Get macOS version information and return it as tuple (release,
        versioninfo, machine) with versioninfo being a tuple (version,
        dev_stage, non_release_version).

        Entries which cannot be determined are set to the parameter values
        which default to ''. All tuple entries are strings.
    N)r�)r_r�r�rarrr�mac_ver�sr�cCsHddlm}z|�|�}|dkr&|WS|WStk
rB|YSXdS)Nr)�System)�	java.langr�ZgetPropertyr.)�name�defaultr��valuerrr�
_java_getprop�s
r�cCs�zddl}Wn tk
r,||||fYSXtd|�}td|�}|\}}}td|�}td|�}td|�}|||f}|\}}	}
td|
�}
td	|�}td
|	�}	||	|
f}||||fS)a] Version interface for Jython.

        Returns a tuple (release, vendor, vminfo, osinfo) with vminfo being
        a tuple (vm_name, vm_release, vm_vendor) and osinfo being a
        tuple (os_name, os_version, os_arch).

        Values which cannot be determined are set to the defaults
        given as parameters (which all default to '').

    rNzjava.vendorzjava.versionzjava.vm.namezjava.vm.vendorzjava.vm.versionzjava.os.archzjava.os.namezjava.os.version)r�rrr�)r_�vendor�vminfo�osinfo�javaZvm_nameZ
vm_releaseZ	vm_vendor�os_name�
os_version�os_archrrr�java_ver�s"












r�cCs�|dkr�|dkr|||fS|�d�}|rlzt|d�}Wntk
rLYn X|d}t|�|d<d�|�}|dkrzd}q�d}n,|dkr�d	}|r�|d
}q�d}n|dkr�d
}|||fS)z� Returns (system, release, version) aliased to common
        marketing names used for some systems.

        It also does some reordering of the information in some cases
        where it would otherwise cause confusion.

    ZSunOS�5rDrrE�6ZSolarisZIRIX64ZIRIXz (64bit)�64bit�rOrP�Windows)rrrrIrJ)r^r_rrLr�rrr�system_alias�s.	



r�cGs�d�dd�tt|�D��}|�dd�}|�dd�}|�dd�}|�dd�}|�d	d�}|�d
d�}|�dd�}|�dd�}|�d
d�}|�dd�}||kr�q�|}q�|ddkr�|dd�}q�|S)zq Helper to format the platform string in a filename
        compatible format e.g. "system-version-machine".
    �-css|]}|��VqdS)N)r[)r&�xrrr�	<genexpr>(sz_platform.<locals>.<genexpr>� �_�/�\�:�;�"�(�)�unknownrz--rUN)rJ�filterr,�replace)�argsrVZcleanedrrr�	_platform"s"r�cCsNzddl}Wntk
r$|YSXz
|��WStk
rH|YSXdS)z8 Helper to determine the node name of this machine.
    rN)�socketrrZgethostnamer/)r�r�rrr�_nodeBs

r�cCsBtj�|�}tj�|�r>tj�tj�tj�|�t�|���}q|S)zT In case filepath is a symlink, follow it until a
        real file is reached.
    )r*r3�abspath�islink�normpathrJ�dirname�readlink)�filepathrrr�_follow_symlinksQs�r�c	Cs\tjdkr|Sddl}z|jd|f|jdd�}Wnt|jfk
rN|YSX|��pZ|S)z. Interface to the system's uname command.
    �rQrOrPrNr�T)rRrS)r0rVrWrXrYr/rZr[)Zoptionr�rW�outputrrr�
_syscmd_uname\s

�

r�c	Csztjdkr|Sddl}t|�}ttjdd�}z|jdd|g|j|d�}Wnt	|j
fk
rf|YSX|sp|S|�d	�S)
z� Interface to the system's file command.

        The function uses the -b option of the file command to have it
        omit the filename in its output. Follow the symlinks. It returns
        default in case the command should fail.

    r�rN�C)�LC_ALL�filez-b)rR�envzlatin-1)r0rVrWr��dictr*�environrXrYr/rZr%)�targetr�rWr�r�rrr�_syscmd_filems	
�

r�)r�	WindowsPE)rr�)r�MSDOScCs|s&ddl}|�d�}t|d�d}|r6t|d�}nd}|sx|tjkrxtjtkrpttj\}}|rh|}|rp|}||fSd|kr�d|kr�||fSd	|kr�d
}nd|kr�d}nd
|kr�d}d|kr�d}n8d|kr�d|kr�d}q�d}nd|kr�d}nd|kr�d}n||fS)a� Queries the given executable (defaults to the Python interpreter
        binary) for various architecture information.

        Returns a tuple (bits, linkage) which contains information about
        the bit architecture and the linkage format used for the
        executable. Both values are returned as strings.

        Values that cannot be determined are returned as given by the
        parameter presets. If bits is given as '', the sizeof(pointer)
        (or sizeof(long) on Python version < 1.5.2) is used as
        indicator for the supported pointer size.

        The function relies on the system's "file" command to do the
        actual work. This is available on most if not all Unix
        platforms. On some non-Unix platforms where the "file" command
        does not exist and the executable is set to the Python interpreter
        binary defaults from _default_architecture are used.

    rN�P��bitrr1z
shared objectz32-bit�32bitZN32Zn32bitz64-bitr�ZELFZPEr�r�ZCOFFzMS-DOSr�)�structZcalcsizerIr�r0r1rV�_default_architecture)r1�bits�linkager��sizeZfileoutr	rLrrr�architecture�sH
�
r��uname_resultz-system node release version machine processorcCs�d}tdk	rtSd}zt��\}}}}}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|�\}}}|d	k�rd
}n4|dk�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}z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}|dk�r�|d
k�r�d
}d}t||||||�atS)an Fairly portable uname interface. Returns a tuple
        of strings (system, node, release, version, machine, processor)
        identifying the underlying platform.

        Note that unlike the os.uname function this also returns
        possible processor information as an additional tuple entry.

        Entries which cannot be determined are set to ''.

    rNrrrOZPROCESSOR_ARCHITEW6432ZPROCESSOR_ARCHITECTUREZPROCESSOR_IDENTIFIERzMicrosoft Windowsr�Z	Microsoftz6.0rErcr�r�Z16bit�r��Javaz, ZOpenVMS�0zSYI$_CPU�ZAlphaZVAXz-pr�)�_uname_cacher*r�r.rGr�r0rVr�r�r�rrbr�rJ�vms_librrZgetsyir�r�)Zno_os_uname�	processorr^�noder_rr�Zuse_syscmd_verrr�r�r�r�r�ZcsidZ
cpu_numberrrrr��s�
















�r�cCst�jS)z� Returns the system/OS name, e.g. 'Linux', 'Windows' or 'Java'.

        An empty string is returned if the value cannot be determined.

    )r�r^rrrrr^usr^cCst�jS)z� Returns the computer's network name (which may not be fully
        qualified)

        An empty string is returned if the value cannot be determined.

    )r�r�rrrrr�~sr�cCst�jS)z� Returns the system's release, e.g. '2.2.0' or 'NT'

        An empty string is returned if the value cannot be determined.

    )r�r_rrrrr_�sr_cCst�jS)z� Returns the system's release version, e.g. '#3 on degas'

        An empty string is returned if the value cannot be determined.

    )r�rrrrrr�srcCst�jS)zt Returns the machine type, e.g. 'i386'

        An empty string is returned if the value cannot be determined.

    )r�r�rrrrr��sr�cCst�jS)a Returns the (true) processor name, e.g. 'amdk6'

        An empty string is returned if the value cannot be
        determined. Note that many platforms do not provide this
        information or simply return the same value as for machine(),
        e.g.  NetBSD does this.

    )r�r�rrrrr��s
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td	t	|���|�
�\}}}}	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)a� Returns a parsed version of Python's sys.version as tuple
        (name, version, branch, revision, buildno, builddate, compiler)
        referring to the Python implementation name, version, branch,
        revision, build number, build date/time as string and the compiler
        identification string.

        Note that unlike the Python sys.version, the returned value
        for the Python version will always include the patchlevel (it
        defaults to '.0').

        The function returns empty strings for tuple entries that
        cannot be determined.

        sys_version may be given to parse an alternative version
        string, e.g. if the version was read from a different Python
        interpreter.

    NZ
IronPythonz*failed to parse IronPython sys.version: %srr�ZJythonz&failed to parse Jython sys.version: %sZPyPyz$failed to parse PyPy sys.version: %sz'failed to parse CPython sys.version: %sZCPythonr��_git�
_mercurialrDr!r�)r0r�_sys_version_cacher�
startswith�_ironpython_sys_version_parserr]� _ironpython26_sys_version_parserr�reprr:rV�_sys_version_parser�_pypy_sys_version_parserr2r�r�rr,rFrJ)�sys_versionrr�r]rZalt_versionZcompilerZbuildnoZ	builddateZ	buildtimer��branchZrevisionrLrrr�_sys_version�s�

��
��


�

���



r�cCs
t�dS)aR Returns a string identifying the Python implementation.

        Currently, the following implementations are identified:
          'CPython' (C implementation of Python),
          'IronPython' (.NET implementation of Python),
          'Jython' (Java implementation of Python),
          'PyPy' (Python implementation of Python).

    r�r�rrrr�python_implementation5sr�cCs
t�dS)z� Returns the Python version as string 'major.minor.patchlevel'

        Note that unlike the Python sys.version, the returned value
        will always include the patchlevel (it defaults to 0).

    rr�rrrr�python_versionBsr�cCstt�d�d��S)z� Returns the Python version as tuple (major, minor, patchlevel)
        of strings.

        Note that unlike the Python sys.version, the returned value
        will always include the patchlevel (it defaults to 0).

    rrD)r-r�rrrrr�python_version_tupleLs	r�cCs
t�dS)z� Returns a string identifying the Python implementation
        branch.

        For CPython this is the SCM branch from which the
        Python binary was built.

        If not available, an empty string is returned.

    r!r�rrrr�
python_branchWsr�cCs
t�dS)z� Returns a string identifying the Python implementation
        revision.

        For CPython this is the SCM revision from which the
        Python binary was built.

        If not available, an empty string is returned.

    rEr�rrrr�python_revisionesr�cCst�dd�S)zh Returns a tuple (buildno, builddate) stating the Python
        build number and date as strings.

    r�rir�rrrr�python_buildrsr�cCs
t�dS)zS Returns a string identifying the compiler used for compiling
        Python.

    rir�rrrr�python_compilerzsr�cCsbt�||fd�}|dk	r|St�\}}}}}}||kr:d}|rPt|||�\}}}|dkrnt�d}	|	rnd}|	}|dkr�t|�\}
}}}
|r�t||�}nt||||�}n�|dkr�ttj	�\}}t||||d||�}n~|d	k�r t
�\}}}\}}}|s�|�s
t|||�}nt|||d
|||�}n2|�r2t||�}n ttj	�\}}t||||||�}|t||f<|S)a� Returns a single string identifying the underlying platform
        with as much useful information as possible (but no more :).

        The output is intended to be human readable rather than
        machine parseable. It may look different on different
        platforms and this is intended.

        If "aliased" is true, the function will use aliases for
        various platforms that report system names which differ from
        their common names, e.g. SunOS will be reported as
        Solaris. The system_alias() function is used to implement
        this.

        Setting terse to true causes the function to return only the
        absolute minimum information needed to identify the platform.

    NrZDarwinrZmacOSr�)ZLinux�withr�Zon)�_platform_cacherr�r�r�r�r�rCr0r1r�r�)�aliased�terserr^r�r_rr�r�Z
macos_releaseZrelZversrr�rVZlibcnameZlibcversion�rrr�r�r�r�r�r�rrrrV�sX

�

��rV�__main__r�z--terseZ
nonaliasedz--nonaliased)Nrrr)r)rrrrN)rrrr)rr�r)rrr�r�)r)r)r)N)rr)B�__doc__Z
__copyright__�__version__�collectionsr*�rer0r�compilerr�ASCIIr6rCrMr\rbr|r~rornr�r�r�r�r�r�r�r�r�r�r�r�r1r��
namedtupler�r�r�r^r�r_rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rV�__name__�argvr�r��print�exitrrrr�<module>s�Y
�
�
G


�
1��

3

#4 


$�P�	
			����
h




L