Your IP : 3.14.3.180
�
�Rec@@sVdZddlmZddlZddlZddlZddlZddlZddlm Z
ddlmZddl
mZmZddlmZddlmZdd lmZdd
lmZddlmZer�ddlmZdd
lmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$ddl%m&Z&ddl'm(Z(ee$e)e#fZ*ee#ge$e+effZ,ndgZ-ej.dej/�Z0ej.d�Z1ej.d�Z2ej3ej4ej5ej6ej7ej8ej9ej:ej;ej<ej=ej>ej?ej@gZAejBejCejDgZEgeED]ZFe+eF�jG�^q7ZHdeIfd��YZJdeIfd��YZKdddeMd�ZNd�ZOdd�ZPdddd�ZQdddd�ZRdeIfd��YZSd�ZTd �ZUd!eVfd"��YZWd#�ZXd$�ZYd%�ZZd&�Z[dd'�Z\ej.d(ej/�Z]dS()s
Requirements file parsing
i(tabsolute_importN(tparse(t
cmdoptions(tInstallationErrortRequirementsFileParseError(tSearchScope(traise_for_status(tauto_decode(tMYPY_CHECK_RUNNING(tget_url_scheme(tValues( tAnytCallabletDicttIteratortListtNoReturntOptionaltTexttTuple(t
PackageFinder(t
PipSessiontparse_requirementss^(http|https|file):s(^|\s+)#.*$s#(?P<var>\$\{(?P<name>[A-Z0-9_]+)\})tParsedRequirementcB@seZddd�ZRS(cC@s:||_||_||_||_||_||_dS(N(trequirementtis_editablet
comes_fromtoptionst
constrainttline_source(tselfRRRRRR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pyt__init__Ps
N(t__name__t
__module__tNoneR(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pyROst
ParsedLinecB@seZd�ZRS(cC@s�||_||_||_||_||_|rQt|_t|_||_ n7|j
rt|_t|_|j
d|_ n t|_dS(Ni(tfilenametlinenoRtoptsRtTruetis_requirementtFalseRRt editables(RR$R%RtargsR&R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pyRcs
(R R!R(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pyR#bsc
c@sqt|�}t|||�}xL|j||�D]8}t|d|d|d|�} | dk r1| Vq1q1WdS(s�Parse a requirements file and yield ParsedRequirement instances.
:param filename: Path or url of requirements file.
:param session: PipSession instance.
:param finder: Instance of pip.index.PackageFinder.
:param comes_from: Origin description of requirements.
:param options: cli options.
:param constraint: If true, parsing a constraint file rather than
requirements file.
RtfindertsessionN(tget_line_parsertRequirementsFileParserRthandle_lineR"(
R$R-R,RRRtline_parsertparsertparsed_linet
parsed_req((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pyR�s cC@s@t|j�dd�}t|�}t|�}t|�}|S(sxSplit, filter, and join lines, and return a line iterator
:param content: the content of the requirements file
tstarti(t enumeratet
splitlinest
join_linestignore_commentstexpand_env_variables(tcontentt
lines_enum((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pyt
preprocess�s
c
C@s&dj|jrdnd|j|j�}|js9t�|jrjtd|jd|jd|d|j�S|r�t j
||j�ni}xGtD]?}||jj
kr�|jj
|r�|jj
|||<q�q�Wdj|j|j�}td|jd|jd|d|jd |d
|�SdS(Ns{} {} (line {})s-cs-rRRRRs
line {} of {}RR(tformatRR$R%R(tAssertionErrorRRRRtcheck_install_build_globalR&tSUPPORTED_OPTIONS_REQ_DESTt__dict__(tlineRtline_comes_fromtreq_optionstdestR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pythandle_requirement_line�s.$
" c@s��rP|jr|j�_n|jrP�jj�fd�|jD��qPn|r�|j}|j}|jr�|jg}n|jtkr�g}n|jr�|j|j�n|jr(|jd}t j
jt j
j|��} t j
j
| |�}
t j
j|
�r|
}n|j|�ntd|d|�}||_|jr\|j�n|jrr|j�n|r�x?|jp�gD]+}dj||�}
|j|d|
�q�Wq�ndS(Nc3@s$|]}|�jkr|VqdS(N(tfeatures_enabled(t.0tf(R(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pys <genexpr>�sit
find_linkst
index_urlss
line {} of {}tsource(trequire_hashesRHtextendRKRLt index_urltno_indexR'textra_index_urlstostpathtdirnametabspathtjointexiststappendRtsearch_scopetpretset_allow_all_prereleasest
prefer_binarytset_prefer_binaryt
trusted_hostsR>tadd_trusted_host(R&R$R%R,RR-RKRLtvaluetreq_dirtrelative_to_reqs_fileRZthostRM((Rs�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pythandle_option_line�sD
cC@sF|jrt||�}|St|j|j|j|||�dSdS(sHandle a single parsed requirements line; This can result in
creating/yielding requirements, or updating the finder.
:param line: The parsed line to be processed.
:param options: CLI options.
:param finder: The finder - updated by non-requirement lines.
:param session: The session - updated by non-requirement lines.
Returns a ParsedRequirement object if the line is a requirement line,
otherwise returns None.
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.
N(R(RGReR&R$R%R"(RCRR,R-R4((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pyR0s R/cB@s,eZd�Zd�Zd�Zd�ZRS(cC@s||_||_||_dS(N(t_sessiont_line_parsert_comes_from(RR-R1R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pyRCs cc@s&x|j||�D]}|VqWdS(s3Parse a given file, yielding parsed lines.
N(t_parse_and_recurse(RR$RRC((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pyRNscc@s�x�|j||�D]�}|jr�|jjs;|jjr�|jjr`|jjd}t}n|jjd}t}tj|�r�t j
||�}n3tj|�s�tjj
tjj|�|�}nx'|j||�D]}|Vq�Wq|VqWdS(Ni(t_parse_fileR(R&trequirementstconstraintsR)R't SCHEME_REtsearchturllib_parseturljoinRSRTRWRURi(RR$RRCtreq_pathtnested_constraintt
inner_line((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pyRiUs"
cc@s�t||jd|j�\}}t|�}x�|D]y\}}y|j|�\}} Wn4tk
r�}
dj||
j�}t|��nXt |||j|| |�Vq4WdS(NRsInvalid requirement: {}
{}(
tget_file_contentRfRhR=RgtOptionParsingErrorR>tmsgRR#(RR$Rt_R;R<tline_numberRCtargs_strR&teRv((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pyRjvs (R R!RRRiRj(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pyR/Bs !c@s�fd�}|S(Nc@s�t�}|j�}d|_�r3�j|_nt|�\}}tjdkrf|jd�}n|j t
j|�|�\}}||fS(Niiitutf8(iii(tbuild_parsertget_default_valuesR"RPtformat_controltbreak_args_optionstsystversion_infotencodet
parse_argstshlextsplit(RCR2tdefaultsRytoptions_strR&Rw(R,(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pyt
parse_line�s ((R,R�((R,s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pyR.�scC@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(R�t
startswithRYtpopRW(RCttokensR+Rttoken((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pyR�s
RucB@seZd�ZRS(cC@s
||_dS(N(Rv(RRv((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pyR�s(R R!R(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pyRu�scC@sYtjdt�}tt}x$|D]}|�}|j|�q#Wd�}||_|S(s7
Return a parser for parsing requirement lines
tadd_help_optioncS@st|��dS(N(Ru(RRv((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pytparser_exit�s(toptparsetOptionParserR)tSUPPORTED_OPTIONStSUPPORTED_OPTIONS_REQt
add_optiontexit(R2toption_factoriestoption_factorytoptionR�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pyR|�s
cc@sd}g}x�|D]�\}}|jd�s>tj|�r�tj|�rZd|}n|r�|j|�|dk st�|dj|�fVg}q�||fVq|s�|}n|j|jd��qW|r|dk s�t�|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\R�tN(R"tendswitht
COMMENT_REtmatchRYR?RWtstrip(R<tprimary_line_numbertnew_lineRxRC((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pyR8�s$
cc@sMxF|D]>\}}tjd|�}|j�}|r||fVqqWdS(s1
Strips comments and filter empty lines.
R�N(R�tsubR�(R<RxRC((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pyR9�s
cc@ssxl|D]d\}}xJtj|�D]9\}}tj|�}|sJq#n|j||�}q#W||fVqWdS(s�Replace all environment variables that can be retrieved via `os.getenv`.
The only allowed format for environment variables defined in the
requirement file is `${MY_VARIABLE_1}` to ensure two things:
1. Strings that contain a `$` aren't accidentally (partially) expanded.
2. Ensure consistency across platforms for requirement files.
These points are the result of a discussion on the `github pull
request #3514 <https://github.com/pypa/pip/pull/3514>`_.
Valid characters in variable names follow the `POSIX standard
<http://pubs.opengroup.org/onlinepubs/9699919799/>`_ and are limited
to uppercase letter, digits and the `_` (underscore).
N(t
ENV_VAR_REtfindallRStgetenvtreplace(R<RxRCtenv_vartvar_nameRa((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pyR:sc
C@s�t|�}|d
krA|j|�}t|�|j|jfS|dkr!|r}|jd�r}tdj||���n|jdd�d}|j dd�}t
j|�}|r�|jd�d|jd d�d}nt
j|�}|jd�rd|jd�}n|}ny.t|d
��}t|j��}WdQXWn(tk
ry} tdj| ���nX||fS(sZGets the content of a file; it may be a filename, file: URL, or
http: URL. Returns (location, content). Content is unicode.
Respects # -*- coding: declarations on the retrieved files.
:param url: File path or url.
:param session: PipSession instance.
:param comes_from: Origin description of requirements.
thttpthttpstfiles6Requirements file {} references URL {}, which is localt:is\t/t|trbNs$Could not open requirements file: {}(R�R�(R tgetRturlttextR�RR>R�R�t_url_slash_drive_reR�tgroupRotunquotetlstriptopenRtreadtIOError(
R�R-RtschemetrespRTR�RJR;texc((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pyRt#s4
* s/*([a-z])\|(^t__doc__t
__future__RR�RStreR�R�tpip._vendor.six.moves.urllibRRotpip._internal.cliRtpip._internal.exceptionsRRt!pip._internal.models.search_scopeRtpip._internal.network.utilsRtpip._internal.utils.encodingRtpip._internal.utils.typingRtpip._internal.utils.urlsR R
ttypingRRR
RRRRRRt"pip._internal.index.package_finderRtpip._internal.network.sessionRtinttReqFileLineststrt
LineParsert__all__tcompiletIRmR�R�RPtextra_index_urlRQRlRkteditableRKt no_binarytonly_binaryR]RNR[ttrusted_hosttuse_new_featureR�tinstall_optionstglobal_optionsthashR�toRFRAtobjectRR#R"R)RR=RGReR0R/R.Rt ExceptionRuR|R8R9R:RtR�(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/req/req_file.pyt<module>s�@ %! .7)N -
?>