https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/wheel/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/wheel/__pycache__/wheelfile.cpython-310.pyc
o

�a�c��@s�ddlmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZddlm
ZddlmZmZmZddlmZddlmZmZmZmZmZmZejdkr^dd	lmZd
d�Zndd�Ze� d
ej!�Z"ddd�Z#Gdd�de�Z$dS)�)�print_functionN)�OrderedDict)�log)�ZIP_DEFLATED�ZipInfo�ZipFile)�
WheelError)�urlsafe_b64decode�
as_unicode�native�urlsafe_b64encode�as_bytes�StringIO)�)�
TextIOWrappercCst�t|ddd��S)N��utf-8)�newline�encoding)�csv�readerr)�fp�r�1/usr/lib/python3/dist-packages/wheel/wheelfile.py�read_csvsrccs&�t�|�D]
}dd�|D�VqdS)NcSsg|]}|�d��qS)r)�decode)�.0�columnrrr�
<listcomp>szread_csv.<locals>.<listcomp>)rr)r�linerrrrs��z�^(?P<namever>(?P<name>[^-]+?)-(?P<ver>[^-]+?))(-(?P<build>\d[^-]*))?
     -(?P<pyver>[^-]+?)-(?P<abi>[^-]+?)-(?P<plat>[^.]+?)\.whl$cCs,ttj�d|p
t����}t�|�dd�S)N�SOURCE_DATE_EPOCHr�)�int�os�environ�get�time�gmtime)�	timestamprrr�get_zipinfo_datetime#sr)c@sReZdZdZejZdefdd�Zddd�Z	dd	�Z
dd
d�Zddd
�Zdd�Z
dS)�	WheelFilez�A ZipFile derivative class that also reads SHA-256 hashes from
    .dist-info/RECORD and checks any read files against those.
    �rc
Cs�tj�|�}t�|�|_|�d�r|jdurtd�|���t	j
||||dd�d�|j�d��|_|jd|_
t�|_i|_|dkr�d	|j|j
<d	|j|j
d
<d	|j|j
d<z|�|j
�}Wntyotd�|j
���w|�Nt|�D]@}|\}}}	|s�qw|�d
�\}
}zt�|
�Wnty�td�|
���w|
��dvr�td�|
���|
t|�d��f|j|<qwWd�dS1s�wYdSdS)Nz.whlzBad wheel filename {!r}T)�compression�
allowZip64z{}.dist-info�nameverz/RECORDr+�NNz.jwsz.p7szMissing {} file�=zUnsupported hash algorithm: {}>�md5�sha1z4Weak hash algorithm ({}) is not permitted by PEP 427�ascii)r#�path�basename�
WHEEL_INFO_RE�match�parsed_filename�endswithr�formatr�__init__�group�dist_info_path�record_pathr�_file_hashes�_file_sizes�open�KeyErrorr�split�hashlib�new�
ValueError�lowerr	�encode)�self�file�moder,r5�recordrr4�hash_sum�size�	algorithmrrrr;1sN�
����"��zWheelFile.__init__Ncs�d�����fdd�	}tt|t�r|jn|��|dkr.��d�s.�|jvr.td�t�����t	�
||||��|dkrV��d�sV|j�\}��durVt�|���j
|��_
�S)NcsV|dur�j}�|�n�||���|�|r'����kr)td�t�����dSdS)NzHash mismatch for file '{}')�_eof�update�digestrr:r)�newdata�eof��ef�ef_name�
expected_hash�running_hash�update_crc_origrr�_update_crc^s


�z#WheelFile.open.<locals>._update_crcr+�/zNo hash found for file '{}'�N)r
�
isinstancer�filenamer9r?rr:rrrArDrEr[)rI�name_or_inforK�pwdr[rOrrUrrA]s�
zWheelFile.openc	Cs�t�d|j|�g}t�|�D]G\}}}|��t|�D]9}tj�tj�	||��}tj�
|�rUtj�||��tjj
d�}||jkrBq|�d�rO|�||f�q|�||�qq|��|D]
\}}|�||�q]dS)Nz#creating '%s' and adding '%s' to itr\z
.dist-info)�logger�infor_r#�walk�sort�sortedr4�normpath�join�isfile�relpath�replace�sepr>r9�append�write)	rI�base_dir�deferred�root�dirnames�	filenames�namer4�arcnamerrr�write_filesxs&

���zWheelFile.write_filescCs�t|d��}t�|���}|��}Wd�n1swYt|p$|t|j�d�}t�	|j
�t�|j
�Bd>|_|p>|j
|_|�|||�dS)N�rb��	date_time�)rAr#�fstat�fileno�readrr)�st_mtime�stat�S_IMODE�st_mode�S_IFMT�
external_attrr,�
compress_type�writestr)rIr_rur��f�st�data�zinforrrrn�s
�zWheelFile.writecCsvt�||||�t|t�r|jn|}t�d|�||jkr9|�|�}|j	t
t|����f|j
|<t|�|j|<dSdS)Nzadding '%s')rr�r^rr_rbrcr>�_default_algorithmrtrrrRr?�lenr@)rI�zinfo_or_arcname�bytesr��fname�hash_rrrr��s�

�zWheelFile.writestrcs��jdurN�jdkrN�jrNt�}tj|dddd�}|��fdd��j��D��|�t	�j
�ddf�tt�j
�t
�d	�}�j|_d
|_��|t|����t���dS)N�w�,�"�
)�	delimiter�	quotechar�lineterminatorc3s0�|]\}\}}||d|�j|fVqdS)r0N)r@)rr�rOr��rIrr�	<genexpr>�s�
�
�
�z"WheelFile.close.<locals>.<genexpr>rrxi�)rrKr?rr�writer�	writerows�items�writerowr:r>rrr)r,r�r�r�r
�getvaluer�close)rIr�r�r�rr�rr��s�zWheelFile.close)r+Nr/r])�__name__�
__module__�__qualname__�__doc__rD�sha256r�rr;rArvrnr�r�rrrrr**s
,



r*r])%�
__future__rrrD�os.pathr#�rer�sysr&�collectionsr�	distutilsrrb�zipfilerrr�	wheel.clir�
wheel.utilr	r
rrr
r�version_info�iorr�compile�VERBOSEr6r)r*rrrr�<module>s. 

�


https://t.me/RX1948 - 2025