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.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����)ZWHEEL�METADATAZRECORDc	s�t�|�}|dkr*t�|j�}|dd�}t�||�}|jd>|_tj	|_
t|d��}��||�
��WdQRXt�d|�dS)Nrr��rbzadding '%s')r�stat�time�gmtime�st_mtime�zipfile�ZipInfo�st_mode�
external_attr�ZIP_DEFLATED�
compress_type�open�writestr�readr�info)r�	date_time�st�mtime�zinfo�fp)�ziprr�	writefile-s
z'make_wheelfile_inner.<locals>.writefile�wT)�compression�
allowZip64z
.dist-info)rr$r�environ�getrr�intr�ZipFiler�walk�sort�sortedr�normpath�join�isfile�endswith�append)
r	r
�zip_filename�	timestampr%Zscorer+Zdeferred�dirpath�dirnames�	filenames�namerr)r*rrs.

r)r)	�__doc__r�os.pathrr�	distutilsrr
rrrrr�<module>s