� ��^i����ddlZddlZddlZddlZddlZddlmZddlm Z ddl m Z ddl m Z ddlmZmZeje��ZGd�d��ZdS) �N)�List)�canonicalize_name)�PyPI)�has_tls)�normalize_path�redact_auth_from_urlc��eZdZdZddgZedeedeeddfd���Zdeedeeddfd�Z defd�Z d edeefd �Z dS) � SearchScopezF Encapsulates the locations that pip is configured to search. � find_links� index_urls�returnc��g}|D]\}|�d��r0t|��}tj�|��r|}|�|���]t ��s^tj||��D]H}tj � |��}|j dkrt�d��n�I|||���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�parseds ��/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-4.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/models/search_scope.py�createzSearchScope.creates��')��� *� *�D����s�#�#� $�)�$�/�/���7�>�>�(�+�+�$�#�D� � #� #�D� )� )� )� )��y�y� �!�� �4D�E�E� � ����.�.�t�4�4���=�G�+�+��N�N�%���� �E� ,��s�'�!� � � � �Nc�"�||_||_dS�Nr)�selfr r s r$�__init__zSearchScope.__init__As�� %���$����r&c�r�g}g}|jr�|jtjgkr�|jD]n}t|��}tj�|��}|js"|jst� d|��|� |���o|� d� d� |������|jrJ|� d� d� d�|jD��������d� |��S)Nz:The index url "%s" seems invalid, please provide a scheme.zLooking in indexes: {}z, zLooking in links: {}c3�4K�|]}t|��V��dSr()r)�.0�urls r$� z6SearchScope.get_formatted_locations..hs+����S�S�C�2�3�7�7�S�S�S�S�S�Sr&� )r r� simple_urlrrr�urlsplitr�netlocrrr�format�joinr )r)�lines�redacted_index_urlsr.�redacted_index_url�purls r$�get_formatted_locationsz#SearchScope.get_formatted_locationsIsG���� �� �?� �t��4�?�2C�C�C��� ?� ?��%9�#�%>�%>�"��|�,�,�-?�@�@���{��4�;���N�N�T�*���� $�*�*�+=�>�>�>�>� �L�L�(�/�/�� � �:M�0N�0N�O�O� � � � �?� � �L�L�&�-�-��I�I�S�S�4�?�S�S�S�S�S��� � � � �y�y����r&� project_namec�T���dtdtf�fd� ��fd�|jD��S)z�Returns 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���tj|tj�t �������}|�d��s|dz}|S)N�/)� posixpathr5rr�quoter�endswith)r.�locr;s �r$�mkurl_pypi_urlz.mkurl_pypi_urltsV����.��V�\�'�'�(9�,�(G�(G�H�H���C��<�<��$�$� ��C�i���Jr&c�&��g|] }�|����S�rE)r-r.rCs �r$� z8SearchScope.get_index_urls_locations..�s#���?�?�?����s�#�#�?�?�?r&)�strr )r)r;rCs `@r$�get_index_urls_locationsz$SearchScope.get_index_urls_locationsmsO���� �� �� � � � � � �@�?�?�?�t��?�?�?�?r&) �__name__� __module__� __qualname__�__doc__� __slots__� classmethodrrGr%r*r:rHrEr&r$r r s����������|�,�I��% ���I�% ���I�% � � % �% �% ��[�% �N%���I�%���I�%� � %�%�%�%�" ��" �" �" �" �H@�S�@�T�#�Y�@�@�@�@�@�@r&r )r�loggingrr?� urllib.parser�typingr�pip._vendor.packaging.utilsr�pip._internal.models.indexr�pip._internal.utils.compatr�pip._internal.utils.miscrr� getLoggerrIrr rEr&r$�rWs����������� � � � ���������������9�9�9�9�9�9�+�+�+�+�+�+�.�.�.�.�.�.�I�I�I�I�I�I�I�I� �� �8� $� $��p@�p@�p@�p@�p@�p@�p@�p@�p@�p@r&