관리-도구
편집 파일: __init__.cpython-311.pyc
� �܋f3 � � � d dl mZ d dlmZ d dlZd dlZd dlmZ d dl m Z mZ G d� d� � ZdZ eee � � � � � dS ) � )�annotations)� ModuleSpecN)� ModuleType)�Iterable�Sequencec �h � e Zd ZdZ ddd �Zed� � � Zd� Zdd�Zdd�Z dd�Z d d!d�Zd� ZdS )"�VendorImporterz� A PEP 302 meta path importer for finding optionally-vendored or otherwise naturally-installed packages from root_name. � N� root_name�str�vendored_names� Iterable[str]� vendor_pkg� str | Nonec �v � || _ t |� � | _ |p|� dd� � | _ d S )N�extern�_vendor)r �setr �replacer )�selfr r r s �T/opt/cloudlinux/venv/lib64/python3.11/site-packages/pkg_resources/extern/__init__.py�__init__zVendorImporter.__init__ s; � � #���!�.�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 r$ c �8 � |� | j dz � � \ }}}| j D ]L}||z } t |� � n# t $ r Y �$w xY wt j | }|t j |<