ReddlZddlZddlZddlZddlZddlmZddlm Z ddl m Z ddl m Z ddlmZmZejeZGddZdS) N)List)canonicalize_name)PyPI)has_tls)normalize_pathredact_auth_from_urlceZdZdZddgZedeedeeddfdZdeedeeddfdZ defdZ d edeefd Z dS) SearchScopezF Encapsulates the locations that pip is configured to search. find_links index_urlsreturncg}|D]\}|dr0t|}tj|r|}||]t s^tj||D]H}tj |}|j dkrtdnI|||S)zQ Create a SearchScope object after normalizing the `find_links`. ~httpszipip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.r r ) startswithrospathexistsappendr itertoolschainurllibparseurlparseschemeloggerwarning)clsr r built_find_linkslinknew_linkparseds /builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/models/search_scope.pycreatezSearchScope.creates') * *Ds## $)$//7>>(++$#D  # #D ) ) ) )yy ! 4DEE  ..t44=G++NN% E ,s'!    Nc"||_||_dSNr)selfr r s r$__init__zSearchScope.__init__As %$r&crg}g}|jr|jtjgkr|jD]n}t|}tj|}|js"|jst d|| |o| d d ||jrJ| d d d|jDd |S)Nz:The index url "%s" seems invalid, please provide a scheme.zLooking in indexes: {}z, zLooking in links: {}c34K|]}t|VdSr()r).0urls r$ z6SearchScope.get_formatted_locations..hs+SSC2377SSSSSSr& )r r simple_urlrrrurlsplitrnetlocrrrformatjoinr )r)linesredacted_index_urlsr.redacted_index_urlpurls r$get_formatted_locationsz#SearchScope.get_formatted_locationsIsG  ? t4?2CCC ? ?%9#%>%>"|,,-?@@{4;NNT* $**+=>>>> LL(// :M0N0NOO    ?  LL&--IISS4?SSSSS    yyr& project_namecTdtdtffd fd|jDS)zReturns 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 r.r ctj|tjt }|ds|dz}|S)N/) posixpathr5rrquoterendswith)r.locr;s r$mkurl_pypi_urlz.mkurl_pypi_urltsV.V\''(9,(G(GHHC<<$$ CiJr&c&g|] }|SrE)r-r.rCs r$ z8SearchScope.get_index_urls_locations..s#???s##???r&)strr )r)r;rCs `@r$get_index_urls_locationsz$SearchScope.get_index_urls_locationsmsO        @???t????r&) __name__ __module__ __qualname____doc__ __slots__ classmethodrrGr%r*r:rHrEr&r$r r s|,I% I% I%   % % % [% N%I%I%  %%%%" " " " " H@S@T#Y@@@@@@r&r )rloggingrr? urllib.parsertypingrpip._vendor.packaging.utilsrpip._internal.models.indexrpip._internal.utils.compatrpip._internal.utils.miscrr getLoggerrIrr rEr&r$rWs 999999++++++......IIIIIIII  8 $ $p@p@p@p@p@p@p@p@p@p@r&