HEX
Server: LiteSpeed
System: Linux s787.bom1.mysecurecloudhost.com 4.18.0-477.13.1.lve.el8.x86_64 #1 SMP Thu Jun 1 16:40:47 EDT 2023 x86_64
User: mobilech (5348)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/wheel/__pycache__/_bdist_wheel.cpython-310.pyc
o

;j�T�@s�dZddlmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
Z
mZddlmZmZddlmZddlmZddlmZdd	lmZmZmZmZdd
lmZmZddlZddl m!Z!ddl m"Z#dd
lm$Z$ddl%m&Z'ddl(m)Z)ddl*m+Z+er�ddl,Z,ze-d�Wne.y�ddl%m/Z/e/�0�Ynwe�1d�Z2dCdd�Z3dDdd�Z4e5ej&�6d�d�Z7dZ8dEd d!�Z9dFd"d#�Z:dGd&d'�Z;	(dHdId-d.�Z<dJd/d0�Z=dCd1d2�Z>dDd3d4�Z?dKd;d<�Z@dLd?d@�ZAGdAdB�dBe$�ZBdS)MzI
Create a wheel (.whl) distribution.

A wheel is a built archive format.
�)�annotationsN)�Iterable�Sequence)�BytesGenerator�	Generator)�EmailPolicy)�iglob)�rmtree)�
TYPE_CHECKING�Callable�Literal�cast)�ZIP_DEFLATED�
ZIP_STORED)�tags��version)�Command�)�__version__)�pkginfo_to_metadata)�	WheelFilezsetuptools.logging)�_setuptools_logging�wheel�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"�F/opt/saltstack/salt/lib/python3.10/site-packages/wheel/_bdist_wheel.py�	safe_name2sr$rcCs@ztt�|��WStjy|�dd�}t�dd|�YSw)zB
    Convert an arbitrary string to a standard version string
    � �.rr)r�_packaging_version�VersionZInvalidVersion�replacerr rr"r"r#�safe_version9s�r*r&zcp3\d�boolcCst�d�dkS)N�P�)�struct�calcsizer"r"r"r#�_is_32bit_interpreterJsr0cCsdtjd��S)N�pyr)�sys�version_infor"r"r"r#�
python_tagN�r4�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�
startswithZmacosx_libfiler9r0r))r6�resultr9r"r"r#r>Rs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�warningsrD�RuntimeWarning)rArBrCrD�valr"r"r#�get_flagfs

�rLcCs�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).ZSOABI)�cp�pp�
maxunicode�ZPy_DEBUGZgettotalrefcountrM)rD�dZ
WITH_PYMALLOC)���mZcpythonrrrrNNrEr&r<ZgraalpyrR)
r=rHr�interpreter_name�hasattrr2rLr3�interpreter_versionr?�split�joinr))Zsoabi�implrQrT�u�abir"r"r#�get_abi_tagwsH
�
��
�	���r]cC�t|��dd�S�Nrr<)r$r)r!r"r"r#�
safer_name�r5r`cCr^r_)r*r)rr"r"r#�
safer_version�r5ra�func�Callable[..., object]�path�excinfo�6tuple[type[Exception], Exception, types.TracebackType]�NonecCst|||d�dS)Nr)�remove_readonly_exc)rbrdrer"r"r#�remove_readonly�sri�exc�	ExceptioncCst�|tj�||�dS)N)�os�chmod�stat�S_IWRITE)rbrdrjr"r"r#rh�srhc@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)Zstored�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=rQz-directory to put final built distributions in)�
skip-buildNz2skip rebuilding everything (for testing/debugging))�relativeNz7build the archive using relative paths (default: false))zowner=r[z@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))rurwrxrzcCsxd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_t�|_d|_d|_d|_dS)N�zipFrq)�	bdist_dir�data_dir�	plat_name�plat_tag�format�	keep_temp�dist_dir�egginfo_dir�root_is_pure�
skip_buildrx�owner�grouprz�compressionr4�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)NZbdistr�egg_infoz.datazUnsupported compression: )r�r~r�zpy-limited-api must match '�'rzz=The [wheel] section is deprecated. Use [bdist_wheel] instead.r)�1�trueZyesTz1Build tag (build-number) must start with a digit.)"r|Zget_finalized_command�
bdist_baserlrdrY�distributionZget_command_objZensure_finalized�wheel_dist_namer}r~r��supported_compressionsr��KeyError�
ValueError�set_undefined_optionsr{Zhas_ext_modulesZhas_c_librariesr�r�r�match�PY_LIMITED_API_PATTERN�get_option_dict�log�warning�strip�lowerrzr��isdigit)r�r�r�Zneed_optionsrrKr"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)r`r��get_namera�get_versionr�rY)r��
componentsr"r"r#r�8s�
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�anyr8)r:Zlinux_x86_64Z
linux_i686)r;Z
linux_aarch64Zlinux_armv7lrr<r&r%zpy2.py3�noneZcp3Zabi3csg|]	}|j|j�f�qSr")�interpreterr\)�.0�t�r~r"r#�
<listcomp>us�z'bdist_wheel.get_tag.<locals>.<listcomp>z'would build wheel with unsupported tag )r�r
rr~r�r?r>r|r0r�r)rzr4rrUrWr�r]Zsys_tags)r�rZ�tagZ	impl_nameZimpl_ver�abi_tagZsupported_tagsr"r�r#�get_tagCsF
�
�

