관리-도구
편집 파일: markers.cpython-310.pyc
o ƚ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| s dS | d dv S )NFr �'")� isinstancer )�o� r ��/builddir/build/BUILDROOT/alt-python310-pip-21.3.1-3.el8.x86_64/opt/alt/python310/lib/python3.10/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 � | |kS �Nr ��x�yr r r �<lambda>- � zEvaluator.<lambda>c C r r r r r r r r . r c C � | |kp| |kS 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 r 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�r#|d dv r|dd� }|S ||vrtd| ��|| }|S t |t�s*J �|d }|| jvr9td| ��|d }|d }t|d �rVt|d �rVtd |||f ��| �||�}| �||�}|dksj|dkrw|dv rwt|�}t|�}n|dkr�|d v r�t|�}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&