Hacked By AnonymousFox

Current Path : /lib/python2.7/site-packages/pip/_vendor/distlib/
Upload File :
Current File : //lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyo

�
��abc@s�dZddlmZddlZddlmZddlZddlZddlZddl	m
Z
mZddlm
Z
mZmZddlmZdd	lmZmZdd
lmZmZeje�Zde
fd��YZd
e
fd��YZde
fd��YZde
fd��YZdddgZdZ dZ!ej"d�Z#ej"d�Z$ddddddd d!d"d#d$fZ%ddddd%ddd d!d"d#d$d&d'd(d)d*fZ&d(d)d*d&d'fZ'ddddd%ddd d!d"d#d+d,d$d&d'd-d.d/d0d1d2fZ(d/d0d1d-d2d+d,d.fZ)ddddd%ddd d!d"d#d+d,d$d&d'd-d.d/d0d1d2d3d4d5d6d7fZ*d3d7d4d5d6fZ+e,�Z-e-j.e%�e-j.e&�e-j.e(�e-j.e*�ej"d8�Z/d9�Z0d:�Z1idd;6dd<6dd=6dd>6d%d?6dd@6ddA6d dB6d!dC6d"dD6d#dE6d+dF6d,dG6d$dH6d&dI6d'dJ6d-dK6d/dL6d0dM6d5dN6d1dO6d2dP6d*dQ6d)dR6d(dS6d.dT6d3dU6d4dV6d6dW6d7dX6Z2d0d-d/fZ3d1fZ4dfZ5dd&d(d*d)d-d/d0d2d.d%d5d7d6fZ6d.fZ7d fZ8d"d+ddfZ9e:�Z;ej"dY�Z<e=dZ�Z>d[e:fd\��YZ?d]Z@d^ZAd_e:fd`��YZBdS(auImplementation of the Metadata for Python packages PEPs.

