
    q"h                         S SK r S SKrS SKrS SKrS SKrS SKJr  S SKJ	r	  S SK
Jr  S SKJr  S SKJr  S SKJrJr  \R&                  " \5      r\" SS	9 " S
 S5      5       rg)    N)	dataclass)List)canonicalize_name)PyPI)has_tls)normalize_pathredact_auth_from_urlT)frozenc            	           \ rS rSr% Sr/ SQr\\   \S'   \\   \S'   \	\S'   \
S\\   S\\   S\	SS 4S j5       rS\4S	 jrS
\S\\   4S jrSrg)SearchScope   z>
Encapsulates the locations that pip is configured to search.

find_links
index_urlsno_indexr   r   r   returnc                    / nU H[  nUR                  S5      (       a1  [        U5      n[        R                  R	                  U5      (       a  UnUR                  U5        M]     [        5       (       dc  [        R                  " X$5       HI  n[        R                  R                  U5      nUR                  S:X  d  M4  [        R                  S5          O   U " UUUS9$ )zA
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   )
startswithr   ospathexistsappendr   	itertoolschainurllibparseurlparseschemeloggerwarning)clsr   r   r   built_find_linkslinknew_linkparseds           S/var/www/html/env/lib/python3.13/site-packages/pip/_internal/models/search_scope.pycreateSearchScope.create   s     ')Ds##)$/77>>(++#D##D)  yy!
E..t4==G+NN%
  F '!
 	
    c                    / n/ nU R                   (       a  U R                   [        R                  /:w  a  U R                    Hv  n[        U5      n[        R
                  R                  U5      nUR                  (       d'  UR                  (       d  [        R                  SU5        UR                  U5        Mx     UR                  SR                  SR                  U5      5      5        U R                  (       a@  UR                  SR                  SR                  S U R                   5       5      5      5        SR                  U5      $ )Nz:The index url "%s" seems invalid, please provide a scheme.zLooking in indexes: {}z, zLooking in links: {}c              3   8   #    U  H  n[        U5      v   M     g 7f)N)r	   ).0urls     r(   	<genexpr>6SearchScope.get_formatted_locations.<locals>.<genexpr>f   s     S?C2377?s   
)r   r   
simple_urlr	   r   r   urlsplitr    netlocr!   r"   r   formatjoinr   )selflinesredacted_index_urlsr/   redacted_index_urlpurls         r(   get_formatted_locations#SearchScope.get_formatted_locationsH   s     ??t4??2CC%9#%>" ||,,-?@ {{4;;NNT*
 $**+=># '& LL(//		:M0NO ??LL&--IIS4??SS
 yyr+   project_namec                 z   ^ S[         S[         4U4S jjnU R                   Vs/ s H
  o2" U5      PM     sn$ s  snf )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   c                    > [         R                  " U [        R                  R	                  [        T5      5      5      nUR                  S5      (       d  US-   nU$ )N/)	posixpathr7   r   r   quoter   endswith)r/   locr?   s     r(   mkurl_pypi_url<SearchScope.get_index_urls_locations.<locals>.mkurl_pypi_urlr   sJ    ..V\\''(9,(GHC <<$$CiJr+   )strr   )r8   r?   rG   r/   s    `  r(   get_index_urls_locations$SearchScope.get_index_urls_locationsk   s9    	 	 	 04?s#???s   8 N)__name__
__module____qualname____firstlineno____doc__	__slots__r   rI   __annotations__boolclassmethodr)   r=   rJ   __static_attributes__rL   r+   r(   r   r      s     9IS	S	N'
I'
 I'
 	'

 
'
 '
R!  ! F@S @T#Y @r+   r   )r   loggingr   rC   urllib.parser   dataclassesr   typingr   pip._vendor.packaging.utilsr   pip._internal.models.indexr   pip._internal.utils.compatr   pip._internal.utils.miscr   r	   	getLoggerrM   r!   r   rL   r+   r(   <module>r`      sZ      	   !  9 + . I			8	$ $l@ l@ l@r+   