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: //usr/local/lib/python3.7/site-packages/wheel/__pycache__/bdist_wheel.cpython-37.pyc
B

O��g�Q�@s�dZddlmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZm
Z
ddlmZddlmZddlmZddlmZmZddlZdd	lmZd
dlmZd
dlmZd
d
lmZd
dlm Z d
dl!m"Z"d
dl!m#Z$d
dl%m&Z&dd�Z'dd�Z(e)ej�*d�d�Z+dZ,dd�Z-dd�Z.dd�Z/d-dd �Z0d!d"�Z1d#d$�Z2d%d&�Z3d'd(�Z4d)d*�Z5Gd+d,�d,e�Z6dS).zI
Create a wheel (.whl) distribution.

A wheel is a built archive format.
�)�annotationsN)�BytesGenerator�	Generator)�EmailPolicy)�iglob)�rmtree)�ZIP_DEFLATED�
ZIP_STORED)�Command�)�__version__)�calculate_macosx_platform_tag)�pkginfo_to_metadata)�log)�tags)�version)�	WheelFilecCst�dd|�S)z�Convert an arbitrary string to a standard distribution name
    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    z[^A-Za-z0-9.]+�-)�re�sub)�name�r�5/tmp/pip-unpacked-wheel-f1gdtpe6/wheel/bdist_wheel.py�	safe_name#srcCs@ytt�|��Stjk
r:|�dd�}t�dd|�SXdS)zB
    Convert an arbitrary string to a standard version string
    � �.z[^A-Za-z0-9.]+rN)�str�_packaging_version�Version�InvalidVersion�replacerr)rrrr�safe_version*s
r!rzcp3\dcCst�d�dkS)N�P�)�struct�calcsizerrrr�_is_32bit_interpreter;sr&cCsdtjd��S)N�pyr)�sys�version_inforrrr�
python_tag?sr*cCsRt��}|�d�r&|dk	r&t||�}n t�rF|dkr:d}n|dkrFd}|�dd�S)	z0Return our platform name 'win32', 'linux_x86_64'�macosxNzlinux-x86_64z
linux-i686z
linux-aarch64zlinux-armv7lr�_)�	sysconfig�get_platform�
startswithr
r&r )�archive_root�resultrrrr.Csr.TcCs:t�|�}|dkr2|r.tjd|�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�warnings�warn�RuntimeWarning)�var�fallback�expectedr6�valrrr�get_flagUs

r<cCs�t�d�}t��}|s�|dkr�ttd�r�d}d}d}tdttd�|dkd�rPd	}td
|dk|dkojtjdkd�r~tjdkr~d}|�t���|�|�|��}n�|r�|dkr�|�	d
�r�d|�
d�d}n�|r�|dkr�|�	d�r�|�
d�d}n�|�r*|dk�r*d�|�
d�dd��}|�dd��dd�}n^|�rh|dk�rhd�|�
d�dd��}|�dd��dd�}n |�r�|�dd��dd�}nd}|S)zJReturn the ABI tag based on SOABI (if available) or emulate SOABI (PyPy2).�SOABI)�cp�pp�
maxunicode��Py_DEBUG�gettotalrefcountr>)r6�d�
WITH_PYMALLOC)���m�cpythonrrrr?Nr2rr,ZgraalpyrF)
r-r4r�interpreter_name�hasattrr(r<r)�interpreter_versionr/�split�joinr )Zsoabi�implrDrH�u�abirrr�get_abi_tagds:

