Your IP : 216.73.216.213
�)�V� � @ sp d Z d d l Z d d l 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/python35/lib/python3.5/site-packages/wheel/archive.py�archive_wheelfile s
r
�.c
s� | d } t j d | | � t j j d � } | d k rD d } n t j t | � � d d � } t j t
| d � d d t j �� d
d d d
d d i } g } � f d d � } x� t j | � D]� \ } } }
x |
D]w } t j
j t j
j | | � � } t j
j | � r� | j d � rG| j | j | d � | f � q� | | | � q� Wq� W| j � x! | D] \ } } | | | � qmW� 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 itZSOURCE_DATE_EPOCHNr � zwb+�w�compressionZWHEEL� �METADATA� ZRECORD� c
s� t j | � } | d k r= t j | j � } | d d � } t j | | � } | j d >| _ t j | _
t | d � � } � j | | j
� � Wd QRXt j d | � d S)Nr r � �rbzadding '%s')r �stat�time�gmtime�st_mtime�zipfile�ZipInfo�st_mode�
external_attr�ZIP_DEFLATED�
compress_type�open�writestr�read�log�info)r � date_time�st�mtime�zinfo�fp)�zipr r � writefile4 s z'make_wheelfile_inner.<locals>.writefilez
.dist-info)r% r&