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: sport3497 (1034)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/wheel/__pycache__/_bdist_wheel.cpython-310.pyc
o

��h�T�@s�dZddlmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZm
Z
ddlmZddlmZddlmZddlmZmZmZmZmZmZdd	lmZmZddlZdd
lmZddlm Z!dd
l"m#Z#ddl$m%Z%ddl&m'Z'ddl&m(Z)ddl*m+Z+er�ddl,Z,ze-d�Wne.y�ddlm/Z/e/�0�YnwdBdd�Z1dCdd�Z2e3ej �4d�d�Z5dZ6dDdd �Z7dEd!d"�Z8dFd%d&�Z9	'dGdHd,d-�Z:dId.d/�Z;dBd0d1�Z<dCd2d3�Z=dJd:d;�Z>dKd>d?�Z?Gd@dA�dAe�Z@dS)LzI
Create a wheel (.whl) distribution.

A wheel is a built archive format.
�)�annotationsN)�BytesGenerator�	Generator)�EmailPolicy)�iglob)�rmtree)�
TYPE_CHECKING�Callable�Iterable�Literal�Sequence�cast)�ZIP_DEFLATED�
ZIP_STORED)�Command�)�__version__)�pkginfo_to_metadata)�log)�tags��version)�	WheelFilezsetuptools.logging)�_setuptools_logging�name�str�returncCst�dd|�S)z�Convert an arbitrary string to a standard distribution name
    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    �[^A-Za-z0-9.]+�-)�re�sub�r�r"�=/usr/local/lib/python3.10/dist-packages/wheel/_bdist_wheel.py�	safe_name/sr$rcCs@ztt�|��WStjy|�dd�}t�dd|�YSw)zB
    Convert an arbitrary string to a standard version string
    � �.rr)r�_packaging_version�Version�InvalidVersion�replacerr rr"r"r#�safe_version6s�r+r&zcp3\d�boolcCst�d�dkS)N�P�)�struct�calcsizer"r"r"r#�_is_32bit_interpreterGsr1cCsdtjd��S)N�pyr)�sys�version_infor"r"r"r#�
python_tagK�r5�archive_root�
str | NonecCs^t��}|�d�r|durddlm}|||�}nt�r)|dkr#d}n|dkr)d}|�d	d
�S)z0Return our platform name 'win32', 'linux_x86_64'�macosxNr)�calculate_macosx_platform_tag�linux-x86_64z
linux-i686�
linux-aarch64zlinux-armv7lr�_)�	sysconfig�get_platform�
startswith�macosx_libfiler:r1r*)r7�resultr:r"r"r#r?Osr?T�var�fallback�expected�warncCs:t�|�}|dur|rtjd|�d�tdd�|S||kS)zfUse a fallback value for determining SOABI flags if the needed config
    var is unset or unavailable.NzConfig variable 'z+' is unset, Python ABI tag may be incorrect���
stacklevel)r>�get_config_var�warningsrF�RuntimeWarning)rCrDrErF�valr"r"r#�get_flagcs

