HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/setuptools/__pycache__/wheel.cpython-310.pyc
o

��h%�@sdZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ddlmZddl
mZddlmZddlZddlmZddlmZmZd	d
lmZd	dlmZd	dlmZdd
lmZe� dej!�j"Z#dZ$ej%dd��Z&ddd�Z'ej(dd��Z)Gdd�d�Z*dS)zWheels support.�N)�Requirement��sys_tags)�canonicalize_name)�Version)�_unpack_zipfile_obj)�
_egg_basename�write_requirements�)�extras_from_deps)�metadata)�_read_utf8_with_fallback)�get_platformz�^(?P<project_name>.+?)-(?P<version>\d.*?)
    ((-(?P<build>\d.*?))?-(?P<py_version>.+?)-(?P<abi>.+?)-(?P<platform>.+?)
    )\.whl$z8__import__('pkg_resources').declare_namespace(__name__)
cCsdd�t�D�S)NcSsh|]
}|j|j|jf�qS�)�interpreter�abi�platform��.0�trr�;/usr/local/lib/python3.10/dist-packages/setuptools/wheel.py�	<setcomp>*sz&_get_supported_tags.<locals>.<setcomp>rrrrr�_get_supported_tags%sr�returncCs�t�|�D]Q\}}}tj�||�}|D]}tj�||�}tj�|||�}t�||�qttt|���D]"\}	}
tj�||
�}tj�|||
�}tj�	|�sUt�||�||	=q3qtj|dd�D]\}}}|rgJ�t�
|�q^dS)zDMove everything under `src_dir` to `dst_dir`, and delete the former.T)�topdownN)�os�walk�path�relpath�join�renames�reversed�list�	enumerate�exists�rmdir)�src_dir�dst_dir�dirpath�dirnames�	filenames�subdir�f�src�dst�n�drrr�unpack-s$��	�r1c	cs>�ddlm}|�|j�}zdVW|�|�dS|�|�w)z*
    Temporarily disable info traces.
    r)�logN)�	distutilsr2�
set_threshold�WARN)r2�savedrrr�disable_info_tracesCs�r7c@sxeZdZddd�Zdd�Zdd�Zd	d
�Zdd�Zdd
d�Zdd�Z	e
dd��Ze
dd��Ze
dd��Z
e
dd��ZdS)�WheelrNcCsRttj�|��}|durtd|����||_|����D]
\}}t|||�qdS)Nzinvalid wheel name: )	�
WHEEL_NAMErr�basename�
ValueError�filename�	groupdict�items�setattr)�selfr<�match�k�vrrr�__init__Rs�zWheel.__init__cCs&t�|j�d�|j�d�|j�d��S)z>List tags (py_version, abi, platform) supported by this wheel.�.)�	itertools�product�
py_version�splitrr�r@rrr�tagsZs



