HEX
Server: LiteSpeed
System: Linux us-phx-web1284.main-hosting.eu 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: u300739242 (300739242)
PHP: 8.2.30
Disabled: system, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/alt/python311/lib/python3.11/site-packages/setuptools/__pycache__/config.cpython-311.pyc
�

��;f_P�� �ddlmZmZddlZddlZddlZddlZddlZddlm	Z	ddlm
Z
ddlmZddlm
Z
ddlmZmZddlmZmZdd	lmZdd
lmZmZeZ	dd�Zd
�Zd�Z	dd�ZGd�d��ZGd�de��Z Gd�de��Z!dS)�)�absolute_import�unicode_literalsN)�defaultdict)�partial��wraps)�
import_module)�DistutilsOptionError�DistutilsFileError)�
LegacyVersion�parse)�SpecifierSet)�string_types�PY3Fc��ddlm}m}tj�|��}tj�|��std|z���tj��}tj	tj�
|����	|��}|r|���ng}||vr|�|��|�
||���t||j|���}tj	|��n#tj	|��wxYwt!|��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.distrr�os�path�abspath�isfiler�getcwd�chdir�dirname�find_config_files�append�parse_config_files�parse_configuration�command_options�configuration_to_dict)	�filepath�find_othersrrr�current_directory�distr�handlerss	         �D/opt/alt/python311/lib/python3.11/site-packages/setuptools/config.py�read_configurationr*sL��"<�;�;�;�;�;�;�;��w���x�(�(�H�
�7�>�>�(�#�#�@� �3�h�>�@�@�	@��	�����H�R�W�_�_�X�
&�
&�'�'�'�$��|�~�~��0;�C�D�*�*�,�,�,��	��9�$�$����X�&�&�&��(�(���(�C�C�C�&��$�&�!5�7�7�7��
	��"�#�#�#�#����"�#�#�#�#���� ��*�*�*s
�A)D�D2c��djdit����}tjt||��}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�key�getter_name�by_attribute�getters     r)�_get_optionr6EsP��%�+�$�0�0�v�x�x�0�0�K��$�W�j�#�>�>�L�
�Z��l�
;�
;�F��6�8�8�O�c��tt��}|D]1}|jD]'}t|j|��}|||j|<�(�2|S)z�Returns configuration data gathered by given handlers as a dict.

    :param list[ConfigHandler] handlers: Handlers list,
        usually from parse_configuration()

    :rtype: dict
    )r�dict�set_optionsr6r1�section_prefix)r(�config_dict�handler�option�values     r)r#r#Qsk���d�#�#�K��@�@���)�	@�	@�F��� 2�F�;�;�E�:?�K��.�/��7�7�	@��r7c��t|||��}|���t|j|||j��}|���||fS)a�Performs additional parsing of configuration options
    for a distribution.

    Returns a list of used option handlers.

    :param Distribution distribution:
    :param dict command_options:
    :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: list
    )�ConfigOptionsHandlerr
�ConfigMetadataHandler�metadata�package_dir)�distributionr"r�options�metas     r)r!r!csa��#��o�';�=�=�G��M�M�O�O�O� ����0D�� �"�"�D�	�J�J�L�L�L���=�r7c�6�eZdZdZdZ	iZ	dd�Zed���Zd�Z	e
dd���Ze
d	���Ze
d
���Z
e
d���Ze
d���Zed
���Zed���Ze
dd���Ze
d���Ze
dd���Zd�Zd�Zd�ZdS)�
ConfigHandlerz1Handles metadata supplied in configuration files.NFc��i}|j}|���D]I\}}|�|��s�|�|d���d��}|||<�J||_||_||_g|_dS)N��.)	r;�items�
startswith�replace�striprr1�sectionsr:)�selfr1rFrrQr;�section_name�section_optionss        r)�__init__zConfigHandler.__init__�s������,��-4�]�]�_�_�	5�	5�)�L�/��*�*�>�:�:�
��'�/�/���C�C�I�I�#�N�N�L�%4�H�\�"�"�$8��!�$��� ��
�����r7c�:�td|jjz���)�.Metadata item name to parser function mapping.z!%s must provide .parsers property)�NotImplementedError�	__class__�__name__)rRs r)�parserszConfigHandler.parsers�s&��"�/�$�.�2I�I�K�K�	Kr7c���t��}|j}|j�||��}t	|||��}||urt|���|rdSd}|j�|��}|r'	||��}n#t$r
d}|js�YnwxYw|rdSt	|d|zd��}|�t|||��n||��|j
�|��dS)NFTzset_%s)�tupler1�aliases�getr0�KeyErrorr[�	Exceptionr�setattrr:r)	rR�option_namer?�unknownr1�
current_value�skip_option�parser�setters	         r)�__setitem__zConfigHandler.__setitem__�s9���'�'���_�
��l�&�&�{�K�@�@���
�K��A�A�
��G�#�#��;�'�'�'��	��F�����!�!�+�.�.���	�
���u�
�
�����
�
�
�"���0�����
����
�	��F���X��%;�T�B�B���>��J��U�3�3�3�3��F�5�M�M�M������,�,�,�,�,s�8B�B�B�,c��t|t��r|Sd|vr|���}n|�|��}d�|D��S)z�Represents value as a list.

        Value is split either by separator (defaults to comma) or by lines.

        :param value:
        :param separator: List items separator character.
        :rtype: list
        �
