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" Ú_get_optionE s r+ c C s<