Your IP : 216.73.216.213


Current Path : /opt/alt/python35/lib/python3.5/site-packages/wheel/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib/python3.5/site-packages/wheel/__pycache__/archive.cpython-35.pyc



�)�V��@spdZddlZddlZddlZddlZddlZejd�Zdd�Zddd�Z	dS)	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/python35/lib/python3.5/site-packages/wheel/archive.py�archive_wheelfiles
r
�.c
s�|d}tjd||�tjjd�}|dkrDd}ntjt|��dd�}tj	t
|d�dd	tj��d
ddd
ddi}g}�fdd�}x�tj|�D]�\}}	}
x|
D]w}tj
jtj
j||��}tj
j|�r�|jd�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�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�read�log�info)r�	date_time�st�mtime�zinfo�fp)�ziprr�	writefile4sz'make_wheelfile_inner.<locals>.writefilez
.dist-info)r%r&r�environ�getrr�intr�ZipFiler"r �walkr�normpath�join�isfile�endswith�append�sort�close)
r	r
�zip_filename�	timestampr'ZscoreZdeferredr-�dirpath�dirnames�	filenames�namerr)r,rrs.
	
!"

r)
�__doc__rrZlogging�os.pathrZ	getLoggerr%r
rrrrr�<module>s