AlkantarClanX12

Your IP : 3.145.7.187


Current Path : /usr/lib/python2.7/site-packages/pip/req/
Upload File :
Current File : //usr/lib/python2.7/site-packages/pip/req/req_file.pyo

�
��abc@@s2dZddlmZddlZddlZddlZddlZddlZddlZddl	m
Zddlm
Z
ddlZddlmZddlmZddlmZdd	lmZdd
lmZdgZejdej�Zejd
�Zejejejej ej!ej"ej#ej$ej%ej&ej'ej(ej)ej*ej+ej,ej-ej.ej/ej0ej1gZ2ej3ej4ej5gZ6ge6D]Z7e7�j8^q�Z9dddde;dd�Z<d�Z=ddddde;d�Z>d�Z?d�Z@d�ZAd�ZBd�ZCdS(s
Requirements file parsing
i(tabsolute_importN(tparse(tfilterfalse(tget_file_content(tInstallRequirement(tRequirementsFileParseError(tRemovedInPip10Warning(t
cmdoptionstparse_requirementss^(http|https|file):s(^|\s)+#.*$cc@s�|dkrtd��nt|d|d|�\}}t||�}	xQ|	D]I\}
}t|||
|||||d|�}x|D]}
|
Vq�WqOWdS(s�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
    sCparse_requirements() missing 1 required keyword argument: 'session't
comes_fromtsessiont
constraintN(tNonet	TypeErrorRt
preprocesstprocess_line(tfilenametfinderR	toptionsR
Rtwheel_cachet_tcontentt
lines_enumtline_numbertlinetreq_itertreq((s4/usr/lib/python2.7/site-packages/pip/req/req_file.pyR@s
	
cC@sCt|j�dd�}t|�}t|�}t||�}|S(s�Split, filter, and join lines, and return a line iterator

    :param content: the content of the requirements file
    :param options: cli options
    tstarti(t	enumeratet
splitlinest
join_linestignore_commentst
skip_regex(RRR((s4/usr/lib/python2.7/site-packages/pip/req/req_file.pyRas
c	c@sTt�}	|	j�}
d|
_|r3|j|
_nt|�\}}tjdkrf|jd�}n|	j	t
j|�|
�\}
}d|r�dnd||f}|rM|r�|jnt
}|r�tj||
�ni}x>tD]6}||
jkr�|
j|r�|
j|||<q�q�Wtj||d|d	|d
|d|�Vn|
jr�|re|jnt
}|rz|jnd}tj|
jdd
|d|d|d	|d|�Vn�|
js�|
jr�|
jr�|
jd}t
}n|
jd}t}tj|�rtj||�}n3tj|�sQtjj tjj!|�|�}nt"|||||d|d|�}	x�|	D]}|Vq|Wn�|
j#r�|
j#|_#n�|rP|
j$r�t%j&dt'�n|
j(r�t%j&dt'�n|
j)rt%j&dt'�n|
jr|
jg|_*n|
j+t
krIt
|_+t,j-j.|j�n|
j/tkrdg|_*n|
j0r�|j*j1|
j0�n|
j2r�|
j2d}tjj!tjj3|��}tjj ||�}tjj4|�r�|}n|j2j5|�n|
j6rt|_7n|
j8r$t|_8n|
j9rP|j:j1d�|
j9D��qPndS(s#Process a single requirements line; This can result in creating/yielding
    requirements, or updating the finder.

    For lines that contain requirements, the only options that have an effect
    are from SUPPORTED_OPTIONS_REQ, and they are scoped to the
    requirement. Other options from SUPPORTED_OPTIONS may be present, but are
    ignored.

    For lines that do not contain requirements, the only options that have an
    effect are from SUPPORTED_OPTIONS. Options from SUPPORTED_OPTIONS_REQ may
    be present, but are ignored. These lines may contain multiple options
    (although our docs imply only one is supported), and all our parsed and
    affect the finder.

    :param constraint: If True, parsing a constraints file.
    :param options: OptionParser options that we may update
    iiitutf8s%s %s (line %s)s-cs-rRtisolatedRRiR	tdefault_vcss�--allow-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.s�--allow-all-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.s�--allow-unverified has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.cs@s|]}d|dfVqdS(t*N((t.0thost((s4/usr/lib/python2.7/site-packages/pip/req/req_file.pys	<genexpr>�sN(iii(;tbuild_parsertget_default_valuesRt	index_urltformat_controltbreak_args_optionstsystversion_infotencodet
parse_argstshlextsplitt
isolated_modetFalseRtcheck_install_build_globaltSUPPORTED_OPTIONS_REQ_DESTt__dict__Rt	from_linet	editablesR#t
from_editabletrequirementstconstraintstTruet	SCHEME_REtsearchturllib_parseturljointostpathtjointdirnameRtrequire_hashestallow_externaltwarningstwarnRtallow_all_externaltallow_unverifiedt
index_urlst	use_wheeltpiptindextfmt_ctl_no_use_wheeltno_indextextra_index_urlstextendt
find_linkstabspathtexiststappendtpretallow_all_prereleasestprocess_dependency_linkst
trusted_hoststsecure_origins(RRRRR	RR
RRtparsertdefaultstargs_strtoptions_strtoptsRtline_comes_fromR"treq_optionstdestR#treq_pathtnested_constraintRtvaluetreq_dirtrelative_to_reqs_file((s4/usr/lib/python2.7/site-packages/pip/req/req_file.pyRns�		!
		
	
$
		
	
	
				
					cC@s�|jd�}g}|}xJ|D]B}|jd�sG|jd�rKPq#|j|�|jd�q#Wdj|�dj|�fS(s�Break up the line into an args and options string.  We only want to shlex
    (and then optparse) the options, not the args.  args can contain markers
    which are corrupted by shlex.
    t t-s--i(R1t
startswithRVtpopRC(RttokenstargsRttoken((s4/usr/lib/python2.7/site-packages/pip/req/req_file.pyR+�s

cC@sYtjdt�}tt}x$|D]}|�}|j|�q#Wd�}||_|S(s7
    Return a parser for parsing requirement lines
    tadd_help_optioncS@st|��dS(N(R(tselftmsg((s4/usr/lib/python2.7/site-packages/pip/req/req_file.pytparser_exits(toptparsetOptionParserR3tSUPPORTED_OPTIONStSUPPORTED_OPTIONS_REQt
add_optiontexit(R\toption_factoriestoption_factorytoptionRs((s4/usr/lib/python2.7/site-packages/pip/req/req_file.pyR's

			cc@s�d}g}x�|D]�\}}|jd�s>tj|�r�tj|�rZd|}n|r�|j|�|dj|�fVg}q�||fVq|s�|}n|j|jd��qW|r�|dj|�fVndS(s�Joins a line ending in '' with the previous line (except when following
    comments).  The joined line takes on the index of the first line.
    s\RitN(Rtendswitht
COMMENT_REtmatchRVRCtstrip(Rtprimary_line_numbertnew_lineRR((s4/usr/lib/python2.7/site-packages/pip/req/req_file.pyR"s 

		cc@sMxF|D]>\}}tjd|�}|j�}|r||fVqqWdS(s1
    Strips comments and filter empty lines.
    R}N(RtsubR�(RRR((s4/usr/lib/python2.7/site-packages/pip/req/req_file.pyR?s
c@sI|r|jnd}|rEtj|��t�fd�|�}n|S(ss
    Skip lines that match '--skip-requirements-regex' pattern

    Note: the regex pattern is only built once
    c@s�j|d�S(Ni(R>(te(tpattern(s4/usr/lib/python2.7/site-packages/pip/req/req_file.pyt<lambda>TR}N(tskip_requirements_regexRtretcompileR(RRR ((R�s4/usr/lib/python2.7/site-packages/pip/req/req_file.pyR Js(Dt__doc__t
__future__RRAR�R0R,RtRGtpip._vendor.six.moves.urllibRR?tpip._vendor.six.movesRRMtpip.downloadRtpip.req.req_installRtpip.exceptionsRtpip.utils.deprecationRRt__all__R�tIR=RR;teditableR:RPR)RStextra_index_urlRFRItno_allow_externaltallow_unsafetno_allow_unsafeRLtno_use_wheeltalways_unzipt	no_binarytonly_binaryRWRYttrusted_hostRERvtinstall_optionstglobal_optionsthashRwtoRcR5RR3RRRR+R'RRR (((s4/usr/lib/python2.7/site-packages/pip/req/req_file.pyt<module>sl		 	
	