Your IP : 216.73.216.85


Current Path : /opt/alt/python37/lib/python3.7/site-packages/twine/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/twine/__pycache__/wininst.cpython-37.pyc

B

Fd�WX�@sbddlmZmZmZddlmZddlZddlZddlZddlm	Z	e�
d�ZGdd�de	�ZdS)�)�absolute_import�division�print_function)�unicode_literalsN)�Distributionz.*py(?P<pyver>\d+\.\d+)\.exe$c@s*eZdZddd�Zedd��Zdd�ZdS)	�WinInstNcCs||_||_|��dS)N)�filename�metadata_versionZextractMetadata)�selfrr	�r�>/opt/alt/python37/lib/python3.7/site-packages/twine/wininst.py�__init__szWinInst.__init__cCs&t�|j�}|dkrdS|�d�SdS)N�any�pyver)�wininst_file_re�matchr�group)r
�mrrr�
py_versionszWinInst.py_versionc	s�tj�tj�|j��}tj�|�s.td|��|�d�rXt�	|����
�}�fdd�}ntd|��zZdd�|D�}tdd�|D��}x4d	d�|D�D]"}d
�|�}||�}d|kr�|Sq�WWd��
�Xtd|��dS)
NzNo such file: %sz.execs
��|�S)N)�read)�name)�archiverr�	read_file%szWinInst.read.<locals>.read_filezNot a known archive format: %scSs*g|]"}|�d�s|�d�r|�d��qS)z	.egg-infozPKG-INFO�/)�endswith�split)�.0�xrrr�
<listcomp>+sz WinInst.read.<locals>.<listcomp>cSsg|]}t|�|f�qSr)�len)rrrrrr-scSsg|]}|d�qS)�r)rrrrrr.srsMetadata-Versionz$No PKG-INFO/.egg-info in archive: %s)�os�path�abspath�normpathr�exists�
ValueErrorr�zipfile�ZipFile�namelist�sorted�join�close)	r
Zfqn�namesrZtuplesZschwarzr"�	candidate�datar)rrrs$



zWinInst.read)N)�__name__�
__module__�__qualname__r
�propertyrrrrrrr
s
r)
�
__future__rrrrr!�rer'Zpkginfo.distributionr�compilerrrrrr�<module>s