CoolFace
Apppublic

Aluode/PerceptionLabPortable

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
_musllinux.cpython-310.pyc52 linesDownload Raw Back to __pycache__
1o

2��Yi�3�	@sdZddlmZddlZddlZddlZddlZddlmZm	Z	m4Z5ddlmZGdd�de	�Z
d$d
d�Zejd%dd��Zd&dd�Zedkr�ddlZe��Ze�d�sWJd��ede�edeej��eddd�ee�dd e�d!d�d"��D]6Zeed#d�qydSdS)'z�PEP 656 support.7 8This module implements logic to detect if the currently running Python is9linked against musl, and what musl version is used.10�)�annotationsN)�Iterator�11NamedTuple�Sequence�)�ELFFilec@seZdZUded<ded<dS)�_MuslVersion�int�major�minorN)�__name__�12__module__�__qualname__�__annotations__�rr�~E:\DocsHouse\542 percep lab latest\PerceptionLab\PerceptionLab_Portable\python_embed\Lib\site-packages\packaging/_musllinux.pyrs13r�output�str�return�_MuslVersion | NonecCsxdd�dd�|��D�D�}t|�dks|ddd�dkr dSt�d	|d14�}|s,dStt|�d15��t|�d��d�S)NcSsg|]}|r|�qSrr��.0�nrrr�16<listcomp>sz'_parse_musl_version.<locals>.<listcomp>css�|]}|��VqdS)N)�striprrrr�	<genexpr>s�z&_parse_musl_version.<locals>.<genexpr>�r��muslzVersion (\d+)\.(\d+)r)r17r)�18splitlines�len�re�matchrr	�group)r�lines�mrrr�_parse_musl_versions  r&�19executablec20Cs�zt|d��
}t|�j}Wd�n1swYWn
tttfy)YdSw|dus2d|vr4dStj|gtjdd�}t	|j21�S)a`Detect currently-running musl runtime version.22 23    This is done by checking the specified executable's dynamic linking24    information, and invoking the loader to parse its output for a version25    string. If the loader is musl, the output would be something like::26 27        musl libc (x86_64)28        Version 1.2.229        Dynamic Program Loader30    �rbNrT)�stderr�text)�openr�interpreter�OSError�	TypeError�31ValueError�32subprocess�run�PIPEr&r))r'�f�ld�procrrr�_get_musl_version!s���33r6�archs�
Sequence[str]�
Iterator[str]ccsT�ttj�}|durdS|D]}t|jdd�D]}d|j�d|�d|��VqqdS)a�Generate musllinux tags compatible to the current platform.34 35    :param archs: Sequence of compatible architectures.36        The first one shall be the closest to the actual architecture and be the part of37        platform tag after the ``linux_`` prefix, e.g. ``x86_64``.38        The ``linux_`` prefix is assumed as a prerequisite for the current platform to39        be musllinux-compatible.40 41    :returns: An iterator of compatible musllinux tags.42    N������43musllinux_�_)r6�sysr'�rangerr44)r7�sys_musl�archrrrr�
platform_tags8s�45��rA�__main__zlinux-z	not linuxzplat:zmusl:ztags:� )�endz[.-]r<�-r:z46      )rrrr)r'rrr)r7r8rr9)�__doc__�47__future__r�	functoolsr!r0r=�typingrrr�_elffilerrr&�	lru_cacher6rAr�	sysconfig�get_platform�plat�48startswith�printr'�sub�split�trrrr�<module>s049505152"�	
Aluode/PerceptionLabPortable · CoolFace