Your IP : 216.73.216.213


Current Path : /opt/alt/python36/lib/python3.6/site-packages/wheel/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib/python3.6/site-packages/wheel/__pycache__/archive.cpython-36.pyc

3

Dt�Zz	�@sFdZddlZddlZddlZddlZddlmZdd�Zd	dd�ZdS)
z
Archive tools for wheel.
�N)�logcCs>tjjtj�}tjj|�}ztj|�t|�Stj|�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/python36/lib/python3.6/site-packages/wheel/archive.py�archive_wheelfiles
r
�.c

s.|d}tjd||�tjjd�}|dkr0d}ntjt|��dd�}ddd	d
�}�fdd�}tj	|d
tj
dd����g}x�tj|�D]r\}}	}
|	j�x^t
|
�D]R}tjjtjj||��}tjj|�r�|jd�r�|j|j|d�|f�q�|||�q�Wq�W|j�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 itZSOURCE_DATE_EPOCHNr����)ZWHEEL�METADATAZRECORDc
s�tj|�}|dkr*tj|j�}|dd�}tj||�}|jd>|_tj	|_
t|d��}�j||j
��WdQRXtjd|�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