ok

Mini Shell

Direktori : /proc/self/root/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/
Upload File :
Current File : //proc/self/root/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyc

�
Bu�_c@s�dZddlZddlZddlmZddlmZdddd	d
ddd
gZeje	�Z
defd��YZde
fd��YZde
fd��YZejd�Zd�ZeZdefd��YZd�Zdefd��YZejd�dfejd�dfejd�dfejd�dfejd�d fejd!�d fejd"�d#fejd$�d%fejd&�d'fejd(�d)ff
Zejd*�dfejd+�dfejd,�d#fejd"�d#fejd-�dffZejd.�Zd/�Zd0�Zejd1ej�Zid2d36d2d46d5d66d2d76d8d96dd6dd#6Zd:�Z defd;��YZ!d	efd<��YZ"ejd=ej�Z#d>�Z$d?�Z%d
efd@��YZ&defdA��YZ'dBe
fdC��YZ(ie(eee�dD6e(e e"dE��dF6e(e%e'e�dG6Z)e)dDe)dH<dI�Z*dS(Js~
Implementation of a flexible versioning scheme providing support for PEP-440,
setuptools-compatible and semantic versioning.
i����Ni(tstring_types(tparse_requirementtNormalizedVersiontNormalizedMatchert
LegacyVersiont
LegacyMatchertSemanticVersiontSemanticMatchertUnsupportedVersionErrort
get_schemecBseZdZRS(sThis is an unsupported version.(t__name__t
__module__t__doc__(((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyRstVersioncBs�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
ed��ZRS(
cCsZ|j�|_}|j|�|_}t|t�s>t�t|�dksVt�dS(Ni(tstript_stringtparset_partst
isinstancettupletAssertionErrortlen(tselftstparts((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt__init__scCstd��dS(Nsplease implement in a subclass(tNotImplementedError(RR((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR%scCs5t|�t|�kr1td||f��ndS(Nscannot compare %r and %r(ttypet	TypeError(Rtother((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt_check_compatible(scCs|j|�|j|jkS(N(RR(RR((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt__eq__,s
cCs|j|�S(N(R(RR((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt__ne__0scCs|j|�|j|jkS(N(RR(RR((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt__lt__3s
cCs|j|�p|j|�S(N(R!R(RR((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt__gt__7scCs|j|�p|j|�S(N(R!R(RR((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt__le__:scCs|j|�p|j|�S(N(R"R(RR((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt__ge__=scCs
t|j�S(N(thashR(R((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt__hash__AscCsd|jj|jfS(Ns%s('%s')(t	__class__R
R(R((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt__repr__DscCs|jS(N(R(R((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt__str__GscCstd��dS(NsPlease implement in subclasses.(R(R((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt
is_prereleaseJs(R
RRRRRR R!R"R#R$R&R(R)tpropertyR*(((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR
s												tMatchercBs�eZdZid�d6d�d6d�d6d�d6d�d	6d
�d6d�d
6d�d6Zd�Zd�Zd�Zed��Z	d�Z
d�Zd�Zd�Z
d�Zd�ZRS(cCs
||kS(N((tvtctp((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt<lambda>Tst<cCs
||kS(N((R-R.R/((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR0Ust>cCs||kp||kS(N((R-R.R/((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR0Vss<=cCs||kp||kS(N((R-R.R/((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR0Wss>=cCs
||kS(N((R-R.R/((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR0Xss==cCs
||kS(N((R-R.R/((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR0Yss===cCs||kp||kS(N((R-R.R/((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR0[ss~=cCs
||kS(N((R-R.R/((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR0\ss!=cCs
t|�S(N(R(RR((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyRascCs1|jdkrtd��n|j�|_}|j|�}|sYtd|��n|j|_|jj�|_g}|j	rx�|j	D]�\}}|j
d�r�|dkr�td|��n|d t}}|j|�n|j|�t}}|j
|||f�q�Wnt|�|_dS(	NsPlease specify a version classs
Not valid: %rs.*s==s!=s#'.*' not allowed for %r constraintsi����(s==s!=(t
version_classtNonet
ValueErrorRRRtnametlowertkeytconstraintstendswithtTruetFalsetappendRR(RRtrtclisttoptvntprefix((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyRds(	
cCs�t|t�r!|j|�}nx�|jD]�\}}}|jj|�}t|t�rmt||�}n|s�d||jjf}t	|��n||||�s+t
Sq+WtS(s�
        Check if the provided version matches the constraints.

        :param version: The version to match against this instance.
        :type version: String or :class:`Version` instance.
        s%r not implemented for %s(RRR3Rt
_operatorstgettgetattrR'R
RR<R;(Rtversiontoperatort
constraintRBtftmsg((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pytmatch�scCsJd}t|j�dkrF|jdddkrF|jdd}n|S(Niis==s===(s==s===(R4RR(Rtresult((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt
exact_version�s,cCsGt|�t|�ks*|j|jkrCtd||f��ndS(Nscannot compare %s and %s(RR6R(RR((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR�s*cCs/|j|�|j|jko.|j|jkS(N(RR8R(RR((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR�s
cCs|j|�S(N(R(RR((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR �scCst|j�t|j�S(N(R%R8R(R((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR&�scCsd|jj|jfS(Ns%s(%r)(R'R
R(R((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR(�scCs|jS(N(R(R((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR)�sN(R
RR4R3RCRRRKR+RMRRR R&R(R)(((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR,Os(







								sk^v?(\d+!)?(\d+(\.\d+)*)((a|b|c|rc)(\d+))?(\.(post)(\d+))?(\.(dev)(\d+))?(\+([a-zA-Z\d]+(\.[a-zA-Z\d]+)?))?$cCsK|j�}tj|�}|s4td|��n|j�}td�|djd�D��}x0t|�dkr�|ddkr�|d }qfW|ds�d}nt|d�}|dd!}|d	d
!}|dd!}|d
}|dkr�d}n|dt|d�f}|dkr.d}n|dt|d�f}|dkr]d}n|dt|d�f}|dkr�d}nfg}	xQ|jd�D]@}
|
j
�r�dt|
�f}
nd|
f}
|	j|
�q�Wt|	�}|s|r|rd}qd}n|s&d}n|s5d}n||||||fS(NsNot a valid version: %scss|]}t|�VqdS(N(tint(t.0R-((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pys	<genexpr>�sit.i����iiiii	i
ii
tatzt_tfinal(NN((NN((NN(((RQi����(RR(RS(sfinal(RtPEP440_VERSION_RERKRtgroupsRtsplitRRNR4tisdigitR=(RtmRVtnumstepochtpretposttdevtlocalRtpart((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt_pep_440_key�sT#%
	



				
				cBsAeZdZd�Zedddddg�Zed��ZRS(sIA rational version.

    Good:
        1.2         # equivalent to "1.2.0"
        1.2.0
        1.2a1
        1.2.3a2
        1.2.3b1
        1.2.3c1
        1.2.3.4
        TODO: fill this out

    Bad:
        1           # minimum two numbers
        1.2a        # release level must have a release serial
        1.2.3b
    cCsQt|�}tj|�}|j�}td�|djd�D��|_|S(Ncss|]}t|�VqdS(N(RN(ROR-((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pys	<genexpr>siRP(t_normalized_keyRURKRVRRWt_release_clause(RRRLRYRV((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR
s
&RQtbR.trcR^cst�fd��jD��S(Nc3s(|]}|r|d�jkVqdS(iN(tPREREL_TAGS(ROtt(R(sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pys	<genexpr>s(tanyR(R((RsL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR*s(R
RRRtsetRfR+R*(((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR�s	cCsUt|�}t|�}||kr(tS|j|�s;tSt|�}||dkS(NRP(tstrR;t
startswithR<R(txtytn((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt
_match_prefixscBs�eZeZidd6dd6dd6dd6dd	6d
d6dd
6dd6Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd�Z
RS(t_match_compatibles~=t	_match_ltR1t	_match_gtR2t	_match_les<=t	_match_ges>=t	_match_eqs==t_match_arbitrarys===t	_match_nes!=cCsx|r"d|ko|jd}n|jdo:|jd}|rn|jjdd�d}|j|�}n||fS(Nt+i����ii(RRRWR3(RRFRHRBtstrip_localR((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt
_adjust_local6scCsj|j|||�\}}||kr+tS|j}djg|D]}t|�^qA�}t||�S(NRP(RzR<RctjoinRjRo(RRFRHRBtrelease_clausetitpfx((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyRqDs	(cCsj|j|||�\}}||kr+tS|j}djg|D]}t|�^qA�}t||�S(NRP(RzR<RcR{RjRo(RRFRHRBR|R}R~((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyRrLs	(cCs%|j|||�\}}||kS(N(Rz(RRFRHRB((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyRsTscCs%|j|||�\}}||kS(N(Rz(RRFRHRB((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyRtXscCsC|j|||�\}}|s0||k}nt||�}|S(N(RzRo(RRFRHRBRL((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyRu\s
cCst|�t|�kS(N(Rj(RRFRHRB((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyRvdscCsD|j|||�\}}|s0||k}nt||�}|S(N(RzRo(RRFRHRBRL((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyRwgs
cCs�|j|||�\}}||kr+tS||kr;tS|j}t|�dkrc|d }ndjg|D]}t|�^qp�}t||�S(Nii����RP(RzR;R<RcRR{RjRo(RRFRHRBR|R}R~((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyRpos	
((R
RRR3RCRzRqRrRsRtRuRvRwRp(((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR's&
								s[.+-]$ts^[.](\d)s0.\1s^[.-]s
^\((.*)\)$s\1s^v(ersion)?\s*(\d+)s\2s^r(ev)?\s*(\d+)s[.]{2,}RPs\b(alfa|apha)\btalphas\b(pre-alpha|prealpha)\bs	pre.alphas	\(beta\)$tbetas
^[:~._+-]+s
[,*")([\]]s[~:+_ -]s\.$s
(\d+(\.\d+)*)c	Cs�|j�j�}x&tD]\}}|j||�}qW|sJd}ntj|�}|snd}|}n�|j�djd�}g|D]}t|�^q�}x#t	|�dkr�|j
d�q�Wt	|�dkr�||j�}nDdjg|dD]}t
|�^q�||j�}|d }djg|D]}t
|�^qB�}|j�}|r�x)tD]\}}|j||�}qvWn|s�|}n&d|kr�dnd}|||}t|�s�d}n|S(	s�
    Try to suggest a semantic form for a version for which
    _suggest_normalized_version couldn't come up with anything.
    s0.0.0iRPiR^t-RxN(RR7t
_REPLACEMENTStsubt_NUMERIC_PREFIXRKRVRWRNRR=tendR{Rjt_SUFFIX_REPLACEMENTSt	is_semverR4(	RRLtpattreplRYRBtsuffixR}tsep((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt_suggest_semantic_version�s:		:
(		cCs yt|�|SWntk
r%nX|j�}xSd2d3d4d5d6d7d8d9d:d;d<d=d>d?d@fD]\}}|j||�}qfWtjdd|�}tjdd|�}tjdd|�}tjdd|�}tjdd|�}|jd�r
|d }ntjd!d|�}tjd"d#|�}tjd$d%|�}tjd&d|�}tjd'd(|�}tjd)d(|�}tjd*d
|�}tjd+d,|�}tjd-d%|�}tjd.d/|�}tjd0d1|�}yt|�Wntk
rdA}nX|S(Bs�Suggest a normalized version close to the given version string.

    If you have a version string that isn't rational (i.e. NormalizedVersion
    doesn't like it) then you might be able to get an equivalent (or close)
    rational version from this function.

    This does a number of simple normalizations to the given string, based
    on observation of versions currently in use on PyPI. Given a dump of
    those version during PyCon 2009, 4287 of them:
    - 2312 (53.93%) match NormalizedVersion without change
      with the automatic suggestion
    - 3474 (81.04%) match when using this suggestion method

    @param s {str} An irrational version string.
    @returns A rational version string, or None, if couldn't determine one.
    s-alphaRQs-betaRdR�R�ReR.s-finalRs-pres-releases.releases-stableRxRPRSt s.finalRTspre$tpre0sdev$tdev0s([abc]|rc)[\-\.](\d+)$s\1\2s[\-\.](dev)[\-\.]?r?(\d+)$s.\1\2s[.~]?([abc])\.?s\1R-is\b0+(\d+)(?!\d)s(\d+[abc])$s\g<1>0s\.?(dev-r|dev\.r)\.?(\d+)$s.dev\2s-(a|b|c)(\d+)$s[\.\-](dev|devel)$s.dev0s(?![\.\-])dev$s(final|stable)$s\.?(r|-|-r)\.?(\d+)$s.post\2s\.?(dev|git|bzr)\.?(\d+)$s\.?(pre|preview|-c)(\d+)$sc\g<2>sp(\d+)$s.post\1(s-alphaRQ(s-betaRd(R�RQ(R�Rd(srcR.(s-finalR(s-preR.(s-releaseR(s.releaseR(s-stableR(RxRP(RSRP(R�R(s.finalR(sfinalRN(RbRR7treplacetreR�RkR4(RtrstorigR�((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt_suggest_normalized_version�sH

		
	

s([a-z]+|\d+|[\.-])R.R\tpreviewsfinal-R�Ret@R^cCs�d�}g}x�||�D]�}|jd�r�|dkrgx'|rc|ddkrc|j�q@Wnx'|r�|ddkr�|j�qjWn|j|�qWt|�S(NcSs�g}x�tj|j��D]j}tj||�}|rd|d koUdknrl|jd�}n
d|}|j|�qqW|jd�|S(Nt0it9it*s*final(t
_VERSION_PARTRWR7t_VERSION_REPLACERDtzfillR=(RRLR/((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt	get_partsCs 

R�s*finali����s*final-t00000000(RktpopR=R(RR�RLR/((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt_legacy_keyBs	
cBs eZd�Zed��ZRS(cCs
t|�S(N(R�(RR((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR]scCsRt}xE|jD]:}t|t�r|jd�r|dkrt}PqqW|S(NR�s*final(R<RRRRkR;(RRLRl((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR*`s(R
RRR+R*(((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR\s	cBs?eZeZeej�Zded<ejd�Z	d�Z
RS(Rps~=s^(\d+(\.\d+)*)cCs�||krtS|jjt|��}|sEtjd||�tS|j�d}d|krz|jdd�d}nt	||�S(NsACannot compute compatible match for version %s  and constraint %siRPi(
R<t
numeric_reRKRjtloggertwarningR;RVtrsplitRo(RRFRHRBRYR((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyRpss	
(R
RRR3tdictR,RCR�tcompileR�Rp(((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyRks

sN^(\d+)\.(\d+)\.(\d+)(-[a-z0-9]+(\.[a-z0-9-]+)*)?(\+[a-z0-9]+(\.[a-z0-9-]+)*)?$cCs
tj|�S(N(t
_SEMVER_RERK(R((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR��sc
Cs�d�}t|�}|s*t|��n|j�}g|d D]}t|�^qA\}}}||dd�||dd�}}	|||f||	fS(NcSsi|dkr|f}nM|djd�}tg|D]'}|j�rV|jd�n|^q5�}|S(NiRPi(R4RWRRXR�(RtabsentRLRR/((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt
make_tuple�s
:it|iR�(R�RRVRN(
RR�RYRVR}tmajortminortpatchR\tbuild((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt
_semantic_key�s	
,'cBs eZd�Zed��ZRS(cCs
t|�S(N(R�(RR((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR�scCs|jdddkS(NiiR�(R(R((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR*�s(R
RRR+R*(((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR�s	cBseZeZRS((R
RRR3(((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR�st
VersionSchemecBs8eZdd�Zd�Zd�Zd�Zd�ZRS(cCs||_||_||_dS(N(R8tmatchert	suggester(RR8R�R�((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR�s		cCs8y|jj|�t}Wntk
r3t}nX|S(N(R�R3R;RR<(RRRL((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pytis_valid_version�s


cCs5y|j|�t}Wntk
r0t}nX|S(N(R�R;RR<(RRRL((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pytis_valid_matcher�s



cCs|jd|�S(s:
        Used for processing some metadata fields
        sdummy_name (%s)(R�(RR((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pytis_valid_constraint_list�scCs+|jdkrd}n|j|�}|S(N(R�R4(RRRL((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pytsuggest�s	N(R
RR4RR�R�R�R�(((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR��s
			t
normalizedcCs|S(N((RR((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR0�stlegacytsemantictdefaultcCs'|tkrtd|��nt|S(Nsunknown scheme name: %r(t_SCHEMESR5(R6((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyR	�s(+RtloggingR�tcompatRtutilRt__all__t	getLoggerR
R�R5RtobjectR
R,R�RURaRbRRoRR�R�R�R�R�tIR�R4R�R�RRR�R�R�RRR�R�R	(((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/version.pyt<module>	s�1d	=$	W	.	r
					#	
	


Zerion Mini Shell 1.0