�rNcCs�t�d�}t��}|sO|dvrOttd�rOd}d}d}tdttd�|dkd�r(d	}td
|dk|dko5tjdkd�r?tjdkr?d}|�t���|�|�|��}|S|re|dkre|�	d
�red|�
d�d}|S|ry|dkry|�	d�ry|�
d�d}|S|r�|dkr�d�|�
d�dd��}|�dd��dd�}|S|r�|dkr�d�|�
d�dd��}|�dd��dd�}|S|r�|�dd��dd�}|Sd}|S)zJReturn the ABI tag based on SOABI (if available) or emulate SOABI (PyPy2).�SOABI)�cp�pp�
maxunicode��Py_DEBUG�gettotalrefcountrP)rF�d�
WITH_PYMALLOC)���m�cpythonrrrrQNrGr&r=�graalpyrX)
r>rJr�interpreter_name�hasattrr3rNr4�interpreter_versionr@�split�joinr*)�soabi�implrVrZ�u�abir"r"r#�get_abi_tagtsH
�
��
�	���rfcC�t|��dd�S�Nrr=)r$r*r!r"r"r#�
safer_name�r6ricCrgrh)r+r*rr"r"r#�
safer_version�r6rj�func�Callable[..., object]�path�excinfo�6tuple[type[Exception], Exception, types.TracebackType]�NonecCst|||d�dS)Nr)�remove_readonly_exc)rkrmrnr"r"r#�remove_readonly�srr�exc�	ExceptioncCst�|tj�||�dS)N)�os�chmod�stat�S_IWRITE)rkrmrsr"r"r#rq�srqc@s�eZdZdZeed�Zdddded��d�fd	d
ddd
ddddd�d�	e��fddde
��d�fddg
Zgd�Zdd�Z
dd�Zedd��Zd5d!d"�Zd#d$�Zd%e�d�fd6d)d*�Zd7d,d-�Zed8d/d0��Zd9d3d4�ZdS):�bdist_wheelzcreate a wheel distribution)�stored�deflated)z
bdist-dir=�bz1temporary directory for creating the distributionz
plat-name=�pz8platform name to embed in generated filenames (default: N�))�	keep-temp�kzPkeep the pseudo-installation tree around after creating the distribution archive)z	dist-dir=rVz-directory to put final built distributions in)�
skip-buildNz2skip rebuilding everything (for testing/debugging))�relativeNz7build the archive using relative paths (default: false))zowner=rdz@Owner name used when creating a tar file [default: current user])zgroup=�gzAGroup name used when creating a tar file [default: current group])�	universalNz'make a universal wheel (default: false)zcompression=z6zipfile compression (one of: {}) (default: 'deflated')z, zpython-tag=z3Python implementation compatibility tag (default: 'z'))z
build-number=NzqBuild number for this particular version. As specified in PEP-0427, this must start with a digit. [default: None])zpy-limited-api=Nz?Python tag (cp32|cp33|cpNN) for abi3 wheel tag (default: false))rr�r�r�cCsxd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_t�|_d|_d|_d|_dS)N�zipFr{)�	bdist_dir�data_dir�	plat_name�plat_tag�format�	keep_temp�dist_dir�egginfo_dir�root_is_pure�
skip_buildr��owner�groupr��compressionr5�build_number�py_limited_api�plat_name_supplied)�selfr"r"r#�initialize_options�s&
zbdist_wheel.initialize_optionscCsJ|jdur|�d�j}tj�|d�|_|j�d�}|��|j	d|_
|jdu|_z	|j
|j|_WntyBtd|j���d�wd}|jdgt||��R�|j��pZ|j��|_|jrot�t|j�sotdt�d���|j�d�}d	|vr�t�d
�|d	d��}|��dvr�d
|_|j dur�|j dd��!�s�td��dSdS)N�bdist�wheel�egg_infoz.datazUnsupported compression: )r�r�r�zpy-limited-api must match '�'r�z=The [wheel] section is deprecated. Use [bdist_wheel] instead.r)�1�true�yesTz1Build tag (build-number) must start with a digit.)"r��get_finalized_command�
bdist_baserurmra�distribution�get_command_obj�ensure_finalized�wheel_dist_namer�r�r��supported_compressionsr��KeyError�
ValueError�set_undefined_optionsr��has_ext_modules�has_c_librariesr�r�r�match�PY_LIMITED_API_PATTERN�get_option_dictr�warning�strip�lowerr�r��isdigit)r�r�r��need_optionsr�rMr"r"r#�finalize_options
s>
��
���zbdist_wheel.finalize_optionscCs8t|j���t|j���f}|jr||jf7}d�|�S)z4Return distribution full name with - replaced with _r)rir��get_namerj�get_versionr�ra)r��
componentsr"r"r#r�5s�
zbdist_wheel.wheel_dist_namer�tuple[str, str, str]cs(|jr
tt|j��n'|jrd�n!|jr|j�d�s|j�nt|j��t�r1�dvr+d��dvr1d���	��
dd��
d	d��
d
d��|jrT|jrJd}n|j}|d�f}|St
��}t
��}||}|jrp||�d
�rp|j}d}ntt���	�}||�f}�fdd�t
��D�}||vs�Jd|����|S)N�anyr9)r;�linux_x86_64�
linux_i686)r<�
linux_aarch64�linux_armv7lrr=r&r%zpy2.py3�none�cp3�abi3csg|]	}|j|j�f�qSr")�interpreterre)�.0�t�r�r"r#�
<listcomp>rs�z'bdist_wheel.get_tag.<locals>.<listcomp>z'would build wheel with unsupported tag )r�r
rr�r�r@r?r�r1r�r*r�r5rr]r_r�rf�sys_tags)r�rc�tag�	impl_name�impl_ver�abi_tag�supported_tagsr"r�r#�get_tag@sF
�
�

