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 j e Z Gd d
d
e Z d S) N)canonicalize_name)parse)PyPI)has_tls)normalize_pathredact_auth_from_url)MYPY_CHECK_RUNNING)Listc @ sX 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 } xN | D]F } | j d rF t | } t j j | rF | } | j | q
Wt s xF t j | | D]2 } t j
| } | j d k rs t j
d Pqs W| d | 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 ospathexistsappendr itertoolschainurllib_parseurlparseschemeloggerwarning)clsr r built_find_linkslinknew_linkparsed r /builddir/build/BUILDROOT/alt-python35-pip-20.2.4-5.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/models/search_scope.pycreate s"
zSearchScope.createc C s | | _ | | _ d S)N)r r )selfr r r r r! __init__F s zSearchScope.__init__c C s g } g } | j r | j t j g k r x] | j D]R } t | } t j | } | j ry | j ry t j d | | j
| q4 W| j
d j d j | | j
r | j
d j d j d d | j
D d j | S)Nz:The index url "%s" seems invalid, please provide a scheme.zLooking in indexes: {}z, zLooking in links: {}c s s | ] } t | Vq d S)N)r ).0urlr r r!