Current File : //lib/python3.9/site-packages/setuptools/extern/__pycache__/__init__.cpython-39.pyc
a

��kh��@s.ddlZGdd�d�ZdZeeed���dS)�Nc@sPeZdZdZddd�Zedd��Zddd	�Zd
d�Zdd
�Z	dd�Z
dd�ZdS)�VendorImporterz�
    A PEP 302 meta path importer for finding optionally-vendored
    or otherwise naturally-installed packages from root_name.
    �NcCs&||_t|�|_|p|�dd�|_dS)NZexternZ_vendor)�	root_name�set�vendored_names�replace�
vendor_pkg)�selfrrrrr�>/usr/lib/python3.9/site-packages/setuptools/extern/__init__.py�__init__
s
zVendorImporter.__init__ccs|jdVdVdS)zL
        Search first the vendor package then as a natural package.
        �.�N)r�r	rrr
�search_pathszVendorImporter.search_pathcCs8|�|jd�\}}}|rdStt|j|j��s4dS|S)z�
        Return self when fullname starts with root_name and the
        target module is one vendored through this importer.
        rN)�	partitionr�any�map�
startswithr)r	�fullname�path�root�base�targetrrr
�find_moduleszVendorImporter.find_modulec	Cs~|�|jd�\}}}|jD]F}z.||}t|�tj|}|tj|<|WSty`Yq0qtdjfit�����dS)zK
        Iterate over the search path to locate and load fullname.
        rz�The '{target}' package is required; normally this is bundled with this package so if you get this warning, consult the packager of your distribution.N)	rrr�
__import__�sys�modules�ImportError�format�locals)r	rrrr�prefixZextant�modrrr
�load_module#s



��zVendorImporter.load_modulecCs|�|j�S�N)r"�name)r	�specrrr
�
create_module9szVendorImporter.create_modulecCsdSr#r)r	�modulerrr
�exec_module<szVendorImporter.exec_modulecCs|tjvrtj�|�dS)zR
        Install this importer into sys.meta_path if not already present.
        N)r�	meta_path�appendrrrr
�install?s
zVendorImporter.install)rN)N)�__name__�
__module__�__qualname__�__doc__r�propertyrrr"r&r(r+rrrr
rs


r)Z	packagingZ	pyparsingZordered_setzsetuptools._vendor)rr�namesr,r+rrrr
�<module>sC