�
�zbdist_wheel.get_tagcCs�|�d�}d|_d|_|�d�}d|_|js|�d�|jddd�}|j|_d|_|j|_d|_	|�d	�}d|_
d
D]}t|d|tj
�|j|��q:d}tjd
krdtj
�tj
�|jd��}||_|_t||jrkdnd|�t�d|j���|�d�|��\}}}	|j�d|�d|�d|	��}
|js�|j}ntj
�|j|�|j��}|�dd�t|j����dt |j�!���d�}tj
�|j|�}
|�"|j#|
�|�$|
�tj
�%|j&�s�t�'|j&�tj
�|j&|
d�}t(|d|j)��
}|�*|�Wd�n1s�wYt+|jdg��,ddj-t.j/dd��|f�|j0�sBt�d|j���|j1�sDt.j/dk�r9t2|jt3d�dSt2|jt4d�dSdSdS) N�
build_scripts�pythonT�	build_extF�build�install)�reinit_subcommands�install_scripts)�headers�scripts�data�purelib�platlib�install_rS�ntz..�install_purelib�install_platlibzinstalling to r�install_egg_info)�targetr�z
.dist-infoz.whl�w�
dist_filesryz{}.{}rGz	removing )rX�)�onerror)�onexc)5�reinitialize_command�
executable�force�inplacer��run_commandr��root�compile�warn_dir�no_ep�setattrrurmrar�r�normpath�install_libbase�install_libr�r�infor�r�r��_ensure_relative�install_baser�rir�r�rjr��egg2distr��write_wheelfile�existsr��makedirsrr��write_files�getattr�appendr�r3r4r��dry_runrrrrq)r�r�r�r�r��key�basedir_observed�impl_tagr�r��archive_basenamer7�distinfo_dirname�distinfo_dir�
wheel_path�wfr"r"r#�runzs|




