관리-도구
편집 파일: markers.cpython-39.pyc
a ��Re} � @ s� d Z ddlZddlZddlZddlZddlmZ ddlmZm Z ddl mZ dgZ e�d�Zd d � Zdd� ZG d d� de�Zdd� Ze� Z[e� Zddd�ZdS )zG Parser for the environment markers micro-language defined in PEP 508. � N� )�string_types)�in_venv�parse_marker)�NormalizedVersion� interpretz<((\d+(\.\d+)*\w*)|\'(\d+(\.\d+)*\w*)\'|\"(\d+(\.\d+)*\w*)\")c C s t | t�r| sdS | d dv S )NFr �'")� isinstancer )�o� r ��/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_vendor/distlib/markers.py�_is_literal s r c C s2 g }t �| �D ]}|�t|�� d �� qt|�S )Nr )�_VERSION_PATTERN�finditer�append�NV�groups�set)�s�result�mr r r � _get_versions! s r c @ sf e Zd ZdZdd� dd� dd� dd� dd� dd� d d� d d� dd� dd� d d� dd� d�Zdd� ZdS )� Evaluatorz; This class is used to evaluate marker expessions. c C s | |kS �Nr ��x�yr r r �<lambda>- � zEvaluator.<lambda>c C s | |kS r r r r r r r . r c C s | |kp| |kS r r r r r r r / r c C s | |kS r r r r r r r 0 r c C s | |k S r r r r r r r 1 r c C s | |kp| |k S r r r r r r r 2 r c C s | |kS r r r r r r r 3 r c C s | |kp| |kS r r r r r r r 4 r c C s | o|S r r r r r r r 5 r c C s | p|S r r r r r r r 6 r c C s | |v S r r r r r r r 7 r c C s | |vS r r r r r r r 8 r )�==�===�~=�!=�<�<=�>�>=�and�or�in�not inc C s" t |t�rB|d dv r$|dd� }n||vr8td| ��|| }n�t |t�sPJ �|d }|| jvrntd| ��|d }|d }t|d �r�t|d �r�td |||f ��| �||�}| �||�}|dks�|dkr�|dv r�t|�}t|�}n$|dk�r|d v �rt|�}t |�}| j| ||�}|S )z� Evaluate a marker expression returned by the :func:`parse_requirement` function in the specified context. r r r ���zunknown variable: %s�opzop not implemented: %s�lhs�rhszinvalid comparison: %s %s %s�python_version)r# r$ r% r&