7fddlZddlZddlZddlZddlZddlmZddlm Z ddl m Z ddl m Z ddlmZddlmZmZejeZed Gd d ZdS) N) dataclass)List)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_indexrrrreturncg}|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)clsrrrbuilt_find_linkslinknew_linkparseds /builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/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..fs+SSC2377SSSSSSr) )rr simple_urlr rrurlsplitrnetlocr r!rformatjoinr)selflinesredacted_index_urlsr-redacted_index_urlpurls r'get_formatted_locationsz#SearchScope.get_formatted_locationsHsG  ? 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/) posixpathr4rrquoterendswith)r-locr;s r'mkurl_pypi_urlz.mkurl_pypi_urlrsV.V\''(9,(G(GHHC<<$$ CiJr)c&g|] }|SrE)r,r-rCs r' z8SearchScope.get_index_urls_locations..s#???s##???r))strr)r5r;rCs `@r'get_index_urls_locationsz$SearchScope.get_index_urls_locationsksO        @???t????r)N) __name__ __module__ __qualname____doc__ __slots__rrG__annotations__bool classmethodr(r:rHrEr)r'r r s988IS S NNN' I' I'  '  ' ' ' [' R! ! ! ! ! F@S@T#Y@@@@@@r)r )rloggingrr? urllib.parser dataclassesrtypingrpip._vendor.packaging.utilsrpip._internal.models.indexrpip._internal.utils.compatrpip._internal.utils.miscrr getLoggerrIr r rEr)r'rZs !!!!!!999999++++++......IIIIIIII  8 $ $ $l@l@l@l@l@l@l@l@l@l@r)