rRcCst|��dd�S)Nrr,)rr )rrrr�
safer_name�srScCst|��dd�S)Nrr,)r!r )rrrr�
safer_version�srTcCst|||d�dS)Nr)�remove_readonly_exc)�func�path�excinforrr�remove_readonly�srYcCst�|tj�||�dS)N)�os�chmod�stat�S_IWRITE)rVrW�excrrrrU�srUc@s�eZdZdZeed�Zdddded�fdd	d
ddd
dddd�d�	e��fddde
�fddg
ZddddgZdd�Z
dd�Zedd��Zd d!�Zd"d#�Zd$ed%fd&d'�Zd(d)�Zed*d+��Zd,d-�ZdS).�bdist_wheelzcreate a wheel distribution)Zstored�deflated)z
bdist-dir=�bz1temporary directory for creating the distributionz
plat-name=�pz;platform name to embed in generated filenames (default: %s)N)z	keep-temp�kzPkeep the pseudo-installation tree around after creating the distribution archive)z	dist-dir=rDz-directory to put final built distributions in)z
skip-buildNz2skip rebuilding everything (for testing/debugging))�relativeNz7build the archive using relative paths (default: false))zowner=rPz@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=z7Python implementation compatibility tag (default: '%s'))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)z	keep-tempz
skip-buildrdrfcCsxd|_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_buildrd�owner�grouprf�compressionr*�build_number�py_limited_api�plat_name_supplied)�selfrrr�initialize_options�s&zbdist_wheel.initialize_optionscCsL|jdkr&|�d�j}tj�|d�|_|j�d�}|��|j	d|_
|jdk	|_y|j
|j|_Wn&tk
r�td|j���d�YnXd}|jdt||���|j��p�|j��|_|jr�t�t|j�s�tdt��|j�d�}d|k�r t�d	�|dd
��}|��dk�r d|_|j dk	�rH|j dd
��!��sHtd
��dS)N�bdist�wheel�egg_infoz.datazUnsupported compression: )rnrjrqzpy-limited-api must match '%s'rfz=The [wheel] section is deprecated. Use [bdist_wheel] instead.r)�1�true�yesTz1Build tag (build-number) must start with a digit.)rz)"rh�get_finalized_command�
bdist_baserZrWrN�distribution�get_command_obj�ensure_finalized�wheel_dist_namerirjrw�supported_compressionsrt�KeyError�
ValueError�set_undefined_optionsrg�has_ext_modules�has_c_librariesrprvr�match�PY_LIMITED_API_PATTERN�get_option_dictr�warning�strip�lowerrfru�isdigit)rxr�r|Zneed_optionsr{r;rrr�finalize_options�s4



 zbdist_wheel.finalize_optionscCs8t|j���t|j���f}|jr.||jf7}d�|�S)z4Return distribution full name with - replaced with _r)rSr��get_namerT�get_versionrurN)rx�
componentsrrrr�"s
zbdist_wheel.wheel_dist_namecs"|jr|j�nN|jrd�nB|jr4|j�d�s4|j�n
t|j��t�r\�dkrPd��dkr\d�����dd��d	d��d
d��|jr�|j	r�d}n|j
}|d�f}n~t��}t�
�}||}|jr�||�d
�r�|j}d}ntt����}||�f}�fdd�t��D�}||k�std|����|S)N�anyr+)zlinux-x86_64�linux_x86_64�
linux_i686)z
linux-aarch64�
linux_aarch64�linux_armv7lrr,rrzpy2.py3�noneZcp3�abi3csg|]}|j|j�f�qSr)�interpreterrQ)�.0�t)rjrr�
<listcomp>`sz'bdist_wheel.get_tag.<locals>.<listcomp>z'would build wheel with unsupported tag )rwrjrpr/r.rhr&r�r rfr*rrJrLrvrrR�sys_tags�AssertionError)rxrO�tagZ	impl_nameZimpl_ver�abi_tag�supported_tagsr)rjr�get_tag-s<
 
zbdist_wheel.get_tagc	Csr|�d�}d|_d|_|�d�}d|_|js6|�d�|jddd�}|j|_d|_|j|_d|_	|�d	�}d|_
x(d
D] }t|d|tj
�|j|��qvWd}tjd
kr�tj
�tj
�|jd��}||_|_t||jr�dnd|�t�d|j���|�d�|��\}}}	|j�d|�d|�d|	��}
|j�s8|j}ntj
�|j|�|j��}|�dd�d�t|j� ��t!|j�"���}tj
�|j|�}
|�#|j$|
�|�%|
�tj
�&|j'��s�t�(|j'�tj
�|j'|
d�}t)|d|j*��}|�+|�WdQRXt,|jdg��-ddjt.j/dd��|f�|j0�snt�d|j���|j1�snt.j/dk�r`t2|jt3d�nt2|jt4d�dS) N�
build_scripts�pythonT�	build_extF�build�install)�reinit_subcommands�install_scripts)�headers�scripts�data�purelib�platlib�install_rA�ntz..�install_purelib�install_platlibzinstalling to r�install_egg_info)�targetroz{}-{}.dist-infoz.whl�w�
dist_filesr_z{}.{}r2z	removing )rF�)�onerror)Zonexc)5�reinitialize_command�
executable�forceZinplacerq�run_commandrh�root�compile�warn_dirZno_ep�setattrrZrWrNrir�normpath�install_libbase�install_librpr�infor�r�rd�_ensure_relative�install_baser�rlrSr�r�rTr��egg2distro�write_wheelfile�existsrn�makedirsrrtZwrite_files�getattr�appendr(r)rm�dry_runrrYrU)rxr�r�r�r��keyZbasedir_observed�impl_tagr�rkZarchive_basenamer0Zdistinfo_dirname�distinfo_dir�
wheel_pathZwfrrr�rungsl




 


