AlkantarClanX12
Current Path : /lib64/python3.6/distutils/__pycache__/ |
Current File : //lib64/python3.6/distutils/__pycache__/versionpredicate.cpython-36.opt-2.pyc |
3 \ � @ s~ d dl Z d dlZd dlZe jde j�Ze jd�Ze jd�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 j| �}|std| ��|j� \}}|tjj|�fS )Nz"bad package restriction syntax: %r)�re_splitComparison�match� ValueError�groups� distutils�version� StrictVersion)�pred�res�compZverStr� r �2/usr/lib64/python3.6/distutils/versionpredicate.py�splitUp s r )�<z<=z==�>z>=z!=c @ s$ e Zd Zdd� Zdd� Zdd� ZdS )�VersionPredicatec C s� |j � }|std��tj|�}|s.td| ��|j� \| _}|j � }|r�tj|�}|sbtd| ��|j� d }dd� |jd�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 dj|� 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# r% r r r r r s Ar c C sd t d krtjdtj�a | j� } t j| �}|s8td| ��|jd�pDd }|rVtj j |�}|jd�|fS )Nz=([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(?:\s*\(\s*([^)\s]+)\s*\))?$z"illegal provides specification: %r� � )� _provision_rx�re�compile�ASCIIr r r �groupr r r )�value�mr r r r �split_provision� s r2 )r, Zdistutils.versionr �operatorr- r. r r r r �lt�le�eq�gt�ge�ner$ r r+ r2 r r r r �<module> s n