Your IP : 18.224.43.98


Current Path : /opt/alt/python35/lib64/python3.5/distutils/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/distutils/__pycache__/version.cpython-35.opt-2.pyc



���]90�@sOddlZGdd�d�ZGdd�de�ZGdd�de�ZdS)�Nc@sgeZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dS)�VersionNcCs|r|j|�dS)N)�parse)�self�vstring�r�,/opt/alt/python35/lib64/python3.5/version.py�__init__&szVersion.__init__cCsd|jjt|�fS)Nz	%s ('%s'))�	__class__�__name__�str)rrrr�__repr__*szVersion.__repr__cCs)|j|�}|tkr|S|dkS)Nr)�_cmp�NotImplemented)r�other�crrr�__eq__-szVersion.__eq__cCs)|j|�}|tkr|S|dkS)Nr)r
r)rrrrrr�__lt__3szVersion.__lt__cCs)|j|�}|tkr|S|dkS)Nr)r
r)rrrrrr�__le__9szVersion.__le__cCs)|j|�}|tkr|S|dkS)Nr)r
r)rrrrrr�__gt__?szVersion.__gt__cCs)|j|�}|tkr|S|dkS)Nr)r
r)rrrrrr�__ge__EszVersion.__ge__)
r
�
__module__�__qualname__rrrrrrrrrrrrsrc@sPeZdZejdejejB�Zdd�Zdd�Z	dd�Z
dS)	�
StrictVersionz)^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$cCs�|jj|�}|s(td|��|jddddd�\}}}}}|r|ttt|||g��|_n"ttt||g��d|_|r�|dt|�f|_n	d|_dS)	Nzinvalid version number '%s'�����r)r)	�
version_re�match�
ValueError�group�tuple�map�int�version�
prerelease)rrr�major�minorZpatchr&Zprerelease_numrrrr�s*$"zStrictVersion.parsecCs�|jddkr;djtt|jdd���}ndjtt|j��}|jr�||jdt|jd�}|S)Nrr�.r)r%�joinr#rr&)rrrrr�__str__�s(	"zStrictVersion.__str__cCs�t|t�rt|�}|j|jkrG|j|jkrCdSdS|jr_|jr_dS|jrv|jrvdS|jr�|jr�dS|jr�|jr�|j|jkr�dS|j|jkr�dSdSndS)Nrr���r,r,)�
isinstancerrr%r&)rrrrrr
�s&zStrictVersion._cmpN)r
rr�re�compile�VERBOSE�ASCIIrrr+r
rrrrr]s
%	
rc@sdeZdZejdej�Zddd�Zdd�Zdd�Z	d	d
�Z
dd�ZdS)
�LooseVersionz(\d+ | [a-z]+ | \.)NcCs|r|j|�dS)N)r)rrrrrr.szLooseVersion.__init__cCs{||_dd�|jj|�D�}xCt|�D]5\}}yt|�||<Wq5tk
riYq5Xq5W||_dS)NcSs(g|]}|r|dkr|�qS)r)r)�.0�xrrr�
<listcomp>8s	z&LooseVersion.parse.<locals>.<listcomp>)r�component_re�split�	enumerater$r r%)rrZ
components�i�objrrrr3s	
	zLooseVersion.parsecCs|jS)N)r)rrrrr+CszLooseVersion.__str__cCsdt|�S)NzLooseVersion ('%s'))r)rrrrrGszLooseVersion.__repr__cCsat|t�rt|�}|j|jkr1dS|j|jkrGdS|j|jkr]dSdS)Nrrr,)r-rr2r%)rrrrrr
KszLooseVersion._cmp)r
rrr.r/r0r6rrr+rr
rrrrr2s!r2)r.rrr2rrrr�<module>s>�

?>