File: //usr/local/lib/python3.10/site-packages/setuptools/config/__pycache__/setupcfg.cpython-310.pyc
o
��inb � @ s" d Z ddlZddlZddlZddlZddlmZ ddlmZ ddlmZ ddl m
Z
mZmZm
Z
mZmZmZmZmZmZmZ ddlmZmZ ddlmZmZ dd lmZmZ dd
lmZ ddl m!Z! dd
l"m#Z# e
rvddl$m%Z% ddl&m'Z' ee(ej)f Z*e
dedef f Z+ e
de+f Z,eded d�Z- d;de*de.fdd�Z/ddde*ddfdd�Z0 d<ddde*dee* de1ded f
d!d"�Z2d#e-d$e(fd%d&�Z3d'ed de.fd(d)�Z4 d=d*dd+e,ded, fd-d.�Z5d/e(d0e(d1e6fd2d3�Z7G d4d5� d5ee- �Z8G d6d7� d7e8d8 �Z9G d9d:� d:e8d �Z:dS )>ze
Load setuptools configuration from ``setup.cfg`` files.
**API will be made private in the future**
� N)�defaultdict)�partial��wraps)�
TYPE_CHECKING�Callable�Any�Dict�Generic�Iterable�List�Optional�Tuple�TypeVar�Union)�DistutilsOptionError�DistutilsFileError)�Requirement�InvalidRequirement)�Version�InvalidVersion)�SpecifierSet)�SetuptoolsDeprecationWarning� )�expand��Distribution)�DistributionMetadata�str�Target)r r )�boundF�filepath�returnc C s8 ddl m} |� }|r|�� ng }t|| ||�}t|�S )a, Read given configuration file and returns options from it as a dict.
:param str|unicode filepath: Path to configuration file
to get options from.
:param bool find_others: Whether to search for other configuration files
which could be on in various places.
:param bool ignore_option_errors: Whether to silently ignore
options, values of which could not be resolved (e.g. due to exceptions
in directives such as file:, attr:, etc.).
If False exceptions are propagated as expected.
:rtype: dict
r r )�setuptools.distr Zfind_config_files�_apply�configuration_to_dict)r! Zfind_others�ignore_option_errorsr �dist� filenames�handlers� r* �E/usr/local/lib/python3.10/site-packages/setuptools/config/setupcfg.py�read_configuration( s
r, r'