AlkantarClanX12
Current Path : /lib/python3.8/site-packages/setuptools/__pycache__/ |
Current File : //lib/python3.8/site-packages/setuptools/__pycache__/config.cpython-38.pyc |
U �Qab6P � @ s� 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 eZddd �Zdd� Zdd� Zddd�ZG dd� d�ZG dd� de�Z G dd� de�Z!dS )� )�absolute_import�unicode_literalsN)�defaultdict)�partial��wraps)� import_module)�DistutilsOptionError�DistutilsFileError)� LegacyVersion�parse)�SpecifierSet)�string_types�PY3Fc C s� ddl m}m} tj�| �} tj�| �s4td| ��t�� }t� tj� | �� zJ|� }|rb|�� ng }| |krx|�| � |j ||d� t||j|d�}W 5 t� |� X 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 )�Distribution� _Distributionz%Configuration file %s does not exist.)� filenames)�ignore_option_errors)Zsetuptools.distr r �os�path�abspath�isfiler �getcwd�chdir�dirnameZfind_config_files�appendZparse_config_files�parse_configuration�command_options�configuration_to_dict) �filepathZfind_othersr r r Zcurrent_directoryZdistr �handlers� r! �5/usr/lib/python3.8/site-packages/setuptools/config.py�read_configuration s* � � r# c C s. dj f t� �}t�t| |�}t| ||�}|� S )z� Given a target object and option key, get that option from the target object, either through a get_{key} method or from an attribute directly. z get_{key})�format�locals� functoolsr �getattr)� target_obj�keyZgetter_nameZby_attribute�getterr! r! r"