c�^�g|]*}|����|�����+Sr,)rP)�.0�chunks  r)�
<listcomp>z-ConfigHandler._parse_list.<locals>.<listcomp>�s-��B�B�B�%�E�K�K�M�M�B����
�
�B�B�Br7)�
isinstance�list�
splitlines�split)�clsr?�	separators   r)�_parse_listzConfigHandler._parse_list�s\���e�T�"�"�	��L��5�=�=��$�$�&�&�E�E��K�K�	�*�*�E�B�B�5�B�B�B�Br7c���d}i}|�|��D]\}|�|��\}}}||krtd|z���|���||���<�]|S)zPRepresents value as a dict.

        :param value:
        :rtype: dict
        �=z(Unable to parse option value to dict: %s)rw�	partitionr
rP)rur?rv�result�liner2�sep�vals        r)�_parse_dictzConfigHandler._parse_dict�s����	����O�O�E�*�*�	.�	.�D� �N�N�9�5�5�M�C��c��i���*�>��F�H�H�H�"%�)�)�+�+�F�3�9�9�;�;����
r7c�2�|���}|dvS)zQRepresents value as boolean.

        :param value:
        :rtype: bool
        )�1�true�yes)�lower)rur?s  r)�_parse_boolzConfigHandler._parse_bool�s�����
�
���,�,�,r7c����fd�}|S)z�Returns a parser function to make sure field inputs
        are not files.

        Parses a value after getting the key so error messages are
        more informative.

        :param key:
        :rtype: callable
        c�z��d}|�|��r"td�������|S)N�file:zCOnly strings are accepted for the {0} field, files are not accepted)rN�
ValueErrorr-)r?�exclude_directiver2s  �r)rgz3ConfigHandler._exclude_files_parser.<locals>.parsersI��� '����� 1�2�2�
:� �-�-3�V�C�[�[�:�:�:��Lr7r,)rur2rgs ` r)�_exclude_files_parserz#ConfigHandler._exclude_files_parser�s#���	�	�	�	�	��
r7c���d}t|t��s|S|�|��s|S|t|��d�}d�|�d��D��}d��fd�|D����S)aORepresents value as a string, allowing including text
        from nearest files using `file:` directive.

        Directive is sandboxed and won't reach anything outside
        directory with setup.py.

        Examples:
            file: README.rst, CHANGELOG.md, src/file.txt

        :param str value:
        :rtype: str
        r�Nc3�xK�|]5}tj�|�����V��6dS�N)rrrrP)rnrs  r)�	<genexpr>z,ConfigHandler._parse_file.<locals>.<genexpr>%s8����O�O�t�R�W�_�_�T�Z�Z�\�\�2�2�O�O�O�O�O�Or7rjrlc3��K�|]O}��|��s		tj�|���8��|��V��PdS)TN)�
_assert_localrrr�
_read_file)rnrrus  �r)r�z,ConfigHandler._parse_file.<locals>.<genexpr>&sy�����
�
���!�!�$�'�'�
�,0�
�����t�$�$�	
��N�N�4� � �
�
�
�
�
�
r7)rqrrN�lenrt�join)rur?�include_directive�spec�	filepathss`    r)�_parse_filezConfigHandler._parse_files����$���%��.�.�	��L���� 1�2�2�	��L��S�*�+�+�,�,�-��O�O�t�z�z�#���O�O�O�	��y�y�
�
�
�
�!�
�
�
�
�
�	
r7c�v�|�tj����std|z���dS)Nz#`file:` directive can not access %s)rNrrr
)r$s r)r�zConfigHandler._assert_local-sH���"�"�2�9�;�;�/�/�	B�&�5��@�B�B�
B�	B�	Br7c��tj|d���5}|���cddd��S#1swxYwYdS)Nzutf-8)�encoding)�io�open�read)r$�fs  r)r�zConfigHandler._read_file3s���
�W�X��
0�
0�
0�	�A��6�6�8�8�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�8�<�<c��d}|�|��s|S|�|d������d��}|���}d�|��}|pd}t
j��}|r�|d|vrz||d}|�dd��}	t|	��dkr@tj
�t
j��|	d��}|	d}n>|}n;d|vr7tj
�t
j��|d��}tj
�d|��	t|��}
t|
|��}tj
dd�t_
n##tj
dd�t_
wxYw|S)	z�Represents value as a module attribute.

        Examples:
            attr: package.attr
            attr: package.module.attr

        :param str value:
        :rtype: str
        zattr:rKrLrUr�/�N)rNrOrPrt�popr�rr�rsplitr�r�sys�insertr	r0)rur?rD�attr_directive�
attrs_path�	attr_name�module_name�parent_path�custom_path�parts�modules           r)�_parse_attrzConfigHandler._parse_attr8s���!������/�/�	��L��]�]�>�2�6�6�<�<�>�>�D�D�S�I�I�
��N�N�$�$�	��h�h�z�*�*��!�/�Z���i�k�k���	I��!�}��+�+�)�*�Q�-�8��#�*�*�3��2�2���u�:�:��>�>�"$�'�,�,�r�y�{�{�E�!�H�"E�"E�K�"'��(�K�K�"-�K�K��{�"�"� �g�l�l�2�9�;�;��B��H�H�������;�'�'�'�	$�"�;�/�/�F��F�I�.�.�E��x����|�C�H�H��s�x����|�C�H�#�#�#�#��s�7F5�5 Gc����fd�}|S)z�Returns parser function to represents value as a list.

        Parses a value applying given methods one after another.

        :param parse_methods:
        :rtype: callable
        c�,��|}�D]
}||��}�|Sr�r,)r?�parsed�method�
parse_methodss   �r)r
z1ConfigHandler._get_parser_compound.<locals>.parsens+����F�'�
(�
(����������Mr7r,)rur�r
s ` r)�_get_parser_compoundz"ConfigHandler._get_parser_compoundes#���	�	�	�	�	��r7c�j�i}|pd�}|���D]\}\}}||��||<�|S)z�Parses section options into a dictionary.

        Optionally applies a given parser to values.

        :param dict section_options:
        :param callable values_parser:
        :rtype: dict
        c��|Sr�r,)r~s r)�<lambda>z6ConfigHandler._parse_section_to_dict.<locals>.<lambda>�s��c�r7)rM)rurT�
values_parserr?r2�_r~s       r)�_parse_section_to_dictz$ConfigHandler._parse_section_to_dictxsR����%�:�/�/�
�,�2�2�4�4�	,�	,�M�C��!�S�&��s�+�+�E�#�J�J��r7c�l�|���D]\}\}}	|||<�#t$rY�wxYwdS)zQParses configuration file section.

        :param dict section_options:
        N)rMr`)rRrT�namer�r?s     r)�
parse_sectionzConfigHandler.parse_section�sb��
#2�"7�"7�"9�"9�	�	��T�:�A�u�
�"��T�
�
���
�
�
���
����		�	s�$�
1�1c��|j���D]^\}}d}|rd|z}t|d|z�dd��d��}|�t	d|j�d|�d����||���_dS)	zTParses configuration file items from one
        or more related sections.

        rKz_%szparse_section%srL�__Nz*Unsupported distribution option section: [�])rQrMr0rOr
r;)rRrSrT�method_postfix�section_parser_methods     r)r
zConfigHandler.parse�s���
.2�]�-@�-@�-B�-B�	3�	3�)�L�/��N��
6�!&��!5��$+��"�^�3�<�<�S�$�G�G��	%�%�!�%�,�*�*��+�+�+�\�\�\�;�<�<�<�
"�!�/�2�2�2�2�#	3�	3r7c�D����t������fd���}|S)z� this function will wrap around parameters that are deprecated

        :param msg: deprecation message
        :param warning_class: class of warning exception to be raised
        :param func: function to be wrapped around
        c�>��tj�����|i|��Sr�)�warnings�warn)�args�kwargs�func�msg�
warning_classs  ���r)�config_handlerz@ConfigHandler._deprecated_config_handler.<locals>.config_handler�s*����M�#�}�-�-�-��4��(��(�(�(r7r)rRr�r�r�r�s ``` r)�_deprecated_config_handlerz(ConfigHandler._deprecated_config_handler�sB�����
�t���	)�	)�	)�	)�	)�	)�
��	)��r7�F)rjr�)rZ�
__module__�__qualname__�__doc__r;r^rU�propertyr[ri�classmethodrwrr�r�r��staticmethodr�r�r�r�r�r�r
r�r,r7r)rIrI~s�������;�;��N��
�G������ �K�K��X�K�
$-�$-�$-�L�C�C�C��[�C�&����[��"�-�-��[�-�����[��&�
�
��[�
�<�B�B��\�B�
����\���*�*�*��[�*�X����[��$�
�
�
��[�
�
�
�
�3�3�3�0����r7rIc�X��eZdZdZddddd�ZdZ			d�fd	�	Zed
���Zd�Z	�xZ
S)
rBrC�url�description�classifiers�	platforms)�	home_page�summary�
classifier�platformFNc�j��tt|���|||��||_dSr�)�superrBrUrD)rRr1rFrrDrYs     �r)rUzConfigMetadataHandler.__init__�s>���
�#�T�*�*�3�3�J��4H�	J�	J�	J�&����r7c
���|j}|j}|j}|j}||||�|dt
��||�||��|d��||||j|d�S)rWz[The requires parameter is deprecated, please use install_requires for runtime dependencies.�license)r��keywords�provides�requires�	obsoletesr�r��
license_filesr��long_description�version�project_urls)rwr�rr�r��DeprecationWarningr��_parse_version)rR�
parse_list�
parse_file�
parse_dict�exclude_files_parsers     r)r[zConfigMetadataHandler.parsers�s����%�
��%�
��%�
�#�9��$�"�"��7�7��=�"�	$�$�
$��4�4�Z��L�L�+�+�I�6�6�'�%� *��*�&�!
�
�	
r7c�
�|�|��}||kr`|���}tt|��t��r(d}t|jdit�������|S|�||j	��}t|��r
|��}t|t��s>t|d��r)d�
tt|����}nd|z}|S)zSParses `version` option value.

        :param value:
        :rtype: str

        zCVersion loaded from {value} does not comply with PEP 440: {version}�__iter__rLz%sr,)r�rPrqr
rr
r-r.r�rD�callabler�hasattrr��map�str)rRr?r��tmpls    r)r�z$ConfigMetadataHandler._parse_version�s���"�"�5�)�)���e����m�m�o�o�G��%��.�.�-�8�8�
D�5��+�;�4�;�+B�+B����+B�+B�C�C�C��N��"�"�5�$�*:�;�;���G���	 ��g�i�i�G��'�<�0�0�	)��w�
�+�+�
)��(�(�3�s�G�#4�#4�5�5�����.���r7)FN)rZr�r�r;r^�strict_moderUr�r[r��
__classcell__)rYs@r)rBrB�s���������N�� �#��	��G��K��
BG�!�'�'�'�'�'�'��
�
��X�
�4!�!�!�!�!�!�!r7rBc�X�eZdZdZed���Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
dS)rArFc���|j}t|jd���}|j}|j}id|�d|�d|�d|�d|�d|�d	|�d
|�d|�d|�d
|�d|�d|�d|�d|j�d|j�d|�dti�S)rW�;�rv�zip_safe�use_2to3�include_package_datarD�use_2to3_fixers�use_2to3_exclude_fixers�convert_2to3_doctests�scripts�eager_resources�dependency_links�namespace_packages�install_requires�setup_requires�
tests_require�packages�entry_points�
py_modules�python_requires)rwrr�r�_parse_packagesr�r)rRr��parse_list_semicolon�
parse_boolr�s     r)r[zConfigOptionsHandler.parserss���%�
�&�t�'7�3�G�G�G���%�
��%�
�
��
�
��
�
�
#�J�
�
�:�	
�

�z�
�
&�z�

�
$�Z�
�
�z�
�
�z�
�
�
�
�
!�*�
�
� 4�
�
�2�
�
�1�
�
��,�
� 
�D�,�!
�"
�*�#
�$
�|�%
�
�	
r7c�6�ddg}|���}||vr|�|��S||dk}|rtstd���|�|j�di����}|rddlm}nddlm	}|d	i|��S)
zTParses `packages` option value.

        :param value:
        :rtype: list
        zfind:zfind_namespace:r�z8find_namespace: directive is unsupported on Python < 3.3z
packages.findr)�find_namespace_packages)�
find_packagesr,)
rPrwrr
�parse_section_packages__findrQr_�
setuptoolsrr)rRr?�find_directives�
trimmed_value�findns�find_kwargsrs       r)rz$ConfigOptionsHandler._parse_packages2s���#�$5�6�����
�
�
���/�/��#�#�E�*�*�*��/�!�"4�4���	L�#�	L�&�J�L�L�
L��7�7��M���o�r�2�2�4�4���	1�K�K�K�K�K�K�K�0�0�0�0�0�0��}�+�+�{�+�+�+r7c����|�||j��}gd��t�fd�|���D����}|�d��}|�|d|d<|S)z�Parses `packages.find` configuration file section.

        To be used in conjunction with _parse_packages().

        :param dict section_options:
        )�where�include�excludec�*��g|]\}}|�v�	|�||f��Sr,r,)rn�k�v�
valid_keyss   �r)rpzEConfigOptionsHandler.parse_section_packages__find.<locals>.<listcomp>[s*���N�N�N���1��Z���A��a��V���r7rNr)r�rwr9rMr_)rRrT�section_datarrr"s     @r)rz1ConfigOptionsHandler.parse_section_packages__findNs�����2�2��T�-�/�/��5�4�4�
��N�N�N�N�� 2� 2� 4� 4�N�N�N�P�P������(�(����#(��8�K�� ��r7c�F�|�||j��}||d<dS)z`Parses `entry_points` configuration file section.

        :param dict section_options:
        rN)r�rw�rRrTr�s   r)�parse_section_entry_pointsz/ConfigOptionsHandler.parse_section_entry_pointscs,��
�,�,�_�d�>N�O�O��%��^���r7c�z�|�||j��}|�d��}|r||d<|d=|S)N�*rK)r�rwr_)rRrTr��roots    r)�_parse_package_dataz(ConfigOptionsHandler._parse_package_dataksF���,�,�_�d�>N�O�O���z�z�#�����	��F�2�J��s���
r7c�6�|�|��|d<dS)z`Parses `package_data` configuration file section.

        :param dict section_options:
        �package_dataN�r*�rRrTs  r)�parse_section_package_dataz/ConfigOptionsHandler.parse_section_package_dataus"��
 $�7�7��H�H��^���r7c�6�|�|��|d<dS)zhParses `exclude_package_data` configuration file section.

        :param dict section_options:
        �exclude_package_dataNr-r.s  r)�"parse_section_exclude_package_dataz7ConfigOptionsHandler.parse_section_exclude_package_data|s(��
(,�'?�'?��(�(��
#�$�$�$r7c�d�t|jd���}|�||��|d<dS)zbParses `extras_require` configuration file section.

        :param dict section_options:
        r�r��extras_requireN)rrwr�)rRrTr�s   r)�parse_section_extras_requirez1ConfigOptionsHandler.parse_section_extras_require�s?��
�T�-��=�=�=�
�!%�!<�!<��Z�")�")��
���r7c�~�|�||j��}d�|���D��|d<dS)z^Parses `data_files` configuration file section.

        :param dict section_options:
        c��g|]	\}}||f��
Sr,r,)rnr r!s   r)rpzAConfigOptionsHandler.parse_section_data_files.<locals>.<listcomp>�s ��@�@�@���A�q�!�f�@�@�@r7�
data_filesN)r�rwrMr%s   r)�parse_section_data_filesz-ConfigOptionsHandler.parse_section_data_files�sB��
�,�,�_�d�>N�O�O��@�@������@�@�@��\���r7N)rZr�r�r;r�r[rrr&r*r/r2r5r9r,r7r)rArAs��������N�
�
�
��X�
�8,�,�,�8���*&�&�&����I�I�I����)�)�)�A�A�A�A�Ar7rA)FFr�)"�
__future__rrr�rr�r�r/�collectionsrrr�	importlibr	�distutils.errorsr
r�#setuptools.extern.packaging.versionrr
�&setuptools.extern.packaging.specifiersr�setuptools.extern.sixrr�type�
__metaclass__r*r6r#r!rIrBrAr,r7r)�<module>rCs���8�8�8�8�8�8�8�8�	�	�	�	�	�	�	�	�
�
�
�
���������#�#�#�#�#�#�������������#�#�#�#�#�#�E�E�E�E�E�E�E�E�D�D�D�D�D�D�D�D�?�?�?�?�?�?�3�3�3�3�3�3�3�3��
�;@�,+�,+�,+�,+�^	�	�	����&=B�����6z�z�z�z�z�z�z�z�z	S�S�S�S�S�M�S�S�S�lBA�BA�BA�BA�BA�=�BA�BA�BA�BA�BAr7