zbdist_wheel.runz
bdist_wheel (�)c
	Cs�ddlm}|�}d|d<||d<t|j���|d<|jdk	rH|j|d<|��\}}}xN|�d�D]@}x:|�d�D],}	x&|�d�D]}
d	�||	|
f�|d
<q�WqrWqbWt	j
�|d�}t�d|���t
|d
��}t|dd��|�WdQRXdS)Nr)�Messagez1.0z
Wheel-VersionrzRoot-Is-PurelibZBuildrr�TagZWHEELz	creating �wb)�maxheaderlen)�
email.messager�rrpr�rur�rMrNrZrWrr��openr�flatten)
rxZwheelfile_base�	generatorr��msgr�r�rkrOrQ�platZwheelfile_path�frrrr��s 

 zbdist_wheel.write_wheelfilecCs6tj�|�\}}|dd�tjkr2||dd�}|S)Nrr)rZrW�
splitdrive�sep)rxrW�driverrrr��szbdist_wheel._ensure_relativec	Cstdkr|jjjpdSt�}|j�d�}tdkr<|jjj}nd|krV|dd��}nd}d|kr�tjdt	d	d
�|�
|dd�|s�|s�t|t�s�d}xr|D]j}xdt
|�D]X}|�d�r�t�d
|�d��q�||kr�tj�|�r�t�d|�d|�d��|�
|�q�Wq�W|S)N�9r�metadata�*�
license_filesrZlicense_filezEThe "license_file" option is deprecated. Use "license_files" instead.r2)r3)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�r�r��setr�rMr5r6�DeprecationWarning�add�
isinstance�listr�endswithr�debugrZrW�isfiler�)rx�filesr��patterns�patternrWrrr�
license_paths�s8

zbdist_wheel.license_pathsc	Cs�dd�}||�tj�|�s|ddl}tj�tj�|�d�}|�|�}d|�d�}|rttj�|d�}|d|�d	�7}t|��tj�|�r�|}	t	||�}
t�
|�nltj�|d
�}	t	||	�}
tj||dd�d
�tj�|d�}t
|dd��}|����}
WdQRX|
�s||�tj�|d�}tdddd�}t
|ddd��}t||d��|
�WdQRXx2|jD](}tj�|�}t�|tj�||���q^W||�dS)z:Convert an .egg-info directory into a .dist-info directorycSsJtj�|�r0tj�|�s0tj�|�r0t�|�ntj�|�rFt�|�dS)z-Appropriately delete directory, file or link.N)rZrWr��islink�isdir�shutilr�unlink)rbrrr�adioss$z#bdist_wheel.egg2dist.<locals>.adiosrNz
*.egg-infozEgg metadata expected at z but not foundz (z) found - possible misnamed archive file?)zPKG-INFOcSsddddhS)NzPKG-INFOzrequires.txtzSOURCES.txtznot-zip-safer)�x�yrrr�<lambda>7sz&bdist_wheel.egg2dist.<locals>.<lambda>)�ignorezdependency_links.txtzutf-8)�encoding�METADATATF)�utf8�mangle_from_�max_line_lengthr�)�policy)rZrWr��globrN�dirname�basenamer�r�r�mkdirr��copytreer��readr�rrr�r��copy)rxZegginfo_pathZ
distinfo_pathr�r�pat�possible�errZaltZpkginfo_path�pkg_infoZdependency_links_pathZdependency_links_fileZdependency_linksZ
pkg_info_pathZserialization_policy�outZlicense_path�filenamerrrr�
sJ


	zbdist_wheel.egg2dist)�__name__�
__module__�__qualname__�descriptionr	rr�r.rlrNr*�user_options�boolean_optionsryr��propertyr�r�r��
wheel_versionr�r�r�r�rrrrr_�sF
+:[-r_)TT)7�__doc__�
__future__rrZrr�r\r$r(r-r5�email.generatorrr�email.policyrrrr�zipfilerr	�
setuptoolsr
rArrZmacosx_libfiler
r�r�utilrZvendored.packagingrrrZ	wheelfilerrr!�intrMr�r�r&r*r.r<rRrSrTrYrUr_rrrr�<module>sJ
(