Your IP : 216.73.216.213


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

B

�j�RI�@s~ddlmZddlmZddlmZdd�Zdd�Zdd	�Zd
d�ZdZ	e	d
Z
e
dZeZe	e
eed�Z
Gdd�de�ZdS)�)�Parser)�StringIO)�must_decodecCst��|�S)N)r�parse)�fp�r�E/opt/alt/python37/lib/python3.7/site-packages/pkginfo/distribution.pyrsrcCst||�|��S)N)�_collapse_leading_ws�get)�msg�headerrrrr
	sr
cs�fdd�|���D�S)Ncsg|]}t�|��qSr)r	)�.0�x)rrr�
<listcomp>szget_all.<locals>.<listcomp>)�get_all)rrr)rrrsrcCsD|��dkr(d�dd�|����D��Sd�dd�|��D��SdS)zL
    ``Description`` header must preserve newlines; all others need not
    �description�
cSs&g|]}|�d�r|dd�n|�qS)z        �N)�
startswith)r
rrrrrsz(_collapse_leading_ws.<locals>.<listcomp>� cSsg|]}|���qSr)�strip)r
rrrrrsN)�lower�joinr�
splitlines)rZtxtrrrr	s
r	))zMetadata-Version�metadata_versionF)�Name�nameF)�Version�versionF)�Platform�	platformsT)zSupported-Platform�supported_platformsT)ZSummary�summaryF)ZDescriptionrF)ZKeywords�keywordsF)z	Home-Page�	home_pageF)ZAuthor�authorF)zAuthor-email�author_emailF)ZLicense�licenseF))�
Classifier�classifiersT)zDownload-URL�download_urlF)�Requires�requiresT)�Provides�providesT)�	Obsoletes�	obsoletesT))Z
Maintainer�
maintainerF)zMaintainer-email�maintainer_emailF)zRequires-Python�requires_pythonF)zRequires-External�requires_externalT)z
Requires-Dist�
requires_distT)z
Provides-Dist�
provides_distT)zObsoletes-Dist�obsoletes_distT)zProject-URL�project_urlsT)z1.0z1.1z1.2z2.0c@s�eZdZdZdZdZdZdZdZdZ	dZ
dZdZdZ
dZdZdZdZdZdZdZdZdZdZdZdZdZdZdd�Zdd�Zdd�Zd	d
�Zdd�Z e Z!dS)
�DistributionNrcCs|��}|�|�dS)N)�readr)�self�datarrr�extractMetadatabszDistribution.extractMetadatacCst�dS)N)�NotImplementedError)r;rrrr:fszDistribution.readcCst�|jg�S)N)�HEADER_ATTRSr
r)r;rrr�_getHeaderAttrsiszDistribution._getHeaderAttrsc
Cs�tt|��}t|�}d|kr:|jdkr:t|d�}|}|_xb|��D]V\}}}|dkrXqD||krD|r|t||�}	t|||	�qDt||�}|dkrDt|||�qDWdS)NzMetadata-Versionr�UNKNOWN)rrrrr
r@r�setattr)
r;r<rr�valuer�header_name�	attr_name�multiple�valuesrrrrls



zDistribution.parseccs"x|��D]\}}}|Vq
WdS)N)r@)r;rDrErFrrr�__iter__�szDistribution.__iter__)"�__name__�
__module__�__qualname__rrrr r!r"rr#r$r*r%r&r'r)r,r.r0r1r2r3r4r5r6r7r8r=r:r@rrH�iterkeysrrrrr9Ds>r9N)�email.parserrZpkginfo._compatrrrr
rr	ZHEADER_ATTRS_1_0ZHEADER_ATTRS_1_1ZHEADER_ATTRS_1_2ZHEADER_ATTRS_2_0r?�objectr9rrrr�<module>s"