�
���c� � �r � d dl Zd dlZ G d� d� � ZdZ eeed� � � � � dS )� Nc �V � e Zd ZdZdd�Zed� � � Zd� Zd� Zd� Z d � Z
d
d
�Zd� ZdS )�VendorImporterz�
A PEP 302 meta path importer for finding optionally-vendored
or otherwise naturally-installed packages from root_name.
� Nc �v � || _ t |� � | _ |p|� dd� � | _ d S )N�extern�_vendor)� root_name�set�vendored_names�replace�
vendor_pkg)�selfr r r
s �</usr/lib/python3/dist-packages/setuptools/extern/__init__.py�__init__zVendorImporter.__init__ s9 � �"���!�.�1�1���$�N� �(9�(9�(�I�(N�(N����� c # �* K � | j dz V � dV � dS )zL
Search first the vendor package then as a natural package.
�.� N)r
�r s r �search_pathzVendorImporter.search_path s( � � � �
�o��#�#�#�#������r c � � |� | j dz � � \ }}}| o&t t |j | j � � � � S )z,Figure out if the target module is vendored.r )� partitionr �any�map�
startswithr )r �fullname�root�base�targets r �_module_matches_namespacez(VendorImporter._module_matches_namespace sH � �%�/�/����0D�E�E���d�F��x�L�C��F�$5�t�7J� K� K�L�L�Lr c �6 � |� | j dz � � \ }}}| j D ]K} ||z }t |� � t j | }|t j |< |