Supports all metadata formats (1.0, 1.1, 1.2, and 2.0 experimental).
i����(tunicode_literalsN(tmessage_from_filei(tDistlibExceptiont__version__(tStringIOtstring_typest	text_type(t	interpret(textract_by_keyt
get_extras(t
get_schemetPEP440_VERSION_REtMetadataMissingErrorcBseZdZRS(uA required metadata is missing(t__name__t
__module__t__doc__(((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyRstMetadataConflictErrorcBseZdZRS(u>Attempt to read or write metadata fields that are conflictual.(R
RR(((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyR st MetadataUnrecognizedVersionErrorcBseZdZRS(u Unknown metadata version number.(R
RR(((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyR$stMetadataInvalidErrorcBseZdZRS(uA metadata value is invalid(R
RR(((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyR(suMetadatauPKG_INFO_ENCODINGuPKG_INFO_PREFERRED_VERSIONuutf-8u1.1u

       \|u	
        uMetadata-VersionuNameuVersionuPlatformuSummaryuDescriptionuKeywordsu	Home-pageuAuthoruAuthor-emailuLicenseuSupported-Platformu
ClassifieruDownload-URLu	ObsoletesuProvidesuRequiresu
MaintaineruMaintainer-emailuObsoletes-DistuProject-URLu
Provides-Distu
Requires-DistuRequires-PythonuRequires-ExternaluPrivate-VersionuObsoleted-ByuSetup-Requires-Distu	ExtensionuProvides-Extrau"extra\s*==\s*("([^"]+)"|'([^']+)')cCsP|dkrtS|dkr tS|dkr0tS|dkr@tSt|��dS(Nu1.0u1.1u1.2u2.0(t_241_FIELDSt_314_FIELDSt_345_FIELDSt_426_FIELDSR(tversion((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyt_version2fieldlistgsc	Csd�}g}xB|j�D]4\}}|gddfkrCqn|j|�qWddddg}x�|D]�}|tkr�d|kr�|jd�n|tkr�d|kr�|jd�n|tkr�d|kr�|jd�n|tkrmd|krm|jd�qmqmWt|�dkr1|dSt|�dkrRt	d	��nd|koj||t
�}d|ko�||t�}d|ko�||t�}t
|�t
|�t
|�dkr�t	d
��n|r|r|rt|krtSn|r
dS|rdSdS(u5Detect the best version depending on the fields used.cSs%x|D]}||krtSqWtS(N(tTruetFalse(tkeystmarkerstmarker((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyt_has_markerus
uUNKNOWNu1.0u1.1u1.2u2.0iiuUnknown metadata setu(You used incompatible 1.1/1.2/2.0 fieldsN(titemstNonetappendRtremoveRRRtlenRt_314_MARKERSt_345_MARKERSt_426_MARKERStinttPKG_INFO_PREFERRED_VERSION(	tfieldsRRtkeytvaluetpossible_versionstis_1_1tis_1_2tis_2_0((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyt
_best_versionssB	
&umetadata_versionunameuversionuplatformusupported_platformusummaryudescriptionukeywordsu	home_pageuauthoruauthor_emailu
maintainerumaintainer_emailulicenseu
classifierudownload_urluobsoletes_distu
provides_distu
requires_distusetup_requires_disturequires_pythonurequires_externalurequiresuprovidesu	obsoletesuproject_urluprivate_versionuobsoleted_byu	extensionuprovides_extrau[^A-Za-z0-9.]+cCsG|r9tjd|�}tjd|jdd��}nd||fS(uhReturn the distribution name with version.

    If for_filename is true, return a filename-escaped form.u-u u.u%s-%s(t	_FILESAFEtsubtreplace(tnameRtfor_filename((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyt_get_name_and_version�s!tLegacyMetadatacBs4eZdZddddd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zed
�Zd�Zd�Zd�Zd�Zed�Zed�Zdd�Zd�Zed�Zed�Zed�Zd�Zd�Zd�Zd�Z d�Z!d�Z"RS( uaThe legacy metadata of a release.

    Supports versions 1.0, 1.1 and 1.2 (auto-detected). You can
    instantiate the class with one of these arguments (or none):
    - *path*, the path to a metadata file
    - *fileobj* give a file-like object with metadata as content
    - *mapping* is a dict-like object
    - *scheme* is a version scheme name
    udefaultcCs�|||gjd�dkr-td��ni|_g|_d|_||_|dk	rm|j|�nB|dk	r�|j|�n&|dk	r�|j	|�|j
�ndS(Niu'path, fileobj and mapping are exclusive(tcountR t	TypeErrort_fieldstrequires_filest
_dependenciestschemetreadt	read_filetupdatetset_metadata_version(tselftpathtfileobjtmappingR=((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyt__init__�s				
cCst|j�|jd<dS(NuMetadata-Version(R0R:(RB((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyRAscCs|jd||f�dS(Nu%s: %s
(twrite(RBRDR4R+((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyt_write_fieldscCs
|j|�S(N(tget(RBR4((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyt__getitem__scCs|j||�S(N(tset(RBR4R+((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyt__setitem__scCsA|j|�}y|j|=Wntk
r<t|��nXdS(N(t
_convert_nameR:tKeyError(RBR4t
field_name((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyt__delitem__s

cCs%||jkp$|j|�|jkS(N(R:RM(RBR4((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyt__contains__scCs8|tkr|S|jdd�j�}tj||�S(Nu-u_(t_ALL_FIELDSR3tlowert_ATTR2FIELDRI(RBR4((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyRMscCs |tks|tkrgSdS(NuUNKNOWN(t_LISTFIELDSt_ELEMENTSFIELD(RBR4((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyt_default_value%scCs3|jdkrtjd|�Stjd|�SdS(Nu1.0u1.1u
(u1.0u1.1(tmetadata_versiont_LINE_PREFIX_PRE_1_2R2t_LINE_PREFIX_1_2(RBR+((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyt_remove_line_prefix*scCs$|tkr||St|��dS(N(RTtAttributeError(RBR4((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyt__getattr__0scCst|d|d|�S(uhReturn the distribution name with version.

        If filesafe is true, return a filename-escaped form.uNameuVersion(R6(RBtfilesafe((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pytget_fullname;scCs|j|�}|tkS(u+return True if name is a valid metadata key(RMRR(RBR4((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pytis_fieldAscCs|j|�}|tkS(N(RMRU(RBR4((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pytis_multi_fieldFscCs;tj|ddd�}z|j|�Wd|j�XdS(u*Read the metadata values from a file path.urtencodinguutf-8N(tcodecstopenR?tclose(RBtfilepathtfp((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyR>JscCs�t|�}|d|jd<x�tD]�}||kr<q$n|tkr�|j|�}|tkr�|dk	r�g|D]}t|jd��^qv}n|j	||�q$||}|dk	r$|dkr$|j	||�q$q$W|j
�dS(u,Read the metadata values from a file object.umetadata-versionuMetadata-Versionu,uUNKNOWNN(RR:RRRUtget_allt_LISTTUPLEFIELDSR ttupletsplitRKRA(RBtfileobtmsgtfieldtvaluesR+((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyR?Rs
+
cCs>tj|ddd�}z|j||�Wd|j�XdS(u&Write the metadata fields to filepath.uwRbuutf-8N(RcRdt
write_fileRe(RBRftskip_unknownRg((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyRGhscCs<|j�x+t|d�D]}|j|�}|rT|dgdgfkrTqn|tkr�|j||dj|��qn|tkr�|dkr�|jdkr�|jdd�}q�|jdd	�}n|g}n|t	krg|D]}dj|�^q�}nx!|D]}|j|||�qWqWd
S(u0Write the PKG-INFO format data to a file object.uMetadata-VersionuUNKNOWNu,uDescriptionu1.0u1.1u
u	
        u	
       |N(u1.0u1.1(
RARRIRVRHtjoinRURXR3Ri(RBt
fileobjectRqRnRoR+((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyRpps$
%
cs��fd�}|sn^t|d�rRxL|j�D]}||||�q4Wn$x!|D]\}}|||�qYW|r�x*|j�D]\}}|||�q�WndS(u�Set metadata values from the given iterable `other` and kwargs.

        Behavior is like `dict.update`: If `other` has a ``keys`` method,
        they are looped over and ``self[key]`` is assigned ``other[key]``.
        Else, ``other`` is an iterable of ``(key, value)`` iterables.

        Keys that don't match a metadata field or that have an empty value are
        dropped.
        cs2|tkr.|r.�j�j|�|�ndS(N(RTRKRM(R*R+(RB(s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyt_set�sukeysN(thasattrRR(RBtothertkwargsRttktv((RBs@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyR@�s
cCs|j|�}|tks'|dkr�t|ttf�r�t|t�rwg|jd�D]}|j�^q\}q�g}nF|tkr�t|ttf�r�t|t�r�|g}q�g}nt	j
tj�r�|d}t
|j�}|tkrR|d	k	rRx�|D];}|j|jd�d�st	jd|||�qqWq�|tkr�|d	k	r�|j|�s�t	jd|||�q�q�|tkr�|d	k	r�|j|�s�t	jd|||�q�q�n|tkr|dkr|j|�}qn||j|<d	S(
u"Control then set a metadata field.uPlatformu,uNameu;iu$'%s': '%s' is not valid (field '%s')u.'%s': '%s' is not a valid version (field '%s')uDescriptionN(RMRVt
isinstancetlistRjRRktstripRUtloggertisEnabledFortloggingtWARNINGR
R=t_PREDICATE_FIELDSR tis_valid_matchertwarningt_VERSIONS_FIELDStis_valid_constraint_listt_VERSION_FIELDStis_valid_versiont_UNICODEFIELDSR[R:(RBR4R+Rytproject_nameR=((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyRK�s@+		

		cCs|j|�}||jkr@|tkr<|j|�}n|S|tkr]|j|}|S|tkr�|j|}|dkr�gSg}xE|D]=}|tkr�|j|�q�|j|d|df�q�W|S|t	kr|j|}t
|t�r|jd�Sn|j|S(uGet a metadata field.iiu,N(
RMR:t_MISSINGRWR�RUR RiR!RVRzRRk(RBR4tdefaultR+trestval((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyRI�s.



csu|j�gg}}x*dD]"}||kr|j|�qqW|rx|gkrxddj|�}t|��nx*dD]"}||kr|j|�qqW|ddkr�||fSt|j���fd	�}x�t|ft�jft	�j
ffD]b\}}xS|D]K}	|j|	d
�}
|
d
k	r||
�r|jd
|	|
f�qqWqW||fS(ukCheck if the metadata is compliant. If strict is True then raise if
        no Name or Version are provideduNameuVersionumissing required metadata: %su, u	Home-pageuAuthoruMetadata-Versionu1.2cs5x.|D]&}�j|jd�d�stSqWtS(Nu;i(R�RkRR(R+Ry(R=(s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pytare_valid_constraintss
uWrong value for '%s': %s(uNameuVersion(u	Home-pageuAuthorN(
RAR!RrRR
R=R�R�R�R�R�RIR (RBtstricttmissingtwarningstattrRmR�R)t
controllerRnR+((R=s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pytcheck�s2




	
"c	Cs�|j�d4d5d6d7d8d9d:d;d<d=d>d?d@f
}i}x;|D]3\}}|sf||jkrD||||<qDqDW|ddkr#dAdBdCdDdEdFdGdHf}x�|D]l\}}|s�||jkr�|d&kr�||||<qg||D]}d,j|�^q�||<q�q�Wn`|dd-kr�dIdJdKf}x>|D]3\}}|sk||jkrI||||<qIqIWn|S(Lu�Return fields as a dict.

        Field names will be converted to use the underscore-lowercase style
        instead of hyphen-mixed case (i.e. home_page instead of Home-page).
        umetadata_versionuMetadata-VersionunameuNameuversionuVersionusummaryuSummaryu	home_pageu	Home-pageuauthoruAuthoruauthor_emailuAuthor-emailulicenseuLicenseudescriptionuDescriptionukeywordsuKeywordsuplatformuPlatformuclassifiersu
Classifierudownload_urluDownload-URLu1.2u
requires_distu
Requires-Disturequires_pythonuRequires-Pythonurequires_externaluRequires-Externalu
provides_distu
Provides-Distuobsoletes_distuObsoletes-Distuproject_urluProject-URLu
maintaineru
Maintainerumaintainer_emailuMaintainer-emailu,u1.1uprovidesuProvidesurequiresuRequiresu	obsoletesu	Obsoletes(umetadata_versionuMetadata-Version(unameuName(uversionuVersion(usummaryuSummary(u	home_pageu	Home-page(uauthoruAuthor(uauthor_emailuAuthor-email(ulicenseuLicense(udescriptionuDescription(ukeywordsuKeywords(uplatformuPlatform(uclassifiersu
Classifier(udownload_urluDownload-URL(u
requires_distu
Requires-Dist(urequires_pythonuRequires-Python(urequires_externaluRequires-External(u
provides_distu
Provides-Dist(uobsoletes_distuObsoletes-Dist(uproject_urluProject-URL(u
maintaineru
Maintainer(umaintainer_emailuMaintainer-email(uprovidesuProvides(urequiresuRequires(u	obsoletesu	Obsoletes(RAR:Rr(	RBtskip_missingtmapping_1_0tdataR*ROtmapping_1_2tutmapping_1_1((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyttodictsP
		4	cCsN|ddkr:x'dD]}||kr||=qqWn|dc|7<dS(NuMetadata-Versionu1.1u	ObsoletesuRequiresuProvidesu
Requires-Dist(u	ObsoletesuRequiresuProvides((RBtrequirementsRn((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pytadd_requirementsUs

cCstt|d��S(NuMetadata-Version(R{R(RB((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyR`sccs x|j�D]}|Vq
WdS(N(R(RBR*((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyt__iter__cscCs!g|j�D]}||^q
S(N(R(RBR*((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyRogscCs'g|j�D]}|||f^q
S(N(R(RBR*((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyRjscCsd|jj|j|jfS(Nu
<%s %s %s>(t	__class__R
R4R(RB((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyt__repr__msN(#R
RRR RFRARHRJRLRPRQRMRWR[R]RR_R`RaR>R?RGRpR@RKR�RIR�R�R�RR�RoRR�(((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyR7�s>																	,,;					upydist.jsonu
metadata.jsontMetadatacBs�eZdZejd�Zejdej�ZeZ	ejd�Z
dZdeZ
id>d6d?d6d@d	6Zd
ZdZiedAfd6edBfd6e	dCfd6e
dDfd	6ZdEZdFdFdFdd�ZedG�ZdFefZdFefZi
defd6defd6ed6ed6ed6defd6ed6ed6ed6ed 6d!efd"6dHd$6dId6Z[[d&�ZdFd'�Zd(�Zed)��Z ed*��Z!e!j"d+��Z!dFdFd,�Z#ed-��Z$ed.��Z%e%j"d/��Z%d0�Z&d1�Z'd2�Z(d3�Z)id4d6d5d6d6d6d7d	6d8d96d!d"6Z*d:�Z+dFdFe,e-d;�Z.d<�Z/d=�Z0RS(Ju�
    The metadata of a release. This implementation uses 2.0 (JSON)
    metadata where possible. If not possible, it wraps a LegacyMetadata
    instance which handles the key-value metadata format.
    u
^\d+(\.\d+)*$u!^[0-9A-Z]([0-9A-Z_.-]*[0-9A-Z])?$u	.{1,2047}u2.0udistlib (%s)unameuversionulegacyusummaryuqname version license summary description author author_email keywords platform home_page classifiers download_urluwextras run_requires test_requires build_requires dev_requires provides meta_requires obsoleted_by supports_environmentsumetadata_versionu_legacyu_datauschemeudefaultcCs�|||gjd�dkr-td��nd|_d|_||_|dk	r�y|j||�||_Wq�tk
r�td|d|�|_|j	�q�Xn�d}|r�t
|d��}|j�}WdQXn|r�|j�}n|dkri|jd6|j
d6|_n�t|t�s?|jd�}ny)tj|�|_|j|j|�Wn9tk
r�td	t|�d|�|_|j	�nXdS(
Niu'path, fileobj and mapping are exclusiveRER=urbumetadata_versionu	generatoruutf-8RD(R8R R9t_legacyt_dataR=t_validate_mappingRR7tvalidateRdR>tMETADATA_VERSIONt	GENERATORRzRtdecodetjsontloadst
ValueErrorR(RBRCRDRER=R�tf((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyRF�s>			



ulicenseukeywordsu
Requires-Disturun_requiresuSetup-Requires-Distubuild_requiresudev_requiresu
test_requiresu
meta_requiresuProvides-Extrauextrasumodulesu
namespacesuexportsucommandsu
ClassifieruclassifiersuDownload-URLu
source_urluMetadata-Versionc
Cs�tj|d�}tj|d�}||kr�||\}}|jr�|dkrs|dkrgdn|�}q�|jj|�}q�|dkr�dn|�}|dkr�|jj||�}q�t�}|}|jjd�}	|	r�|dkr|	jd	|�}q�|dkrH|	jd
�}	|	r�|	j||�}q�q�|	jd�}	|	sr|jjd�}	n|	r�|	j||�}q�n||kr�|}q�nQ||kr�tj||�}n0|jr�|jj|�}n|jj|�}|S(
Nucommon_keysumapped_keysucommandsuexportsumodulesu
namespacesuclassifiersu
extensionsupython.commandsupython.detailsupython.exports(ucommandsuexportsumodulesu
namespacesuclassifiers(tobjectt__getattribute__R�R RIR�(
RBR*tcommontmappedtlktmakertresultR+tsentineltd((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyR��sF				cCso||jkrk|j|\}}|p.|j|krk|j|�}|shtd||f��qhqkndS(Nu.'%s' is an invalid value for the '%s' property(tSYNTAX_VALIDATORSR=tmatchR(RBR*R+R=tpatternt
exclusionstm((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyt_validate_valuescCs�|j||�tj|d�}tj|d�}||kr||\}}|jr~|dkrnt�n||j|<q�|d
kr�||j|<q�|jjdi�}|dkr�||d	<q�|dkr�|jd
i�}|||<q�|jdi�}|||<n�||kr4tj|||�nn|dkr|t	|t
�r||j�}|rp|j�}qyg}q|n|jr�||j|<n
||j|<dS(Nucommon_keysumapped_keysucommandsuexportsumodulesu
namespacesuclassifiersu
extensionsupython.commandsupython.detailsupython.exportsukeywords(ucommandsuexportsumodulesu
namespacesuclassifiers(
R�R�R�R�R tNotImplementedErrorR�t
setdefaultt__setattr__RzRR|Rk(RBR*R+R�R�R�t_R�((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyR�s>			


	cCst|j|jt�S(N(R6R4RR(RB((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pytname_and_version@scCsd|jr|jd}n|jjdg�}d|j|jf}||kr`|j|�n|S(Nu
Provides-Distuprovidesu%s (%s)(R�R�R�R4RR!(RBR�ts((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pytprovidesDs	cCs*|jr||jd<n
||jd<dS(Nu
Provides-Distuprovides(R�R�(RBR+((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyR�Os	c
CsL|jr|}n6g}t|p$g|j�}x�|D]�}d|kr^d|kr^t}nZd|krst}n|jd�|k}|r�|jd�}|r�t||�}q�n|r7|j|d�q7q7WxodD]g}d|}	|	|kr�|j|	�|jjd|g�}|j|j	|d	|d
|��q�q�W|S(u�
        Base method to get dependencies, given a set of extras
        to satisfy and an optional environment context.
        :param reqts: A list of sometimes-wanted dependencies,
                      perhaps dependent on extras and environment.
        :param extras: A list of optional components being requested.
        :param env: An optional environment for marker evaluation.
        uextrauenvironmenturequiresubuildudevutestu:%s:u%s_requirestextrastenv(ubuildudevutest(
R�R	R�RRIRtextendR"R�tget_requirements(
RBtreqtsR�R�R�R�tincludeRR*te((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyR�Vs0			
		


cCs|jr|j�S|jS(N(R�t_from_legacyR�(RB((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyt
dictionary�s	
cCs)|jrt�nt|j|j�SdS(N(R�R�RR�tDEPENDENCY_KEYS(RB((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pytdependencies�s		cCs&|jrt�n|jj|�dS(N(R�R�R�R@(RBR+((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyR��s		c	Cs�|jd�|jkr$t��ng}xH|jj�D]7\}}||kr:||krq|j|�qqq:q:W|r�ddj|�}t|��nx-|j�D]\}}|j|||�q�WdS(Numetadata_versionuMissing metadata items: %su, (	RIR�RtMANDATORY_KEYSRR!RrRR�(	RBRER=R�R*R�RmRxRy((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyR��scCs`|jrF|jjt�\}}|s-|r\tjd||�q\n|j|j|j�dS(Nu#Metadata: missing: %s, warnings: %s(R�R�RR}R�R�R�R=(RBR�R�((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyR��s		cCs6|jr|jjt�St|j|j�}|SdS(N(R�R�RRR�t
INDEX_KEYS(RBR�((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyR��s	c
Csi|jd6|jd6}|jjt�}xFdD]>}||kr3|dkrZd	}n|}||||<q3q3W|jd
g�}|dgkr�g}n||d<ddf}xE|D]=\}}||kr�||r�i||d6g||<q�q�W|j|d<i}i}	|S(Numetadata_versionu	generatorunameuversionulicenseusummaryudescriptionu
classifieruclassifiersuKeywordsuukeywordsu
requires_disturun_requiresusetup_requires_distubuild_requiresurequiresuprovides(unameuversionulicenseusummaryudescriptionu
classifier(u
requires_disturun_requires(usetup_requires_distubuild_requires(R�R�R�R�RRIR�(
RBR�tlmdRxtnktkwRtoktauthort
maintainer((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyR��s0


		
	
uNameuVersionuLicenseuSummaryuDescriptionudescriptioncCs�d�}t�}|j}x:|jj�D])\}}||kr+||||<q+q+W||j|j�}||j|j�}|jr�t	|j�|d<nt	|�|d<t	|�|d<|S(NcSs�t�}x�|D]�}|jd�}|jd�}|d}x�|D]�}|ri|ri|j|�qEd}|r�d|}n|r�|r�d||f}q�|}n|jdj||f��qEWqW|S(Nuextrauenvironmenturequiresuu
extra == "%s"u(%s) and %su;(RKRItaddRr(tentriesR�R�textraR�trlisttrR((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pytprocess_entries�s"	



	$uProvides-Extrau
Requires-DistuSetup-Requires-Dist(
R7R�tLEGACY_MAPPINGRtrun_requirest
meta_requirestbuild_requirestdev_requiresR�tsorted(RBR�R�tnmdR�R�tr1tr2((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyt
_to_legacy�s				c
Cs||gjd�dkr*td��n|j�|r�|jrO|j}n|j�}|rw|j|d|�q|j|d|�n�|jr�|j�}n	|j	}|r�t
j||dtdddt�n@t
j|dd	��)}t
j||dtdddt�WdQXdS(
Niu)Exactly one of path and fileobj is neededRqtensure_asciitindentit	sort_keysuwuutf-8(R8R R�R�R�R�RGRpR�R�R�tdumpRRcRd(RBRCRDtlegacyRqt	legacy_mdR�R�((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyRG�s&
			
cCs�|jr|jj|�n�|jjdg�}d}x0|D](}d|kr>d|kr>|}Pq>q>W|dkr�i|d6}|jd|�n*t|d�t|�B}t|�|d<dS(Nurun_requiresuenvironmentuextraurequiresi(R�R�R�R�R tinsertRKR�(RBR�R�talwaystentrytrset((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyR�s	

cCs;|jpd}|jpd}d|jj|j||fS(Nu	(no name)u
no versionu<%s %s %s (%s)>(R4RR�R
RX(RBR4R((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyR�(s(((ulegacy((ulegacy(ulegacy(ulegacy(u_legacyu_datauschemeN(unameuversionulicenseukeywordsusummary(uDownload-URLN(uMetadata-VersionN(1R
RRtretcompiletMETADATA_VERSION_MATCHERtItNAME_MATCHERRtVERSION_MATCHERtSUMMARY_MATCHERR�RR�R�R�R�R�t	__slots__R RFRKtcommon_keysR{t	none_listtdictt	none_dicttmapped_keysR�R�R�tpropertyR�R�tsetterR�R�R�R�R�R�R�R�R�RRRGR�R�(((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyR�vs�




	,




	+
	'*					
	%	(CRt
__future__RRctemailRR�RR�tRRtcompatRRRRRtutilRR	RR
Rt	getLoggerR
R}RRRRt__all__tPKG_INFO_ENCODINGR(R�RZRYRRR$RR%RR&RKRRR@tEXTRA_RERR0RTR�R�R�RURiRVR�R�R�R1RR6R7tMETADATA_FILENAMEtWHEEL_METADATA_FILENAMER�(((s@/usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyt<module>	s�																		



		8
									
��

Hacked By AnonymousFox1.0, Coded By AnonymousFox