Файловый менеджер - Редактировать - /home/digitalm/venv/lib/python3.7/site-packages/setuptools/config/__pycache__/expand.cpython-37.pyc
Назад
B �5�g�? � @ sz d Z ddlZddlZddlZddlZddlZddlZddlmZ ddl m Z ddlmZ ddl mZ ddlmZmZmZmZmZmZmZmZmZmZmZmZ ddlmZ dd lmZ dd lm Z ddl!m"Z# dd l$m%Z% e�rddl&m'Z' ddl(m)Z) ddl*m+Z+ ej,Z-ee.ej/f Z0ed�Z1eddd�Z2G dd� d�Z3dOee. ee0 ee. d�dd�Z4dPee.e5ee0 f e.d�dd�Z6ee0 ee0 d�dd�Z7ee5e0f e.d�d d!�Z8e0e.d"�d#d$�Z9dQe.eee.e.f ee0 d%�d&d'�Z:e.ee0 ed(�d)d*�Z;ee.ed+�d,d-�Z<e.eee.e.f e0ee0ee. e.f d.�d/d0�Z=dRe.eee.e.f ee0 ed1�d2d3�Z>dSee.e.f eee.e.f ee0 ee.ef d4�d5d6�Z?dddd7�eee.e.f ee0 ee. d8�d9d:�Z@e0e0e.d;�d<d=�ZAeeeee.eBf e.f e.d>�d?d@�ZCeDeDdA�dBdC�ZEdTeeFeDf ee0 eee.ee. f dD�dEdF�ZGdUe.ee.eDf dH�dIdJ�ZHG dKdL� dL�ZIG dMdN� dNee1e2f �ZJdS )Vai Utility functions to expand configuration directives or special values (such glob patterns). We can split the process of interpreting configuration files into 2 steps: 1. The parsing the file contents from strings to value objects that can be understand by Python (for example a string with a comma separated list of keywords into an actual Python list of strings). 2. The expansion (or post-processing) of these values according to the semantics ``setuptools`` assign to them (for example a configuration field with the ``file:`` directive should be expanded from a list of file paths to a single string with the contents of those files concatenated) This module focus on the second step, and therefore allow sharing the expansion functions among several configuration file formats. **PRIVATE MODULE**: API reserved for setuptools internal usage only. � N)�iglob)�ConfigParser)� ModuleSpec)�chain)� TYPE_CHECKING�Callable�Dict�Iterable�Iterator�List�Mapping�Optional�Tuple�TypeVar�Union�cast)�Path)� ModuleType)�DistutilsOptionError� )� same_path)�SetuptoolsWarning)�Distribution)�ConfigDiscovery)�DistributionMetadata�_K�_VT)Z covariantc @ sF e Zd ZdZeed�dd�Zeee j e j f d�dd�Zdd � Zd S )�StaticModulez>Proxy to a module object that avoids executing arbitrary code.)�name�specc C s. t �t�|j��� �}t| ��t� � | ` d S )N) �ast�parse�pathlibr �originZ read_bytes�vars�update�locals�self)r'