Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/importlib/__pycache__/metadata.cpython-39.opt-1.pyc
Ðазад
a b�h#G � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl Z d dlZd dlZd dl Z d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ g d�ZG dd � d e�ZG d d� de �dd ��ZG dd� dej�ZG dd� d�ZG dd� d�ZG dd� de�Z G dd� d�Z!G dd� d�Z"G dd� de �Z#G dd� de�Z$dd� Z%d d!� Z&d"d#� Z'd$d%� Z(d&d'� Z)d(d)� Z*d*d+� Z+dS ),� N)�ConfigParser)�suppress)� import_module)�MetaPathFinder)�starmap) �Distribution�DistributionFinder�PackageNotFoundError�distribution� distributions�entry_points�files�metadata�requires�versionc @ s e Zd ZdZdS )r zThe package was not found.N)�__name__� __module__�__qualname__�__doc__� r r �3/opt/imh-python/lib/python3.9/importlib/metadata.pyr % s r c @ sn e Zd ZdZe�d�Zdd� Zedd� �Z edd� �Z ed d � �Zedd� �Z ed d� �Zdd� Zdd� ZdS )� EntryPointz�An entry point as defined by Python packaging conventions. See `the packaging docs on entry points <https://packaging.python.org/specifications/entry-points/>`_ for more information. zF(?P<module>[\w.]+)\s*(:\s*(?P<attr>[\w.]+))?\s*(?P<extras>\[.*\])?\s*$c C sD | j �| j�}t|�d��}td|�d�p,d�d��}t�t ||�S )z�Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. �moduleN�attr� �.) �pattern�match�valuer �group�filter�split� functools�reduce�getattr)�selfr r �attrsr r r �loadG s zEntryPoint.loadc C s | j �| j�}|�d�S )Nr �r r r r �r% r r r r r Q s zEntryPoint.modulec C s | j �| j�}|�d�S )Nr r( r) r r r r V s zEntryPoint.attrc C s( | j �| j�}tt�d|�d�p"d��S )Nz\w+�extrasr )r r r �list�re�finditerr r) r r r r* [ s zEntryPoint.extrasc s � �fdd��� � D �S )Nc s, g | ]$}�� |�D ]\}}� |||��qqS r ��items)�.0r �namer ��cls�configr r � <listcomp>b s �z+EntryPoint._from_config.<locals>.<listcomp>)�sectionsr2 r r2 r �_from_config` s �zEntryPoint._from_configc C sL t dd�}t|_z|�|� W n" ty@ |�t�|�� Y n0 t� |�S )N�=)Z delimiters) r �strZoptionxformZread_string�AttributeErrorZreadfp�io�StringIOr r7 )r3 �textr4 r r r � _from_texth s zEntryPoint._from_textc C s t | j| f�S )zO Supply iter so one may construct dicts of EntryPoints easily. )�iterr1 �r% r r r �__iter__t s zEntryPoint.__iter__c C s | j | j| j| jffS �N)� __class__r1 r r r@ r r r � __reduce__z s �zEntryPoint.__reduce__N)r r r r r, �compiler r'