File: //opt/alt/python311/lib/python3.11/site-packages/setuptools/__pycache__/config.cpython-311.pyc
�
��;f_P � � � d dl mZmZ d dlZd dlZd dlZd dlZd dlZd dlm Z d dlm
Z
d dlmZ d dlm
Z
d dlmZmZ d dlmZmZ d d lmZ d d
lmZmZ eZ dd�Zd
� Zd� Z dd�Z G d� d� � Z G d� de� � Z G d� de� � Z!dS )� )�absolute_import�unicode_literalsN)�defaultdict)�partial��wraps)�
import_module)�DistutilsOptionError�DistutilsFileError)�
LegacyVersion�parse)�SpecifierSet)�string_types�PY3Fc � � ddl m}m} t j � | � � } t j � | � � st d| z � � �t j � � }t j t j �
| � � � � |� � }|r|� � � ng }| |vr|� | � � |�
||�� � t ||j |�� � }t j |� � n# t j |� � w xY wt! |� � 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 )�Distribution�
_Distributionz%Configuration file %s does not exist.)� filenames)�ignore_option_errors)�setuptools.distr r �os�path�abspath�isfiler �getcwd�chdir�dirname�find_config_files�append�parse_config_files�parse_configuration�command_options�configuration_to_dict) �filepath�find_othersr r r �current_directory�distr �handlerss �D/opt/alt/python311/lib/python3.11/site-packages/setuptools/config.py�read_configurationr* sL � �"