�
�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)Zreinit_subcommands�install_scripts)�headers�scripts�data�purelib�platlibZinstall_rP�ntz..Zinstall_purelibZinstall_platlibzinstalling to rZinstall_egg_info)�targetr�z
.dist-infoz.whl�wZ
dist_filesrpz{}.{}rEz	removing )rR�)�onerror)Zonexc)5Zreinitialize_command�
executable�forceZinplacer�Zrun_commandr|�root�compileZwarn_dirZno_ep�setattrrlrdrYr}r�normpathZinstall_libbaseZinstall_libr�r��infor�r�rx�_ensure_relativeZinstall_baser�r`r�r�rar��egg2distr��write_wheelfile�existsr��makedirsrr�Zwrite_files�getattr�appendr�r2r3r��dry_runr	rirh)r�r�r�r�r��keyZbasedir_observed�impl_tagr�rZarchive_basenamer6Zdistinfo_dirnameZdistinfo_dir�
wheel_pathZwfr"r"r#�run}s|




�
���
����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-PurelibZBuildr&rZTagZWHEELz	creating �wb)�maxheaderlen)�
email.messager�rr�r�r�r�rXrYrlrdr�r��openr�flatten)
r�r�r�r��msgr�r�rrZr\�platZwheelfile_path�fr"r"r#r��s&

��"�zbdist_wheel.write_wheelfilerdcCs6tj�|�\}}|dd�tjkr||dd�}|S)Nrr)rlrd�
splitdrive�sep)r�rd�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_filesrZlicense_filezEThe "license_file" option is deprecated. Use "license_files" instead.rErF)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�r
rrrXrIrD�DeprecationWarning�add�
isinstance�listr�endswithr��debugrlrd�isfiler�)r��filesr��patterns�patternrdr"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 directoryrsrrrgcSsPtj�|�rtj�|�stj�|�rt�|�dStj�|�r&t�|�dSdS)z-Appropriately delete directory, file or link.N)rlrdr��islink�isdir�shutilr	�unlink)rsr"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>zrequires.txtr�znot-zip-safezSOURCES.txtr")�x�yr"r"r#�<lambda>Lsz&bdist_wheel.egg2dist.<locals>.<lambda>)�ignorezdependency_links.txtzutf-8)�encodingZMETADATATF)�utf8�mangle_from_�max_line_lengthr�)�policy)rsrrrg)rlrdr��globrY�dirname�basenamer�r�r�mkdirr��copytreer��readr�rrr�r��copy)r�r�r�r�r�pat�possible�errZalt�pkg_infoZpkginfo_pathZdependency_links_pathZdependency_links_fileZdependency_linksZ
pkg_info_pathZserialization_policy�outZlicense_path�filenamer"r"r#r�#sP



����
zbdist_wheel.egg2dist)rr�)r�rr�r)rdrrr)rr�)r�rr�r)�__name__�
__module__�__qualname__�descriptionrrr�r>r�rYr4Zuser_optionsZboolean_optionsr�r��propertyr�r�r��
wheel_versionr�r�r�r�r"r"r"r#rp�sZ�������:+


:
[�
,rp)rrrr)rrrr)rr+)rr)r6r7rr)TT)
rArrBr+rCr+rDr+rr+)rr7)rbrcrdrrerfrrg)rbrcrdrrjrkrrg)C�__doc__�
__future__r�loggingrlrr�rnr.r2r=rI�collections.abcrr�email.generatorrr�email.policyrrrr	�typingr
rrr
�zipfilerrZ
setuptoolsZ	packagingrrr'rrPrrZ	_metadatarZ	wheelfiler�types�
__import__�ImportErrorrZ	configure�	getLoggerr�r$r*�intrXr�r�r0r4r>rLr]r`rarirhrpr"r"r"r#�<module>sb�





�

(