� ,�Renb � � � 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 rddl$m%Z% ddl&m'Z' ee(ej) f Z*e dedef f Z+ e de+f Z, eded �� � Z- d4de*de.fd�Z/ddde*ddfd�Z0 d5ddde*dee* de1ded f d�Z2d e-d!e(fd"�Z3d#ed de.fd$�Z4 d6d%dd&e,ded' fd(�Z5d)e(d*e(d+e6fd,�Z7 G d-� d.ee- � � Z8 G d/� d0e8d1 � � Z9 G d2� d3e8d � � Z:dS )7ze 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 � � 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 �find_config_files�_apply�configuration_to_dict)r" �find_others�ignore_option_errorsr �dist� filenames�handlerss ��/builddir/build/BUILDROOT/alt-python311-setuptools-65.6.3-2.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/setuptools/config/setupcfg.py�read_configurationr/ ( s^ � �( -�,�,�,�,�,��<�>�>�D�,7�?��&�&�(�(�(�R�I��d�H�i�1E�F�F�H� ��*�*�*� r+ r c �N � t | |� � | � � � | S )z`Apply the configuration from a ``setup.cfg`` file into an existing distribution object. )r' �_finalize_requires)r+ r" s r. �apply_configurationr3 D s+ � � �4������������Kr0 � �other_filesr* )� ConfigHandler.c �( � ddl m} t j � |� � }t j � |� � st d|z � � �t j � � }t j t j � |� � � � g |�|�} |� | |�� � t | | j |�� � }| � � � t j |� � n# t j |� � w xY w|S )zHRead configuration from ``filepath`` and applies to the ``dist`` object.r )� _Distributionz%Configuration file %s does not exist.)r, )r* )r% r8 �os�path�abspath�isfiler �getcwd�chdir�dirname�parse_config_files�parse_configuration�command_options�_finalize_license_files)r+ r" r5 r* r8 �current_directoryr, r- s r. r' r' M s � � .�-�-�-�-�-��w���x�(�(�H� �7�>�>�(�#�#� U� �!H�8�!S�T�T�T�� �����H�R�W�_�_�X� &� &�'�'�'�(�+�(�x�(�I�$��(�(���(�C�C�C�&��$�&�=Q� � � �� �$�$�&�&�&� ��"�#�#�#�#����"�#�#�#�#�����Os �"AC9 �9D� target_obj�keyc � � dj di t � � ��}t j 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}r4 )�format�locals� functoolsr �getattr)rE rF �getter_name�by_attribute�getters r. �_get_optionrO j sP � � %�+�$�0�0�v�x�x�0�0�K��$�W�j�#�>�>�L� �Z��l� ;� ;�F��6�8�8�Or0 r- c � � t t � � }| D ]1}|j D ]'}t |j |� � }|||j |<