Hacked By AnonymousFox
B
YI~d
� @ s~ d dl Z d dlZd dlZe �de j�Ze �d�Ze �d�Zdd� Z ej
ejejej
ejejd�ZG dd � d �Zdad
d� ZdS )� Nz'(?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*)z^\s*\((.*)\)\s*$z%^\s*(<=|>=|<|>|!=|==)\s*([^\s,]+)\s*$c C s6 t �| �}|std| ��|�� \}}|tj�|�fS )Nz"bad package restriction syntax: %r)�re_splitComparison�match�
ValueError�groups� distutils�version�
StrictVersion)�predZres�compZverStr� r �?/opt/alt/python37/lib64/python3.7/distutils/versionpredicate.py�splitUp s
r
)�<z<=z==�>z>=z!=c @ s$ e Zd Zdd� Zdd� Zdd� ZdS )�VersionPredicatec C s� |� � }|std��t�|�}|s.td| ��|�� \| _}|� � }|r�t�|�}|sbtd| ��|�� d }dd� |�d�D �| _| js�td| ��ng | _d S ) Nzempty package restrictionzbad package name in %rzexpected parenthesized list: %rr c S s g | ]}t |��qS r )r
)�.0ZaPredr r r �
<listcomp>t s z-VersionPredicate.__init__.<locals>.<listcomp>�,zempty parenthesized list in %r) �stripr �re_validPackager r �name�re_paren�splitr )�selfZversionPredicateStrr Zparen�strr r r �__init__` s$
zVersionPredicate.__init__c C s8 | j r.dd� | j D �}| jd d�|� d S | jS d S )Nc S s g | ]\}}|d t |� �qS )� )r )r �cond�verr r r r } s z,VersionPredicate.__str__.<locals>.<listcomp>z (z, �))r r �join)r �seqr r r �__str__{ s zVersionPredicate.__str__c C s* x$| j D ]\}}t| ||�sdS qW dS )NFT)r �compmap)r r r r r r r �satisfied_by� s zVersionPredicate.satisfied_byN)�__name__�
__module__�__qualname__r r"