R`i# d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlm Z d dl
mZ d dlm
Z
d dlmZmZ ej" e Z G d d Zy) N)List)canonicalize_name)PyPI)has_tls)normalize_pathredact_auth_from_urlc e Zd ZdZg dZedee dee dedd fd Z dee dee deddfd Z
defd
Zdedee fdZy)
SearchScopezF
Encapsulates the locations that pip is configured to search.
find_links
index_urlsno_indexr r
r returnc g }|D ]P }|j d r,t | }t j j | r|}|j | R t
s`t j || D ]G }t j j | }|j dk( s2t j d n | ||| 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 )
startswithr ospathexistsappendr itertoolschainurllibparseurlparseschemeloggerwarning)clsr r
r built_find_linkslinknew_linkparseds /builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/models/search_scope.pycreatezSearchScope.create s ')Ds#)$/77>>(+#D##D) y!
4DE..t4==G+NN%
F '!
Nc . || _ || _ || _ y Nr )selfr r
r s r% __init__zSearchScope.__init__C s %$
r' c j g }g }| j r| j t j gk7 r| j D ]k }t | }t j
j
| }|j s"|j st j d| |j | m |j dj dj | | j r@|j dj dj d | j D dj | S )Nz:The index url "%s" seems invalid, please provide a scheme.zLooking in indexes: {}z, zLooking in links: {}c 3 2 K | ] }t | y wr) )r ).0urls r%