{\ddlZddlZddlZddlZddlZddlmZddlm Z ddl m Z ddl m Z ddlmZmZejeZedGd d ZdS) N) dataclass)canonicalize_name)PyPI)has_tls)normalize_pathredact_auth_from_urlT)frozenc eZdZUdZgdZeeed<eeed<eed<e deedeededdfdZ defdZ d edeefd Z d S) SearchScopezF Encapsulates the locations that pip is configured to search.  find_links index_urlsno_indexr rrreturncg}|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 ) startswithrospathexistsappendr itertoolschainurllibparseurlparseschemeloggerwarning)clsr rrbuilt_find_linkslinknew_linkparseds s/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/pip/_internal/models/search_scope.pycreatezSearchScope.creates') * *Ds## $)$//7>>(++$#D  # #D ) ) ) )yy ! 4DEE  ..t44=G++NN% E ,s'!    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|VdS)N)r).0urls r& z6SearchScope.get_formatted_locations..es+SSC2377SSSSSSr( )rr simple_urlrrrurlsplitrnetlocrr rformatjoinr )selflinesredacted_index_urlsr,redacted_index_urlpurls r&get_formatted_locationsz#SearchScope.get_formatted_locationsGsG  ? 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,rctj|tjt }|ds|dz}|S)N/) posixpathr3rrquoterendswith)r,locr:s r&mkurl_pypi_urlz.mkurl_pypi_urlqsV.V\''(9,(G(GHHC<<$$ CiJr(c&g|] }|SrD)r+r,rBs r& z8SearchScope.get_index_urls_locations..~s#???s##???r()strr)r4r:rBs `@r&get_index_urls_locationsz$SearchScope.get_index_urls_locationsjsO        @???t????r(N) __name__ __module__ __qualname____doc__ __slots__listrF__annotations__bool classmethodr'r9rGrDr(r&r r s988IS S NNN' I' I'  '  ' ' ' [' R! ! ! ! ! F@S@T#Y@@@@@@r(r )rloggingrr> urllib.parser dataclassesrpip._vendor.packaging.utilsrpip._internal.models.indexrpip._internal.utils.compatrpip._internal.utils.miscrr getLoggerrHrr rDr(r&rYs  !!!!!!999999++++++......IIIIIIII  8 $ $ $l@l@l@l@l@l@l@l@l@l@r(