�
���
����zbdist_wheel.runz
bdist_wheel (�wheelfile_baser�	generatorc
Cs�ddlm}|�}d|d<||d<t|j���|d<|jdur$|j|d<|��\}}}|�d�D]}|�d�D]}	|�d�D]}
d	�||	|
f�|d
<q>q7q0t	j
�|d�}t�d|���t
|d
��}t|dd��|�Wd�dS1svwYdS)Nr)�Messagez1.0z
Wheel-VersionrzRoot-Is-Purelib�Buildr&r�Tag�WHEELz	creating �wb)�maxheaderlen)�
email.messagerrr�r�r�r�r`rarurmrr��openr�flatten)
r�rrr�msgr�r�r�rcre�plat�wheelfile_path�fr"r"r#r��s&

��"�zbdist_wheel.write_wheelfilermcCs6tj�|�\}}|dd�tjkr||dd�}|S)Nrr)rurm�
splitdrive�sep)r�rm�driver"r"r#r��szbdist_wheel._ensure_relative�
Iterable[str]c	Cstdkr|jjjp
dSt�}|j�d�}tdkr#ttt|jjj�}nd|vr0|dd�	�}nd}d|vrGt
jdtd	d
�|�
|dd�|sR|sRt|t�sRd}|D]3}t|�D],}|�d�rkt�d
|�d��qZ||vr�tj�|�r�t�d|�d|�d��|�
|�qZqT|S)N�9r"�metadata�*�
license_filesr�license_filezEThe "license_file" option is deprecated. Use "license_files" instead.rGrH)zLICEN[CS]E*zCOPYING*zNOTICE*zAUTHORS*�~zignoring license file "z" as it looks like a backupzadding license file "z" (matched pattern "z"))�setuptools_major_versionr�rr�setr�r
rrr`rKrF�DeprecationWarning�add�
isinstance�listr�endswithr�debugrurm�isfiler�)r��filesr�patterns�patternrmr"r"r#�
license_paths�sB�

��
��
zbdist_wheel.license_paths�egginfo_path�
distinfo_pathcCs�ddd�}||�tj�|�s?ddl}tj�tj�|�d	�}|�|�}d
|�d�}|r;tj�|d�}|d|�d
�7}t|��tj�|�rPt	||�}	t�
|�n?tj�|d�}
t	||
�}	tj||dd�d�tj�|d�}t
|dd��}|����}
Wd�n1s�wY|
s�||�tj�|d�}tdddd�}t
|ddd��}t||d��|	�Wd�n1s�wY|jD]}tj�|�}t�|tj�||��q�||�dS)z:Convert an .egg-info directory into a .dist-info directoryr}rrrpcSsPtj�|�rtj�|�stj�|�rt�|�dStj�|�r&t�|�dSdS)z-Appropriately delete directory, file or link.N)rurmr��islink�isdir�shutilr�unlink)r}r"r"r#�adios#s
$�z#bdist_wheel.egg2dist.<locals>.adiosrNz
*.egg-infozEgg metadata expected at z but not foundz (z) found - possible misnamed archive file?)�PKG-INFOcSshd�S)N>�SOURCES.txt�not-zip-safe�requires.txtr1r")�x�yr"r"r#�<lambda>Isz&bdist_wheel.egg2dist.<locals>.<lambda>)�ignorezdependency_links.txtzutf-8)�encoding�METADATATF)�utf8�mangle_from_�max_line_lengthr�)�policy)r}rrrp)rurmr��globra�dirname�basenamer�r%r�mkdirr.�copytreer
�readr�rrrr)�copy)r�r*r+r0r?�pat�possible�err�alt�pkg_info�pkginfo_path�dependency_links_path�dependency_links_file�dependency_links�
pkg_info_path�serialization_policy�out�license_path�filenamer"r"r#r� sP



����
zbdist_wheel.egg2dist)rr�)rrrr)rmrrr)rr)r*rr+r)�__name__�
__module__�__qualname__�descriptionrrr�r?r�rar5�user_options�boolean_optionsr�r��propertyr�r�r�
wheel_versionr�r�r)r�r"r"r"r#ry�sZ�������:+


:
[�
,ry)rrrr)rrrr)rr,)rr)r7r8rr)TT)
rCrrDr,rEr,rFr,rr,)rr8)rkrlrmrrnrorrp)rkrlrmrrsrtrrp)A�__doc__�
__future__rrurr.rwr/r3r>rK�email.generatorrr�email.policyrr?rr�typingrr	r
rrr
�zipfilerr�
setuptoolsrrSrr[rr�utilr�vendored.packagingrrr'�	wheelfiler�types�
__import__�ImportErrorr�	configurer$r+�intr`rr�r1r5r?rNrfrirjrrrqryr"r"r"r#�<module>s^ �




�

(