관리-도구
편집 파일: setupcfg.cpython-311.pyc
� N�Dg�c � �� � d Z ddlZddlZddlZddlmZ ddlmZ ddlmZ ddlm Z m Z mZmZm Z mZmZmZmZmZmZmZ ddlmZmZ dd lmZ dd lmZmZ ddlmZ ddl m!Z!m"Z" dd l#m$Z$ ddl%m&Z& e rddl'm(Z( ddl)m*Z* ee+ej, f Z-ededef f Z. ede.f Z/ eded �� � Z0 d:de-de1fd�Z2ddde-ddfd�Z3 d;ddde-dee- de4ded f d!�Z5d"e0d#e+fd$�Z6d%ed de1fd&�Z7 d<d'dd(e/ded) fd*�Z8d+e+d,e+d-e9fd.�Z: G d/� d0e e0 � � Z; G d1� d2e;d3 � � Z< G d4� d5e;d � � Z= G d6� d7e$� � Z> G d8� d9e$� � Z?dS )=a< Load setuptools configuration from ``setup.cfg`` files. **API will be made private in the future** To read project metadata, consider using ``build.util.project_wheel_metadata`` (https://pypi.org/project/build/). For simple scenarios, you can also try parsing the file directly with the help of ``configparser``. � N)�defaultdict)�partial��wraps)� TYPE_CHECKING�Callable�Any�Dict�Generic�Iterable�List�Optional�Set�Tuple�TypeVar�Union� )� FileError�OptionError)�default_environment)�InvalidRequirement�Requirement)�SpecifierSet)�InvalidVersion�Version)�SetuptoolsDeprecationWarning� )�expand)�DistributionMetadata��Distribution�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 �z/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/setuptools/config/setupcfg.py�read_configurationr2 8 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 r1 �apply_configurationr6 R s+ � � �4������������Kr3 � �other_filesr- )� ConfigHandler.c �* � ddl m} t j � |� � }t j � |� � st d|� d�� � �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 )� _DistributionzConfiguration file z does not exist.)r/ )r- )r( r; �os�path�abspath�isfiler �getcwd�chdir�dirname�parse_config_files�parse_configuration�command_options�_finalize_license_files)r. r% r8 r- r; �current_directoryr/ r0 s r1 r* r* [ s � � .�-�-�-�-�-��w���x�(�(�H� �7�>�>�(�#�#� J��H�h�H�H�H�I�I�I�� �����H�R�W�_�_�X� &� &�'�'�'�(�+�(�x�(�I�$��(�(���(�C�C�C�&��$�&�=Q� � � �� �$�$�&�&�&� ��"�#�#�#�#����"�#�#�#�#�����Os �#AC: �:D� target_obj�keyc �x � d|� �}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. �get_)� functoolsr �getattr)rH rI �getter_name�by_attribute�getters r1 �_get_optionrQ y s? � � ��,�,�K��$�W�j�#�>�>�L� �Z��l� ;� ;�F��6�8�8�Or3 r0 c � � t t � � }| D ]1}|j D ]'}t |j |� � }|||j |<