Your IP : 18.119.113.73
3
�Pf�. � @ sx d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl m
Z ddlm
Z
ddlZddlmZ ddlmZ ddlmZ dd lmZ dd
lmZ dgZejdej�Zejd
�Zejejejej ej!ej"ej#ej$ej%ej&ej'ej(ej)ej*ej+ej,ej-ej.ej/ej0ej1gZ2ej3ej4ej5gZ6dd� e6D �Z7d dd�Z8dd� Z9d!dd�Z:dd� Z;dd� Z<dd� Z=dd� Z>dd� Z?dS )"z
Requirements file parsing
� )�absolute_importN)�parse)�filterfalse)�get_file_content)�InstallRequirement)�RequirementsFileParseError)�RemovedInPip10Warning)�
cmdoptions�parse_requirementsz^(http|https|file):z(^|\s)+#.*$c C s g | ]}|� j �qS � )�dest)�.0�or r �/usr/lib/python3.6/req_file.py�
<listcomp>= s r Fc c sp |dkrt d��t| ||d�\}}t||�} x>| D ]6\}
}t|| |
||||||d� }x|D ]
}
|
V qZW q2W dS )a� Parse a requirements file and yield InstallRequirement instances.
:param filename: Path or url of requirements file.
:param finder: Instance of pip.index.PackageFinder.
:param comes_from: Origin description of requirements.
:param options: cli options.
:param session: Instance of pip.download.PipSession.
:param constraint: If true, parsing a constraint file rather than
requirements file.
:param wheel_cache: Instance of pip.wheel.WheelCache
NzCparse_requirements() missing 1 required keyword argument: 'session')�
comes_from�session)�
constraint)� TypeErrorr �
preprocess�process_line)�filename�finderr �optionsr r �wheel_cache�_�content�
lines_enum�line_number�lineZreq_iter�reqr r r r
@ s
c C s. t | j� dd�}t|�}t|�}t||�}|S )z�Split, filter, and join lines, and return a line iterator
:param content: the content of the requirements file
:param options: cli options
� )�start)� enumerate�
splitlines�
join_lines�ignore_comments�
skip_regex)r r r r r r r a s
r c c s
t � } | j� }
d|
_|r |j|
_t| �\}}tjdk r@|jd�}| jt j
|�|
�\}
}d|r`dnd||f }|r�|rz|jnd }|r�tj
||
� i }x.tD ]&}||
jkr�|
j| r�|
j| ||<