HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //opt/osm/venv/lib64/python3.10/site-packages/setuptools/__pycache__/wheel.cpython-310.pyc
o

0i� �@s�dZddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
Z
ddlZddl
mZddl
mZddlmZddlmZddlmZe�d	ej�jZd
Zdd�Zejd
d��ZGdd�d�ZdS)zWheels support.�N)�get_platform)�
parse_version)�sys_tags)�canonicalize_name)�write_requirements)�_unpack_zipfile_objz�^(?P<project_name>.+?)-(?P<version>\d.*?)
    ((-(?P<build>\d.*?))?-(?P<py_version>.+?)-(?P<abi>.+?)-(?P<platform>.+?)
    )\.whl$z8__import__('pkg_resources').declare_namespace(__name__)
cCs�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_dirZdst_dir�dirpath�dirnames�	filenames�subdir�f�src�dst�n�d�r�>/opt/osm/venv/lib/python3.10/site-packages/setuptools/wheel.py�unpack s$��	�r c	cs>�ddlm}|�|j�}zdVW|�|�dS|�|�w)z*
    Temporarily disable info traces.
    r)�logN)�	distutilsr!Z
set_threshold�WARN)r!�savedrrr�disable_info_traces6s�r%c@sheZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	e
dd��Ze
dd��Ze
dd��Z
dS)�WheelcCsPttj�|��}|durtd|��||_|����D]
\}}t|||�qdS)Nzinvalid wheel name: %r)	�
WHEEL_NAMEr	r�basename�
ValueError�filename�	groupdict�items�setattr)�selfr*�match�k�vrrr�__init__Es�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�split�abi�platform�r.rrr�tagsMs



�z
Wheel.tagscs0tdd�t�D���t�fdd�|��D�d�S)z5Is the wheel is compatible with the current platform?css �|]}|j|j|jfVqdS�N)�interpreterr8r9��.0�trrr�	<genexpr>Ws�
�z&Wheel.is_compatible.<locals>.<genexpr>c3s�|]	}|�vrdVqdS)TNrr>��supported_tagsrrrAYs�F)�setr�nextr;r:rrBr�
is_compatibleUs�zWheel.is_compatiblecCs,tj|j|j|jdkr
dnt�d���dS)N�any)�project_name�versionr9z.egg)�
pkg_resources�DistributionrHrIr9r�egg_namer:rrrrL[s��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�
startswithrHr))r.�zf�memberrOrrr�
get_dist_infoas

���zWheel.get_dist_infocCs>t�|j��}|�||�Wd�dS1swYdS)z"Install wheel as an egg directory.N)�zipfile�ZipFiler*�_install_as_egg)r.�destination_eggdirrRrrr�install_as_eggks"�zWheel.install_as_eggcCs\d|j|jf}|�|�}d|}tj�|d�}|�||||�|�||�|�||�dS)Nz%s-%sz%s.data�EGG-INFO)	rHrIrTr	rr
�_convert_metadata�_move_data_entries�_fix_namespace_packages)r.rXrRZ
dist_basename�	dist_info�	dist_data�egg_inforrrrWps
zWheel._install_as_eggc
s@��fdd�}|d�}t|�d��}td�|kotd�kn}|s*td|��t�|�tj�|���tjj	|�t�
|��d��d	d
��tt���
�������fdd��jD�}t��|�t�tj�|d
�tj�|d��tjt�|d�d�}	t��t|	�d�dtj�|d��Wd�dS1s�wYdS)NcsT��t��|���}|���d�}tj���|�Wd�S1s#wYdS)Nzutf-8)	�openrNr
�read�decode�email�parser�Parser�parsestr)�name�fp�value)r^rRrr�get_metadata|s$�z-Wheel._convert_metadata.<locals>.get_metadata�WHEELz
Wheel-Versionz1.0z2.0dev0z$unsupported wheel format version: %s)�metadatacSsd|_t|�Sr<)�marker�str)�reqrrr�raw_req�sz(Wheel._convert_metadata.<locals>.raw_reqc	s.i|]}|�fdd�t���|f��D��qS)csg|]}|�vr|�qSrr)r?rp)�install_requiresrr�
<listcomp>�s
�z6Wheel._convert_metadata.<locals>.<dictcomp>.<listcomp>)�map�requires)r?�extra)�distrrrqrr�
<dictcomp>�s���z+Wheel._convert_metadata.<locals>.<dictcomp>�METADATAzPKG-INFO)rr�extras_require)�attrsr`zrequires.txt)r�getr)rr	rr
rJrK�
from_location�PathMetadatarrtru�extras�rename�
setuptools�dictr%rZget_command_obj)
rRrXr^r`rk�wheel_metadata�
wheel_versionZwheel_v1rzZ
setup_distr)rwr^rrrqrRrr[zsL��

������"�zWheel._convert_metadatacs�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.�scriptsrZz.pycc3s�|]
}tj��|�VqdSr<)r	rr
)r?r�r_rrrA�s
��
�z+Wheel._move_data_entries.<locals>.<genexpr>)�data�headers�purelib�platlibN)r	rr
r�mkdir�listdirrP�unlinkr�r�filterr )rXr_Zdist_data_scriptsZegg_info_scripts�entryrrr�rr\�s,�

�
��zWheel._move_data_entriesc	Cs�tj�|d�}tj�|�rkt|��}|����}Wd�n1s"wY|D]C}tjj|g|�d��R�}tj�|d�}tj�|�sJt�|�tj�|�sjt|d��
}|�t	�Wd�n1sewYq)dSdS)Nznamespace_packages.txtr3z__init__.py�w)
r	rr
rrarbr7r��write�NAMESPACE_PACKAGE_INIT)r`rX�namespace_packagesri�modZmod_dirZmod_initrrrr]�s&�
�
���zWheel._fix_namespace_packagesN)�__name__�
__module__�__qualname__r2r;rFrLrTrYrW�staticmethodr[r\r]rrrrr&Cs


9
r&)�__doc__rdr4r	rN�rerU�
contextlibZdistutils.utilrrJr�rZ setuptools.extern.packaging.tagsrZ!setuptools.extern.packaging.utilsrZsetuptools.command.egg_inforZsetuptools.archive_utilr�compile�VERBOSEr/r'r�r �contextmanagerr%r&rrrr�<module>s8���