관리-도구
편집 파일: requirements.cpython-38.pyc
U -?�fu � @ sz d dl mZmZmZmZ ddlmZ ddlm Z ddl mZmZ ddl mZ ddlmZ G dd � d e�ZG d d� d�ZdS ) � )�Any�Iterator�Optional�Set� )�parse_requirement)�ParserSyntaxError)�Marker�_normalize_extra_values)�SpecifierSet)�canonicalize_namec @ s e Zd ZdZdS )�InvalidRequirementzJ An invalid requirement was found, users should refer to PEP 508. N)�__name__� __module__�__qualname__�__doc__� r r �S/opt/hc_python/lib/python3.8/site-packages/wheel/vendored/packaging/requirements.pyr s r c @ sn e Zd ZdZedd�dd�Zeee d�dd�Zed �d d�Zed �dd �Z e d �dd�Zee d�dd�ZdS )�Requirementz�Parse a requirement. Parse a given requirement string into its parts, such as name, specifier, URL, and extras. Raises InvalidRequirement on a badly-formed requirement string. N)�requirement_string�returnc C s� zt |�}W n0 tk r< } ztt|��|�W 5 d }~X Y nX |j| _|jpNd | _t|jp\g �| _t|j �| _ d | _ |j d k r�t�t�| _ t |j �| j _d S �N)�_parse_requirementr r �str�name�url�set�extrasr � specifier�markerr �__new__r �_markers)�selfr �parsed�er r r �__init__! s zRequirement.__init__)r r c c st |V | j r*d�t| j ��}d|� d�V | jr<t| j�V | jr\d| j� �V | jr\dV | jrpd| j� �V d S )N�,�[�]z@ � z; )r �join�sortedr r r r )r"