Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib/python3.7/site-packages/wheel/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/wheel/__pycache__/archive.cpython-37.opt-1.pyc

B

Dt�Zz	�@sFdZddlZddlZddlZddlZddlmZdd�Zd	dd�ZdS)
z
Archive tools for wheel.
�N)�logc	Cs>tj�tj�}tj�|�}zt�|�t|�St�|�XdS)zWArchive all files under `base_dir` in a whl file and name it like
    `base_name`.
    N)�os�path�abspath�curdir�chdir�make_wheelfile_inner)�	base_name�base_dirZolddir�r�>/opt/alt/python37/lib/python3.7/site-packages/wheel/archive.py�archive_wheelfiles
r
�.c
	s.|d}t�d||�tj�d�}|dkr0d}nt�t|��dd�}ddd	d
�}�fdd�}tj	|d
tj
dd����g}x�t�|�D]r\}}	}
|	��x^t
|
�D]R}tj�tj�||��}tj�|�r�|�d�r�|�|�|d�|f�q�|||�q�Wq�W|��x|D]\}}|||��qWWdQRX|S)zhCreate a whl file from all the files under 'base_dir'.

    Places .dist-info at the end of the archive.z.whlz#creating '%s' and adding '%s' to it�SOURCE_DATE_EPOCHNr����)ZWHEELZMETADATAZRECORDc	s�t�|�}|dkr*t�|j�}|dd�}t�||�}|jd>|_tj	|_
t|d��}��||�
��WdQRXt�d|�dS)Nrr��rbzadding '%s')r�stat�time�gmtime�st_mtime�zipfileZZipInfo�st_modeZ
external_attr�ZIP_DEFLATEDZ
compress_type�openZwritestr�readr�info)r�	date_time�st�mtimeZzinfo�fp)�ziprr�	writefile-s
z'make_wheelfile_inner.<locals>.writefile�wT)ZcompressionZ
allowZip64z
.dist-info)rrr�environ�getrr�intrZZipFiler�walk�sort�sortedr�normpath�join�isfile�endswith�append)
r	r
Zzip_filenameZ	timestampr Zscorer%Zdeferred�dirpathZdirnames�	filenames�namerr)r$rrs.

r)r)	�__doc__rZos.pathrr�	distutilsrr
rrrrr�<module>s