AlkantarClanX12
Current Path : /lib64/python3.8/distutils/__pycache__/ |
Current File : //lib64/python3.8/distutils/__pycache__/versionpredicate.cpython-38.opt-2.pyc |
U e5d � @ 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)�pred�res�compZverStr� r �2/usr/lib64/python3.8/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&