<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
B
    Re                 @   s   d dl Z d dlZd dlZd dlZd dlmZ d dlmZ d dl	m
Z
 d dlmZ d dlmZmZ d dlmZ er|d dlmZ eeZG d	d
 d
eZdS )    N)canonicalize_name)parse)PyPI)has_tls)normalize_pathredact_auth_from_url)MYPY_CHECK_RUNNING)Listc               @   s<   e Zd ZdZddgZedd Zdd Zdd	 Zd
d Z	dS )SearchScopezF
    Encapsulates the locations that pip is configured to search.
    
find_links
index_urlsc             C   s   g }x8|D ]0}| dr0t|}tj|r0|}|| q
W t szx4t||D ]$}t	
|}|jdkrRtd P qRW | ||d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   )
startswithr   ospathexistsappendr   	itertoolschainurllib_parseurlparseschemeloggerwarning)clsr   r   built_find_linkslinknew_linkparsed r    /builddir/build/BUILDROOT/alt-python37-pip-20.2.4-6.el8.x86_64/opt/alt/python37/lib/python3.7/site-packages/pip/_internal/models/search_scope.pycreate   s"    



zSearchScope.createc             C   s   || _ || _d S )N)r   r   )selfr   r   r    r    r!   __init__F   s    zSearchScope.__init__c             C   s   g }g }| j rv| j tjgkrvxB| j D ]8}t|}t|}|jsR|jsRt	d| |
| q$W |
dd| | jr|
dddd | jD  d|S )Nz:The index url "%s" seems invalid, please provide a scheme.zLooking in indexes: {}z, zLooking in links: {}c             s   s   | ]}t |V  qd S )N)r   ).0urlr    r    r!   	<genexpr>m   s    z6SearchScope.get_formatted_locations.<locals>.<genexpr>
)r   r   
simple_urlr   r   urlsplitr   netlocr   r   r   formatjoinr   )r#   linesredacted_index_urlsr&   redacted_index_urlpurlr    r    r!   get_formatted_locationsO   s$    
z#SearchScope.get_formatted_locationsc                s    fdd  fdd| j D S )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
        c                s,   t | tt }|ds(|d }|S )N/)	posixpathr-   r   quoter   endswith)r&   loc)project_namer    r!   mkurl_pypi_urly   s    
z<SearchScope.get_index_urls_locations.<locals>.mkurl_pypi_urlc                s   g | ]} |qS r    r    )r%   r&   )r9   r    r!   
<listcomp>   s    z8SearchScope.get_index_urls_locations.<locals>.<listcomp>)r   )r#   r8   r    )r9   r8   r!   get_index_urls_locationsq   s    z$SearchScope.get_index_urls_locationsN)
__name__
__module____qualname____doc__	__slots__classmethodr"   r$   r2   r;   r    r    r    r!   r
      s   )	"r
   )r   loggingr   r4   Zpip._vendor.packaging.utilsr   Zpip._vendor.six.moves.urllibr   r   pip._internal.models.indexr   pip._internal.utils.compatr   pip._internal.utils.miscr   r   pip._internal.utils.typingr   typingr	   	getLoggerr<   r   objectr
   r    r    r    r!   <module>   s   
