Your IP : 216.73.216.213
�
�/6R � @ sX d Z d d l Z d d l Z d d l Z e j d � Z d d � Z d d d � Z d S) z
Archive tools for wheel.
� N�wheelc C sW t j j t j � } t j j | � } z t j | � t | � SWd t j | � Xd S)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
�.c sR | d } t j d | | � t j t | d � d d t j �� i d d 6d d 6d
d 6} g } � f d d
� } x� t j | � D]� \ } } } x | D]w } t j j t j j
| | � � }
t j j |
� 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� ZRECORDc s% � j | | � t j d | � d S)Nzadding '%s')�write�log�info)r )�zipr r � writefile) s z'make_wheelfile_inner.<locals>.writefilez
.dist-infor )r r �zipfile�ZipFile�open�ZIP_DEFLATEDr �walkr �normpath�join�isfile�endswith�append�get�sort�close)r r
�zip_filenameZscoreZdeferredr �dirpath�dirnames� filenames�namer r )r r r s&