Viewing File: /usr/lib/python3.6/site-packages/pip/req/__pycache__/req_file.cpython-36.pyc
3
aj. @ sx d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl m
Z ddlm
Z
ddlZddlmZ ddlmZ ddlmZ dd lmZ dd
lmZ dgZejdejZejd
Zejejejej ej!ej"ej#ej$ej%ej&ej'ej(ej)ej*ej+ej,ej-ej.ej/ej0ej1gZ2ej3ej4ej5gZ6dd e6D Z7d ddZ8dd Z9d!ddZ: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)
cmdoptionsparse_requirementsz^(http|https|file):z(^|\s)+#.*$c C s g | ]}| j qS )dest).0or r /usr/lib/python3.6/req_file.py
<listcomp>= s r Fc c sp |dkrt dt| ||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_fromsession)
constraint) TypeErrorr
preprocessprocess_line)filenamefinderr optionsr r wheel_cache_content
lines_enumline_numberlineZreq_iterreqr r r r
@ s
c C s. t | j dd}t|}t|}t||}|S )zSplit, 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_linesignore_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 }|rtj
||
i }x.tD ]&}||
jkr|
j| r|
j| ||<