Your IP : 216.73.216.213


Current Path : /opt/alt/python34/lib/python3.4/site-packages/wheel/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib/python3.4/site-packages/wheel/__pycache__/archive.cpython-34.pyc

�
�/6R�@sXdZddlZddlZddlZejd�Zdd�Zddd�ZdS)	z
Archive tools for wheel.
�N�wheelcCsWtjjtj�}tjj|�}ztj|�t|�SWdtj|�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/python34/lib/python3.4/site-packages/wheel/archive.py�archive_wheelfiles
r
�.csR|d}tjd||�tjt|d�ddtj��idd6dd	6d
d6}g}�fdd
�}x�tj|�D]�\}}}x|D]w}	tjj	tjj
||	��}
tjj|
�r�|jd�r|j
|j|	d�|
f�q||
�q�q�Wq�W|j�x|D]\}}
||
�q*W�j�|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 itzwb+�w�compression�ZWHEEL��METADATA�ZRECORDcs%�j||�tjd|�dS)Nzadding '%s')�write�log�info)r)�ziprr�	writefile)sz'make_wheelfile_inner.<locals>.writefilez
.dist-infor)rr�zipfile�ZipFile�open�ZIP_DEFLATEDr�walkr�normpath�join�isfile�endswith�append�get�sort�close)r	r
�zip_filenameZscoreZdeferredr�dirpath�dirnames�	filenames�namerr)rrrs&

!"

r)	�__doc__Zlogging�os.pathrrZ	getLoggerrr
rrrrr�<module>s