�z
Wheel.tagscCstdd�|��D�d�S)z2Is the wheel compatible with the current platform?css�|]
}|t�vrdVqdS)TN)rrrrr�	<genexpr>ds�z&Wheel.is_compatible.<locals>.<genexpr>F)�nextrKrJrrr�
is_compatiblebszWheel.is_compatiblecCs&t|j|j|jdkrdnt�d�dS)N�any)rz.egg)r�project_name�versionrrrJrrr�egg_namefs���zWheel.egg_namecCsF|��D]}t�|�}|�d�rt|��t|j��r|Sqtd��)Nz
.dist-infoz.unsupported wheel format. .dist-info not found)�namelist�	posixpath�dirname�endswithr�
startswithrPr;)r@�zf�memberrUrrr�
get_dist_infops
��zWheel.get_dist_infocCs>t�|j��}|�||�Wd�dS1swYdS)z"Install wheel as an egg directory.N)�zipfile�ZipFiler<�_install_as_egg)r@�destination_eggdirrXrrr�install_as_eggzs"�zWheel.install_as_eggcCs`|j�d|j��}|�|�}|�d�}tj�|d�}|�||||�|�||�|�||�dS)N�-z.data�EGG-INFO)	rPrQrZrrr�_convert_metadata�_move_data_entries�_fix_namespace_packages)r@r^rX�
dist_basename�	dist_info�	dist_data�egg_inforrrr]s

zWheel._install_as_eggcs��fdd�}|d�}t|�d��}td�|kotd�kn}|s+td|����t�|�tj�|���t�|��\}}	t�	�|�t�	tj�|d�tj�|d	��t
jt||	d
�d�}
t
��t|
�d�dtj�|d
��Wd�dS1s|wYdS)NcsT��t��|���}|���d�}tj���|�Wd�S1s#wYdS)N�utf-8)	�openrTr�read�decode�email�parser�Parser�parsestr)�name�fp�value�rfrXrr�get_metadata�s$�z-Wheel._convert_metadata.<locals>.get_metadata�WHEELz
Wheel-Versionz1.0z2.0dev0z"unsupported wheel format version: �METADATAzPKG-INFO)�install_requires�extras_require)�attrsrhzrequires.txt)�
parse_version�getr;rrrrr8�_convert_requires�rename�
setuptools�Distribution�dictr7r	�get_command_obj)rXr^rfrhru�wheel_metadata�
wheel_version�wheel_v1rxry�
setup_distrrtrrb�s: 
�����"�zWheel._convert_metadatac	s�tj�|�j}|�d�p
g}ttt|���t|�}dd��dd��dd��tt�t�t	�
������}����fdd	�|D�}||fS)
Nz
Requires-DistcSstt|��}d|_t|�S�N)r�str�marker)�reqrrr�raw_req�sz(Wheel._convert_requires.<locals>.raw_reqc[s|jp	|j�|�Sr�)r��evaluate)r��envrrr�eval�sz%Wheel._convert_requires.<locals>.evalcSs6z|jj}Wntyd}Ynwtdd�|D��S)Nrcss2�|]}t|t�r|djdkr|djVqdS)r�extra�N)�
isinstance�tuplers)rr�rrrrL�s����z=Wheel._convert_requires.<locals>.for_extra.<locals>.<genexpr>)r��_markers�AttributeError�set)r��markersrrr�	for_extra�s��z*Wheel._convert_requires.<locals>.for_extrac	s.i|]��tt����fdd��D����qS)c3s(�|]}�|�r�|�d�r|VqdS)�r�Nr)rr�)r�r�r�rrrL�s�&z5Wheel._convert_requires.<locals>.<dictcomp>.<genexpr>)r"�map)r�r�r�r��reqsr�r�
<dictcomp>�s����z+Wheel._convert_requires.<locals>.<dictcomp>)rr��at�get_allr"r�rr�filterrF�filterfalse)r^rf�md�deps�extrasrxryrr�rr}�s��	zWheel._convert_requirescs�tj�|���tj��d�}tj�|�rNtj�|dd�}t�|�t�|�D]"}|�d�r8t�tj�||��q&t�tj�||�tj�||��q&t�	|�t
tjj�fdd�dD��D]}t||�q\tj���rqt�	��dSdS)z,Move data entries to their correct location.�scriptsraz.pycc3s�|]
}tj��|�VqdSr�)rrr)rr0�rgrrrL�s
��
�z+Wheel._move_data_entries.<locals>.<genexpr>)�data�headers�purelib�platlibN)rrrr$�mkdir�listdirrV�unlinkr~r%r�r1)r^rg�dist_data_scripts�egg_info_scripts�entryr+rr�rrc�s.

�

���zWheel._move_data_entriesc	Cs�tj�|d�}tj�|�rYt|���}|D]E}tjj|g|�d��R�}tj�|d�}tj�|�s6t�|�tj�|�sXt|ddd��
}|�t	�Wd�n1sSwYqdSdS)Nznamespace_packages.txtrEz__init__.py�wri)�encoding)
rrrr$r
rIr�rj�write�NAMESPACE_PACKAGE_INIT)rhr^�namespace_packages�mod�mod_dir�mod_initrrrrrrd�s
���zWheel._fix_namespace_packages�rN)�__name__�
__module__�__qualname__rDrKrNrRrZr_r]�staticmethodrbr}rcrdrrrrr8Qs 





$
+
r8r�)+�__doc__�
contextlibrm�	functoolsrFrrT�rer[�packaging.requirementsr�packaging.tagsr�packaging.utilsr�packaging.versionrr{r�setuptools.archive_utilr�setuptools.command.egg_inforr	�
_discoveryr�
_importlibr�
unicode_utilsr
�distutils.utilr�compile�VERBOSErAr9r��cacherr1�contextmanagerr7r8rrrr�<module>sB��