\e[c@@sdZddlmZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl m Z ddl mZmZmZddlmZddlmZddlmZdd lmZdd lmZdd lmZdd lmZdd l m!Z!dd l"m#Z#m$Z$m%Z%m&Z&ddl'm(Z(m)Z)m*Z*m+Z+ddl,m-Z-ddl.m/Z/ddl0m1Z1ddl2m3Z3ddl4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:ddl;m<Z<ddl=m>Z>m?Z?dddgZ@dddfdddfdddfdddfddeAfdddfgZBejCeDZEd eFfd!YZGdeFfd"YZHe jId#e jJd$ZKd%eFfd&YZLd'eFfd(YZMe dd)ZNd*ZOd+ZPd,ZQe d-d.ZRdS(/s!Routines related to PyPI, indexesi(tabsolute_importN(t namedtuple(thtml5libtrequeststsix(tunescape(t specifiers(tcanonicalize_name(tparse(tSSLError(trequest(t ipaddress(tHAS_TLStis_urlt path_to_urlt url_to_path(tBestVersionAlreadyInstalledtDistributionNotFoundtInvalidWheelFilenametUnsupportedWheel(tPyPI(t get_supported(t deprecated(t indent_log(tARCHIVE_EXTENSIONStSUPPORTED_EXTENSIONStcached_propertytnormalize_pathtremove_auth_from_urltsplitext(tcheck_requires_python(tWheelt wheel_extt FormatControltfmt_ctl_handle_mutual_excludet PackageFinderthttpst*t localhosts 127.0.0.0/8s::1/128tfiletsshtInstallationCandidatecB@sbeZdZdZdZdZdZdZdZdZ dZ d Z RS( cC@s@||_t||_||_|j|j|jf|_dS(N(tprojectt parse_versiontversiontlocationt_key(tselfR*R,R-((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyt__init__=s  cC@sdj|j|j|jS(Ns)(tformatR*R,R-(R/((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyt__repr__CscC@s t|jS(N(thashR.(R/((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyt__hash__HscC@s|j|dS(NcS@s ||kS(N((tsto((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pytLs(t_compare(R/tother((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyt__lt__KscC@s|j|dS(NcS@s ||kS(N((R5R6((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR7Os(R8(R/R9((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyt__le__NscC@s|j|dS(NcS@s ||kS(N((R5R6((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR7Rs(R8(R/R9((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyt__eq__QscC@s|j|dS(NcS@s ||kS(N((R5R6((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR7Us(R8(R/R9((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyt__ge__TscC@s|j|dS(NcS@s ||kS(N((R5R6((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR7Xs(R8(R/R9((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyt__gt__WscC@s|j|dS(NcS@s ||kS(N((R5R6((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR7[s(R8(R/R9((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyt__ne__ZscC@s&t|tstS||j|jS(N(t isinstanceR)tNotImplementedR.(R/R9tmethod((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR8]s( t__name__t __module__R0R2R4R:R;R<R=R>R?R8(((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR);s         c B@seZdZededddddded ZdZdZeedZ dZ dZ dZ dZ d Zd Zejd Zd Zd ZdZdZdZRS(sThis finds packages. This is meant to match easy_install's technique for looking for packages, by reading pages and looking for appropriate links. c  C@s|d krtdng|_xW|D]O} | jdrjt| }tjj|rj|} qjn|jj| q+W||_ g|_ t |_ |pt t t |_g|r|ngD]}d|df^q|_||_||_||_td| d|d| d| |_| |_tsxRtj|j |jD]5} tj| }|jdkrRtjd PqRqRWnd S( sCreate a PackageFinder. :param format_control: A FormatControl object or None. Used to control the selection of source packages / binary packages when consulting the index and links. :param platform: A string or None. If None, searches for packages that are supported by the current system. Otherwise, will find packages that can be built on the platform passed in. These packages will only be downloaded for distribution: they will not be built locally. :param versions: A list of strings or None. This is passed directly to pep425tags.py in the get_supported() method. :param abi: A string or None. This is passed directly to pep425tags.py in the get_supported() method. :param implementation: A string or None. This is passed directly to pep425tags.py in the get_supported() method. s>PackageFinder() missing 1 required keyword argument: 'session't~R%tversionstplatformtabitimplR$sipip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.N(tNonet TypeErrort find_linkst startswithRtostpathtexiststappendt index_urlstdependency_linkstsett logged_linksR!tformat_controltsecure_originstallow_all_prereleasestprocess_dependency_linkstsessionRt valid_tagst prefer_binaryR t itertoolstchaint urllib_parseturlparsetschemetloggertwarning(R/RLRRRXt trusted_hostsRYRZRVRGRFRHtimplementationR\tlinktnew_linkthosttparsed((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR0ks@        .     cC@sg}|jrS|jtjgkrS|jdjdjd|jDn|jr|jdjdj|jndj|S(NsLooking in indexes: {}s, cs@s|]}t|VqdS(N(R(t.0turl((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pys ssLooking in links: {}s (RRRt simple_urlRQR1tjoinRL(R/tlines((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pytget_formatted_locationss  cC@s<|jr8tddddddd|jj|ndS(NsXDependency Links processing has been deprecated and will be removed in a future release.t replacementtgone_ins18.2tissuei[(RYRRJRStextend(R/tlinks((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pytadd_dependency_linkss c@sXggfd}x-|D]%}tjj|}|jd}|sX|r|rg|}n t|}tjj|r|rtjj|}xItj|D]}|tjj||qWq|rj |qqJtjj |r ||qJt j d|q%t |r:j |q%t j d|q%WfS(st Sort locations into "files" (archives) and "urls", and return a pair of lists (files,urls) c@sLt|}tj|dtddkr;j|n j|dS(Ntstrictis text/html(Rt mimetypest guess_typetFalseRQ(RORk(tfilesturls(s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyt sort_paths sfile:s:Url '%s' is ignored: it is neither a file nor a directory.sQUrl '%s' is ignored. It is either a non-existing path or lacks a specific scheme.(RNRORPRMRtisdirtrealpathtlistdirRmRQtisfileRbRcR (t locationst expand_dirR|Rkt is_local_patht is_file_urlROtitem((RzR{s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyt_sort_locationss8         c C@st|j}t}d}|jjrt|jj}|j|jsdtd|jn|j rvd}n|j |j }|j dk rt jd|j }|j}t|d|df}qn| }||j||fS(s Function used to generate link sort key for link tuples. The greater the return value, the more preferred it is. If not finding wheels, then sorted by version only. If finding wheels, then the sort order is by version, then: 1. existing installs 2. wheels ordered via Wheel.support_index_min(self.valid_tags) 3. source archives If prefer_binary was set, then all wheels are sorted above sources. Note: it was considered to embed this logic into the Link comparison operators, but then different sdist links with the same version, would have to be considered equal isB%s is not a supported wheel for this platform. It can't be sorted.is ^(\d+)(.*)$N(tlenR[ttupleR-tis_wheelRtfilenamet supportedRR\tsupport_index_mint build_tagRJtretmatchtgroupstintR,( R/t candidatet support_numRtbinary_preferencetwheeltpriRtbuild_tag_groups((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyt_candidate_sort_keys$      c C@stjt|}|j|j|jf}|djddd}xht|jD]Y}||dkr|ddkrqUnyt j t |dt j s|ddkr|dn|djd}t jt |dt j r|dn|djd}WnQtk r`|drs|dj|djkrs|ddkrsqUqsnX||krsqUn|d|dkr|ddkr|ddk rqUntSW|jd|j|jtS( Nit+iiR%tutf8isThe repository located at %s is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host %s'.(R_R`tstrRathostnametporttrsplittSECURE_ORIGINSRWR t ip_addressR@Rt text_typeRJtdecodet ip_networkt ValueErrortlowertTrueRcRy( R/RbR-Ritorigintprotocolt secure_origintaddrtnetwork((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyt_validate_secure_origin7s>        c@s/fd}g|jD]}||^qS(sReturns the locations found via self.index_urls Checks the url_name on the main (first in the list) index and use this url_name to produce all locations c@sAtj|tjt}|jds=|d}n|S(Nt/(t posixpathRmR_tquoteRtendswith(Rktloc(t project_name(s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pytmkurl_pypi_urls  (RR(R/RRRk((Rs2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyt_get_index_urls_locations~s c C@s|j|}|j|\}}|j|jdt\}}|j|j\}}dtj|||D} gtjd|Dd|Dd|DD]} |jt| r| ^q} tj dt | |x| D]} tj d| qWt |} t |j | }t|| |}|jd|jD|}g}xY|j| |D]E}tj d |jt!|j|j|j|Wd QXqsW|jd |jD|}|rtj d d jg|D]}|jj^qn|j| |}|ry|jdttj dd jg|D]}t|jj^qTn||||S(sFind all available InstallationCandidate for project_name This checks index_urls, find_links and dependency_links. All versions found are returned as an InstallationCandidate list. See _link_package_versions for details on which files are accepted Rcs@s|]}t|VqdS(N(tLink(RjRk((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pys scs@s|]}t|VqdS(N(R(RjRk((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pys scs@s|]}t|VqdS(N(R(RjRk((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pys scs@s|]}t|VqdS(N(R(RjRk((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pys ss,%d location(s) to search for versions of %s:s* %scs@s|]}t|dVqdS(s-fN(R(RjRk((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pys ssAnalyzing links from page %sNcs@s|]}t|VqdS(N(R(RjRk((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pys ssdependency_links found: %ss, treversesLocal files found: %s(RRRLRRSR]R^RRbtdebugRRtfmt_ctl_formatsRVtSearcht_package_versionst _get_pagesRkRRsRtRmR-tsortR(R/Rtindex_locationstindex_file_loct index_url_loct fl_file_loct fl_url_loct dep_file_loct dep_url_loctfile_locationsRft url_locationsR-tcanonical_nametformatstsearchtfind_links_versionst page_versionstpagetdependency_versionsR,t file_versionsR((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pytfind_all_candidatessZ          &) c C@s|j|j}t|jjg|D]}t|j^q%d|jrR|jnd }g|D]!}t|j|kre|^qe}|rt |d|j }nd }|j d k rt |j j}nd }|d kr7|d kr7t jd|djtd|Ddt td|nt} |rg|d ks^|j|krgt} n| r|d k r| rt jd|nt jd||jd S| rt jd |djt|dt pd tnt jd |jdjt|dt |jS( sTry to find a Link matching req Expects req, an InstallRequirement and upgrade, a boolean Returns a Link if found, Raises DistributionNotFound or BestVersionAlreadyInstalled otherwise t prereleasestkeysNCould not find a version that satisfies the requirement %s (from versions: %s)s, cS@sh|]}t|jqS((RR,(Rjtc((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pys s s%No matching distribution found for %ssLExisting installed version (%s) is most up-to-date and satisfies requirementsUExisting installed version (%s) satisfies requirement (most up-to-date version is %s)s=Installed version (%s) is most up-to-date (past versions: %s)tnones)Using version %s (newest of versions: %s)N(RtnameRTt specifiertfilterRR,RXRJtmaxRt satisfied_byR+RbtcriticalRmtsortedRRyRRRR-( R/treqtupgradetall_candidatesRtcompatible_versionstapplicable_candidatestbest_candidatetinstalled_versiontbest_installed((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pytfind_requirementsd ".       cc@sct}xS|D]K}||kr(qn|j||j|}|dkrVqn|VqWdS(sp Yields (page, page_url) from the given locations, skipping locations that have errors. N(RTtaddt _get_pageRJ(R/RRtseenR-R((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyRJs     s-py([123]\.?[0-9]?)$cC@sqgg}}t}xP|D]H}||kr|j||jrU|j|qe|j|qqW||S(s Returns elements of links in order, non-egg links first, egg links second, while eliminating duplicates (RTRt egg_fragmentRQ(R/Rtteggstno_eggsRRf((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyt _sort_links]s      cC@sRg}xE|j|D]4}|j||}|dk r|j|qqW|S(N(Rt_link_package_versionsRJRQ(R/RtRtresultRftv((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyRms  cC@s9||jkr5tjd|||jj|ndS(NsSkipping link %s; %s(RURbRR(R/Rftreason((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyt_log_skipped_linkusc C@sd}|jr$|j}|j}n^|j\}}|sP|j|ddS|tkrt|j|d|dSd|jkr|tkr|j|d|jdSd|j kr|dkr|j|ddS|tkryt |j }Wn"t k r|j|d dSXt |j|jkrP|j|d |jdS|j|jsv|j|d dS|j}nd |jkr|tkr|j|d |jdS|st||j|}n|dkr|j|d|jdS|jj|}|r^||j }|jd}|tjd kr^|j|ddSnyt|j} Wn3tjk rtjd|j |jt} nX| stjd||jdStjd||t |j||S(s'Return an InstallationCandidate or Nones not a fileNsunsupported archive format: %stbinarysNo binaries permitted for %stmacosx10s.zips macosx10 onesinvalid wheel filenameswrong project name (not %s)s%it is not compatible with this PythontsourcesNo sources permitted for %ssMissing project version for %siisPython version is incorrects3Package %s has an invalid Requires-Python entry: %ss_The package %s is incompatible with the pythonversion in use. Acceptable python versions are:%ssFound link %s, version: %s(!RJRtextRRRRR tsuppliedRORRRRRt canonicalRR[R,tegg_info_matchest_py_version_reRtstarttgrouptsysRtrequires_pythonRtInvalidSpecifierRbRRR)( R/RfRR,tegg_infoRRRt py_versiontsupport_this_python((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyRzs              cC@stj|d|jS(NRZ(tHTMLPagetget_pageRZ(R/Rf((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyRsN(RCRDt__doc__RyRJR0RoRut staticmethodRRRRRRRRtcompileRRRRRR(((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR#ds,   T 3 $ G  S c     Ps([a-z0-9_.]+)-([a-z0-9_.!+-]+)cC@s|j|}|s)tjd|dS|dkrU|jd}||jdS|jdj}|jdd}|jd}|j|r|jdt |SdSdS(sxPull the version part out of a string. :param egg_info: The string to parse. E.g. foo-2.1 :param search_name: The name of the package this belongs to. None to infer the name. Note that this cannot unambiguously parse strings like foo-2-2 which might be foo, 2-2 or foo-2, 2. :param link: The link the string came from, for logging on failure. s%Could not parse version from link: %sit-t_N( RRbRRJRtindexRtreplaceRMR(Rt search_nameRft _egg_info_reRt full_matchRtlook_for((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyRs  RcB@seZdZd dZdZeed dZe d dZ e dZ e dZ edZejdejZd ZRS( s'Represents one page, along with its URLcC@sd}|rMd|krMtj|d\}}d|krM|d}qMn||_tj|jd|dt|_||_||_ dS(Ns Content-Typetcharsetttransport_encodingtnamespaceHTMLElements( RJtcgit parse_headertcontentRRRyRiRktheaders(R/RRkRtencodingt content_typetparams((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR0s     cC@s|jS(N(Rk(R/((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyt__str__scC@s |dkrtdn|j}|jddd}ddlm}xS|jD]H}|jj|rT|t |dkrTt j d||dSqTWy|r|j }xht D]]}|j|r|j|d|} | jjd rPqt j d || dSqqWnt j d |tj|\}} } } } }|d krtjjtj| r|jd s|d 7}ntj|d}t j d|n|j|did d6dd6}|j|jjdd} | jjd s$t j d || dS||j|j|j}Wntjk rk}|j|||ntk r}d}|t |7}|j|||dt j!nWtj"k r}|j|d||n+tj#k r|j|d|nX|SdS(Ns9get_page() missing 1 required keyword argument: 'session't#ii(t VcsSupports+:sCannot look at %s URL %sRZs text/htmls,Skipping page %s because of Content-Type: %ssGetting page %sR'Rs index.htmls# file: URL is directory, getting %sRtAccepts max-age=600s Cache-Controls Content-Typetunknowns4There was a problem confirming the ssl certificate: tmethsconnection error: %ss timed out($RJRKRktsplittpip._internal.vcsRtschemesRRMRRbRRRRt_get_content_typeR_R`RNROR}turllib_requestt url2pathnameturljointgettraise_for_statusRRRt HTTPErrort _handle_failR RtinfotConnectionErrortTimeout(tclsRft skip_archivesRZRkRRaRtbad_extRtnetlocRORtquerytfragmenttresptinsttexcR((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyRsr   +  !    cC@s,|dkrtj}n|d||dS(Ns%Could not fetch URL %s: %s - skipping(RJRbR(RfRRkR((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR&Ys  cC@sftj|\}}}}}|ddhkr4dS|j|dt}|j|jjddS(s;Get the Content-Type of the given url, using a HEAD requestthttpR$ttallow_redirectss Content-Type(R_turlsplittheadRR$RR#(RkRZRaR-ROR.R/R0((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR`s  cC@sog|jjdD]!}|jddk r|^q}|rd|djdrd|djdS|jSdS(Ns.//basethrefi(RitfindallR#RJRk(R/txtbases((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pytbase_urlns !cc@sx|jjdD]}|jdr|jd}|jtj|j|}|jd}|rvt|nd}t ||d|VqqWdS(sYields all links in the pages.//aR8sdata-requires-pythonRN( RiR9R#t clean_linkR_R"R<RRJR(R/tanchorR8Rkt pyrequire((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyRtyss[^a-z0-9$&+,/:;=?@.#%_\\|-]cC@s|jjd|S(sMakes sure a link is fully encoded. That is, if a ' ' shows up in the link, it will be rewritten to %20 (while not over-quoting % or other characters).cS@sdt|jdS(Ns%%%2xi(tordR(R((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR7s(t _clean_retsub(R/Rk((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR=s N(RCRDRRJR0Rt classmethodRRRR&RRR<tpropertyRtRRtIRAR=(((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyRs  U  RcB@saeZdddZdZdZdZdZdZdZ dZ dZ d Z e d Ze d Ze d Ze d ZdZe dZe dZejdZe dZejdZe dZejdZe dZe dZe dZe dZe dZ RS(cC@sI|jdrt|}n||_||_|r<|nd|_dS(s Object representing a parsed link from https://pypi.org/simple/* url: url of the resource pointed to (href of the link) comes_from: instance of HTMLPage where the link was found, or string. requires_python: String containing the `Requires-Python` metadata field, specified in PEP 345. This may be specified by a data-requires-python attribute in the HTML link tag, as described in PEP 503. s\\N(RMRRkt comes_fromRJR(R/RkRFR((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR0s   cC@sP|jrd|j}nd}|jr?d|j|j|fSt|jSdS(Ns (requires-python:%s)R4s%s (from %s)%s(RRFRkR(R/trp((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyRs   cC@sd|S(Ns ((R/((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR2scC@s#t|tstS|j|jkS(N(R@RRARk(R/R9((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR<scC@s#t|tstS|j|jkS(N(R@RRARk(R/R9((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR?scC@s#t|tstS|j|jkS(N(R@RRARk(R/R9((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR:scC@s#t|tstS|j|jkS(N(R@RRARk(R/R9((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR;scC@s#t|tstS|j|jkS(N(R@RRARk(R/R9((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR>scC@s#t|tstS|j|jkS(N(R@RRARk(R/R9((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR=scC@s t|jS(N(R3Rk(R/((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR4scC@sktj|j\}}}}}tj|jdp<|}tj|}|sgtd|j|S(NRsURL %r produced no filename(R_R6RkRtbasenametrstriptunquotetAssertionError(R/RR-ROR((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyRs !cC@stj|jdS(Ni(R_R6Rk(R/((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyRascC@stj|jdS(Ni(R_R6Rk(R/((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR-scC@stjtj|jdS(Ni(R_RJR6Rk(R/((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyROscC@sttj|jjdS(NR(RRRHRORI(R/((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyRscC@s|jdS(Ni(R(R/((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyRscC@s=tj|j\}}}}}tj||||dfS(N(R_R6Rkt urlunsplitRJ(R/RaR-ROR.R/((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyturl_without_fragments!s[#&]egg=([^&]*)cC@s,|jj|j}|sdS|jdS(Ni(t_egg_fragment_reRRkRJR(R/R((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyRss[#&]subdirectory=([^&]*)cC@s,|jj|j}|sdS|jdS(Ni(t_subdirectory_fragment_reRRkRJR(R/R((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pytsubdirectory_fragmentss2(sha1|sha224|sha384|sha256|sha512|md5)=([a-f0-9]+)cC@s,|jj|j}|r(|jdSdS(Ni(t_hash_reRRkRRJ(R/R((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR3 s cC@s,|jj|j}|r(|jdSdS(Ni(RQRRkRRJ(R/R((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyt hash_names cC@s0tj|jjdddjdddS(NRiit?(RRHRkR(R/((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pytshow_urlscC@s |jtkS(N(RR (R/((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyRscC@s*ddlm}|j|jkr&tStS(s Determines if this points to an actual artifact (e.g. a tarball) or if it points to an "abstract" thing like a path or a VCS location. i(tvcs(RRURat all_schemesRyR(R/RU((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyt is_artifact"sN(!RCRDRJR0RR2R<R?R:R;R>R=R4RDRRaR-RORRRMRRRNRRORPRQR3RRRTRRW(((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyRs8          sno_binary only_binarycC@s|jd}xUd|krf|j|j|jd||jdd4d|krdSqWxP|D]H}|dkr|jqnnt|}|j||j|qnWdS(Nt,s:all:is:none:(RtclearRRRtdiscard(tvaluettargetR9tnewR((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyR":s         cC@sddh}||jkr+|jdn]||jkrJ|jdn>d|jkri|jdnd|jkr|jdnt|S(NRRs:all:(t only_binaryRZt no_binaryt frozenset(tfmt_ctlRR((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pyRMs cC@std|j|jdS(Ns:all:(R"R_R^(Ra((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pytfmt_ctl_no_binaryZsRssupplied canonical formats(SRt __future__RRR]tloggingRwRNRRRt collectionsRt pip._vendorRRRtpip._vendor.distlib.compatRtpip._vendor.packagingRtpip._vendor.packaging.utilsRtpip._vendor.packaging.versionRR+tpip._vendor.requests.exceptionsR tpip._vendor.six.moves.urllibR_R R tpip._internal.compatR tpip._internal.downloadR R RRtpip._internal.exceptionsRRRRtpip._internal.models.indexRtpip._internal.pep425tagsRtpip._internal.utils.deprecationRtpip._internal.utils.loggingRtpip._internal.utils.miscRRRRRRtpip._internal.utils.packagingRtpip._internal.wheelRR t__all__RJRt getLoggerRCRbtobjectR)R#RRERRRR!R"RRbR(((s2/tmp/pip-install-0xiv62/pip/pip/_internal/index.pytsb        "".     )n