HOME


Mini Shell 1.0
DIR: /snap/certbot/4557/lib64/python3.12/site-packages/setuptools/__pycache__/
Upload File :
Current File : //snap/certbot/4557/lib64/python3.12/site-packages/setuptools/__pycache__/dist.cpython-312.pyc
�

�M�ga���,�UddlmZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
mZmZm
Z
ddlmZddlmZddlmZmZmZddlmZmZddlmZmZdd	lmZmZdd
lmZddl m!Z!m"Z"m#Z#m$Z%dd
l&m'Z'ddl(m)Z)ddl*m+Z+ddl"m,Z,ddl-m.Z.m/Z/ddl0m1Z1ddl2m3Z3ddl4m5Z5ddl6m7Z7m8Z8ddl9Z:ddl;Z:ddl<Z:ddl=Z:ddl>Z:ddl?m@Z@ddlAmBZBmCZCddlDmEZEddlFmGZGerddlHmIZIddlJmKZLdgZMeNeOfZP	eeNeQdfeOeQfZRdeSd<d ZTeeQeUeQefe
eQfZVdeSd!<	d4d"�ZWd#�ZXd5d$�ZYd%�ZZd&�Z[d'�Z\d(�Z]d)�Z^d*�Z_d6d+�Z`d,�Zad-�Zbd.�Zcd/�Zderddl<mKZene5e:j�j��ZeGd0�dee�ZKej�d7d1��ZhGd2�d3e8�Ziy)8�)�annotationsN)�Iterable�Iterator�MutableMapping�Sequence)�glob)�Path)�
TYPE_CHECKING�Any�Union)�	partition�unique_everseen)�
InvalidMarker�Marker)�InvalidSpecifier�SpecifierSet)�Version�)�
_entry_points�_reqs�_static�command)�metadata)� _canonicalize_license_expression)�StrPath)�
_StrOrIter)�
pyprojecttoml�setupcfg)�ConfigDiscovery)�InvalidConfigError)�
get_unpatched)�InformationOnly�SetuptoolsDeprecationWarning)�DEBUG)�DistutilsOptionError�DistutilsSetupError)�translate_longopt)�	strtobool)�	TypeAlias)�Distributionr*.r)�	_Sequenceztuple[str, ...] | list[str]�_OrderedStrSequencec�r�|dk(rtjddd��tStdt�d|����)N�sequencez@`setuptools.dist.sequence` is an internal implementation detail.z8Please define your own `sequence = tuple, list` instead.)i���)�due_datezmodule z has no attribute )r#�emit�	_sequence�AttributeError�__name__��names �/build/snapcraft-certbot-2c33630aaf29c47357e5a1683f659d3d/parts/certbot/install/lib/python3.12/site-packages/setuptools/dist.py�__getattr__r9KsB���z��$�)�)�N�F�"�	
�
��
�7�8�,�.@���I�
J�J�c��	tj|dd��}|jrJ�y#ttt
tf$r}t|�d|�d��|�d}~wwxYw)N)�valuer7�groupz/ must be importable 'module:attrs' string (got �))r�
EntryPoint�extras�	TypeError�
ValueErrorr4�AssertionErrorr&)�dist�attrr<�ep�es     r8�check_importablerHVsc���
�
 �
 �u�4�t�
D���9�9��}�9���z�>�>�B��!��h�E�e�Y�a�P�
��	���s�&)�A�A�Ac	���	t|t�sJ�dj|�|k7sJ�y#ttt
tf$r}t|�dt�d|�d��|�d}~wwxYw)z"Verify that value is a string list�z must be of type <�> (got r>N)	�
isinstancer3�joinrArBr4rCr&�_sequence_type_repr�rDrEr<rGs    r8�assert_string_listrP`sq��	��%��+�+�+��w�w�u�~��&�&�&���z�>�>�B��!��h�(�)<�(=�W�U�I�Q�O�
��	���s�(+�A"�A�A"c��|}t|||�|D]u}|j|�std|����|jd�\}}}|r%||vr!tj
j
d||�tjddd���wy)	z(Verify that namespace packages are validzCDistribution contains no modules or packages for namespace package �.z^WARNING: %r is declared as a package namespace, but %r is not: please correct this in setup.pyz/The namespace_packages parameter is deprecated.z<Please replace its usage with implicit namespaces (PEP 420).z3references/keywords.html#keyword-namespace-packages)�see_docsN)	rP�has_contents_forr&�
rpartition�	distutils�log�warnr#r2)rDrEr<�ns_packages�nsp�parent�_sep�_childs        r8�	check_nspr^ns����K��t�T�;�/��
���$�$�S�)�%�U�VY�U\�]��
� #�~�~�c�2����f��f�K�/��M�M���;���	
�	%�)�)�=�J�J�	
�
r:c��	ttjt|j	���y#t
ttf$r}td�|�d}~wwxYw)z+Verify that extras_require mapping is validz�'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.N)	�list�	itertools�starmap�_check_extra�itemsrArBr4r&rOs    r8�check_extrasre�sP����Y�
�
�|�U�[�[�]�
;�<���z�>�2��!�
&�
��		���s�14�A�A�Ac���|jd�\}}}	t|�t	tj|��y#t$rd|�d|�d�}t|�d�wxYw)N�:zInvalid environment marker: z (r>)r
�
_check_markerrr&r`r�parse)�extra�reqs�_namer\�marker�msgs      r8rcrc�si���/�/�#�.��E�4��1��f��	����T�	����1�,�V�H�B�u�i�q�A��!�#�&�D�0�1�s�A�A c�@�|syt|�}|j�y�N)r�evaluate)rm�ms  r8rhrh�s�����v��A��J�J�Lr:c�B�t|�|k7rt|�d|�d���y)z)Verify that value is True, False, 0, or 1z must be a boolean value (got r>N)�boolr&�rDrEr<s   r8�assert_boolrv�s-���E�{�e��!�T�H�,J�5�)�ST�"U�V�V�r:c�T�|stj|�d��yt|�d���)Nz is ignored.z is invalid.)�DistDeprecationWarningr2r&rus   r8�invalid_unless_falsery�s/����#�#�t�f�L�$9�:��
���l�3�
4�4r:c���	ttj|��t|t�rtd��y#t
tf$r}|�d|��}t|�|�d}~wwxYw)z9Verify that install_requires is a valid requirements listzUnordered types are not allowedzb must be a string or iterable of strings containing valid project/version requirement specifiers; N)r`rrirL�setrArBr&�rDrEr<�errorrns     r8�check_requirementsr~�sr��	2��U�[�[��
� ��e�S�!��=�>�>�"���z�"�2��h�H�HM�w�
P�	�"�#�&�E�1��2�s�9<�A#�A�A#c�p�	t|�y#ttf$r}|�d|��}t|�|�d}~wwxYw)z.Verify that value is a valid version specifierz7 must be a string containing valid version specifiers; N)rrr4r&r|s     r8�check_specifierr��sC��2��U����n�-�2���O�PU�w�W��!�#�&�E�1��2�s��5�0�5c�j�	tj|�y#t$r}t|�|�d}~wwxYw)z)Verify that entry_points map is parseableN)r�load�	Exceptionr&rOs    r8�check_entry_pointsr��s2��,����5�!���,�!�!�$�!�+��,�s��	2�-�2c���t|t�st|�d���|j�D]8\}}t|t�std|�d|�d���t|d|�d�|��:y)z@Verify that value is a dictionary of package names to glob listszP must be a dictionary mapping package names to lists of string wildcard patternszkeys of z dict must be strings (got r>z
values of z dictN)rL�dictr&rd�strrP)rDrEr<�k�vs     r8�check_package_datar��s����e�T�"�!��h�'�
'�
�	
����
�@���1��!�S�!�%��4�(�"=�a�U�!�D��
�	�4�:�d�X�U�!;�Q�?�@r:c��|D]9}tjd|�r�tjj	d|��;y)Nz\w+(\.\w+)*z[WARNING: %r not a valid package name; please use only .-separated package names in setup.py)�re�matchrVrWrX)rDrEr<�pkgnames    r8�check_packagesr��s9������x�x���0��M�M���8��
�r:c	���eZdZUdZd�eed�d�d�eed�Zded<d0d1d	�Zd
�Z	d�Z
ed��Zd
�Z
d�Zd2d�Zd2d�Ze	d3					d4d��Zed3d5d��Zd0d�Zd6d�Zd6d�Zd7d�Zd7d�Zd0d�Zd8d�Z		d9					d:d�Z				d;d�Zd2d�Zed��Zd�Zd�Z d �Z!d<d!�Z"d"�Z#d#�Z$d2d$�Z%d=d%�Z&d>d&�Z'd?d'�Z(d?d(�Z)d2d)�Z*d@d*�Z+d+�Z,dAd,�Z-d-�Z.d.�Z/d2�fd/�Z0�xZ1S)Br*a�	Distribution with support for tests and package data

    This is an enhanced version of 'distutils.dist.Distribution' that
    effectively adds the following new optional keyword arguments to 'setup()':

     'install_requires' -- a string or sequence of strings specifying project
        versions that the distribution requires when installed, in the format
        used by 'pkg_resources.require()'.  They will be installed
        automatically when the package is installed.  If you wish to use
        packages that are not available in PyPI, or want to give your users an
        alternate download location, you can add a 'find_links' option to the
        '[easy_install]' section of your project's 'setup.cfg' file, and then
        setuptools will scan the listed web pages for links that satisfy the
        requirements.

     'extras_require' -- a dictionary mapping names of optional "extras" to the
        additional requirement(s) that using those extras incurs. For example,
        this::

            extras_require = dict(reST = ["docutils>=0.3", "reSTedit"])

        indicates that the distribution can optionally provide an extra
        capability called "reST", but it can only be used if docutils and
        reSTedit are installed.  If the user installs your package using
        EasyInstall and requests one of your extras, the corresponding
        additional requirements will be installed if needed.

     'package_data' -- a dictionary mapping package names to lists of filenames
        or globs to use to find data files contained in the named packages.
        If the dictionary has filenames or globs listed under '""' (the empty
        string), those names will be searched for in every package, in addition
        to any names for the specific package.  Data files found using these
        names/globs will be installed along with the package, in the same
        location as the package.  Note that globs are allowed to reference
        the contents of non-package subdirectories, as long as you use '/' as
        a path separator.  (Globs are automatically converted to
        platform-specific paths at runtime.)

    In addition to these new keywords, this class also has several new methods
    for manipulating the distribution's contents.  For example, the 'include()'
    and 'exclude()' methods can be thought of as in-place add and subtract
    commands that add or remove packages, modules, extensions, and so on from
    the distribution.
    c��yrp�r�r:r8�<lambda>zDistribution.<lambda>#��r:c��yrpr�r�r:r8r�zDistribution.<lambda>&r�r:c��yrpr�r�r:r8r�zDistribution.<lambda>'r�r:c��yrpr�r�r:r8r�zDistribution.<lambda>(r�r:)�long_description_content_type�project_urls�provides_extras�license_expression�license_file�
license_files�install_requires�extras_require�	list[str]�namespace_packagesc�$�t|d�}|si|_|xsi}g|_d|_d|_|jdd�|_|jdg�|_|jdg�|_tjd��D]'}t|�j|jd��)t|j�}|ddhz}|j!�D��cic]
\}}||vs�||��}}}t#j$||�tt&�|_t+|�|_|j/|�|j1|jj2�|j_|j5�ycc}}w)	N�package_data�src_root�dependency_links�setup_requires�distutils.setup_keywords�r=r�r�)�hasattrr��
dist_files�include_package_data�exclude_package_data�popr�r�r�r�entry_points�vars�
setdefaultr7r{�_DISTUTILS_UNSUPPORTED_METADATArd�
_Distribution�__init__r��_referenced_filesr�set_defaults�_set_metadata_defaults�_normalize_version�version�_finalize_requires)�self�attrs�have_package_datarF�
metadata_onlyr�r��
dist_attrss        r8r�zDistribution.__init__1s`��#�D�.�9�� �68�D������68���15��!�AE��!�$)�I�I�j�$�$?��
�+0�9�9�5G��+L���).���3C�R�)H����'�'�.H�I�	1�B���J�!�!�"�'�'�4�0�	1��D�@�@�A�
��,�.>�?�?�
�',�{�{�}�O�t�q�!���8N�a��d�O�
�O����t�Z�0�
"%�S�����+�D�1����#�#�E�*� $� 7� 7��
�
�8M�8M� N��
�
�����!��Ps�%F�2Fc��dh}t|j�D�chc]}t|j|d��|��}}||z
}|rd|��}t|��ycc}w)Nr7z&Required package metadata is missing: )r�r�getattrr&)r��required�key�provided�missingrns      r8�_validate_metadatazDistribution._validate_metadataQst���8���D�M�M�*�
���t�}�}�c�4�0�<�
�
��
�
�X�%���:�7�)�D�C�%�c�*�*���
s� Ac	��|jj�D]?\}}t|j�j	||j||����Ay)z�
        Fill-in missing metadata fields not supported by distutils.
        Some fields may have been set by other tools (e.g. pbr).
        Those fields (vars(self.metadata)) take precedence to
        supplied attrs.
        N)r�rdr�rr��get)r�r��option�defaults    r8r�z#Distribution._set_metadata_defaults^sN�� $�C�C�I�I�K�	Q�O�F�G������*�*�6�5�9�9�V�W�Y�3O�P�	Qr:c���ddlm}t|tj�rt|�}nt||�s|�|Stt
|��}||k7rtjd|�d|�d��|S|S)Nr)�sic�
Normalizing '�' to '�')	rJr�rL�numbers�Numberr�rr"r2)r�r��
normalizeds   r8r�zDistribution._normalize_versionhsn����g�w�~�~�.��'�l�G�
���
%����N����)�*�
��j� �� � �=��	��
�|�1�!M�N����r:c��t|dd�r|j|j_|j�|j|j_|j
|j_|j
r\|j
j
�D]>}|jd�d}|s�|jjj|��@yy)z�
        Set `metadata.python_requires` and fix environment markers
        in `install_requires` and `extras_require`.
        �python_requiresNrgr)
r�r�r�_normalize_requiresr�r��keys�splitr�r�)r�rjs  r8r�zDistribution._finalize_requiresxs���
�4�*�D�1�,0�,@�,@�D�M�M�)�� � �"�)-�)>�)>��
�
�&�'+�':�':��
�
�$�����,�,�1�1�3�
D�����C�(��+����M�M�1�1�<�<�U�C�	
D�r:c��t|dd�xsg}t|dd�xsi}tj|�rtjnt}|tttj|���|_	tj|�rtjnt}|d�|j�D��|_
y)zAMake sure requirement-related attributes exist and are normalizedr�Nr�c3�K�|]9\}}|ttttj|xsg���f���;y�wrp)r`�mapr�rri)�.0r�r�s   r8�	<genexpr>z3Distribution._normalize_requires.<locals>.<genexpr>�s7����$
�:>�!�Q�Q��S��e�k�k�!�'�r�2�3�4�5�$
�s�?A)r�r�	is_static�Listr`r�r�rrir��Dictr�rdr�)r�r�r��list_�dict_s     r8r�z Distribution._normalize_requires�s���"�4�);�T�B�H�b�� ��'7��>�D�"��!(� 1� 1�2B� C������ %�c�#�u�{�{�;K�/L�&M� N��� '� 1� 1�.� A����t��#�$
�BP�BV�BV�BX�$
�
��r:c�4�|jj�}|D�cgc]}|jd�s�|��}}|jj}|r�t	j
|�rtjnt}|t|��}||k7r-tjd|�d|�d��||j_|rtddj|�z��y|r0d}tjdd	dj|�zd
|����yycc}w)
a�
        Normalize license and license_expression.
        >>> dist = Distribution({"license_expression": _static.Str("mit aNd  gpl-3.0-OR-later")})
        >>> _static.is_static(dist.metadata.license_expression)
        True
        >>> dist._finalize_license_expression()
        >>> _static.is_static(dist.metadata.license_expression)  # preserve "static-ness"
        True
        >>> print(dist.metadata.license_expression)
        MIT AND GPL-3.0-or-later
        zLicense :: r�r�r�zyLicense classifiers have been superseded by license expressions (see https://peps.python.org/pep-0639/). Please remove:

�
z&guides/writing-pyproject-toml/#licensez#License classifiers are deprecated.z[Please consider removing the following classifiers in favor of a SPDX license expression:

�'https://packaging.python.org/en/latest/)�see_urlN)r�get_classifiers�
startswithr�rr��Strr�rr"r2r rMr#)r��classifiers�cl�license_classifiers�license_expr�str_r��pypa_guidess        r8�_finalize_license_expressionz)Distribution._finalize_license_expression�s���m�m�3�3�5��,7�X�b�2�=�=��;W�r�X��X��}�}�7�7���")�"3�"3�L�"A�7�;�;�s�D��>�|�L�M�J��z�)��$�$�}�\�N�&���TU�%V�W�3=��
�
�0�"�(�R��i�i� 3�4�5���#�!�B�K�(�-�-�5�/�15���;N�1O�P�A�+��O�	
�!��Ys
�D�Dc�:�|jj}|xsg}|jj}|r||vr|j|�|�|�gd�}|j	|d��}n|j	|d��}tt
|��|j_y)z<Compute names of all license files which should be included.N)zLICEN[CS]E*zCOPYING*zNOTICE*zAUTHORS*F)�
enforce_matchT)rr�r��append�_expand_patternsr`r)r�r��patternsr��filess     r8�_finalize_license_filesz$Distribution._finalize_license_files�s���*.�-�-�*E�*E�
� �&�B��#'�=�=�#=�#=���L��8��O�O�L�)�� �\�%9�J�H��)�)�(�%�)�H�E��)�)�(�$�)�G�E�&*�?�5�+A�&B��
�
�#r:c������fd�|D�S)aO
        >>> list(Distribution._expand_patterns(['LICENSE']))
        ['LICENSE']
        >>> list(Distribution._expand_patterns(['pyproject.toml', 'LIC*']))
        ['pyproject.toml', 'LICENSE']
        >>> list(Distribution._expand_patterns(['setuptools/**/pyprojecttoml.py']))
        ['setuptools/config/pyprojecttoml.py']
        c3��K�|]t}t�j|���D]T}|jd�sAtjj|�r"|j
tjd����V�vy�w)�~�/N)�sorted�
_find_pattern�endswith�os�path�isfile�replace�sep)r��patternr��clsr�s   ��r8r�z0Distribution._expand_patterns.<locals>.<genexpr>�sj�����
���s�0�0��-�H�I�
���=�=��%�"�'�'�.�.��*>�
�L�L�����%�
�%�
�s�A:A=r�)rr�r�s` `r8r�zDistribution._expand_patterns�s���
�#�
�	
r:c�t�d}d|vr tjd|�d�dd|��d��|jtjd	f�sd
|vrtd|�d���t
jd|��tjd
d|d|��d��t|d��}|r|stjdd|d��|S)a�
        >>> Distribution._find_pattern("LICENSE")
        ['LICENSE']
        >>> Distribution._find_pattern("/LICENSE.MIT")
        Traceback (most recent call last):
        ...
        setuptools.errors.InvalidConfigError: Pattern '/LICENSE.MIT' should be relative...
        >>> Distribution._find_pattern("../LICENSE.MIT")
        Traceback (most recent call last):
        ...
        setuptools.warnings.SetuptoolsDeprecationWarning: ...Pattern '../LICENSE.MIT' cannot contain '..'...
        >>> Distribution._find_pattern("LICEN{CSE*")
        Traceback (most recent call last):
        ...
        setuptools.warnings.SetuptoolsDeprecationWarning: ...Pattern 'LICEN{CSE*' contains invalid characters...
        zspecifications/glob-patterns/z..zPattern z cannot contain '..'z�
                Please ensure the files specified are contained by the root
                of the Python package (normally marked by `pyproject.toml`).
                r�)����)r�r1r�z:\z/ should be relative and must not start with '/'z^[\w\-\.\/\*\?\[\]]+$z$Please provide a valid glob pattern.z0Pattern {pattern!r} contains invalid characters.)rr�r1T)�	recursivez,Cannot find any files for the given pattern.z,Pattern {pattern!r} did not match any files.)rr1)	r#r2r�r�rr r�r�r)rr�r��founds    r8r�zDistribution._find_pattern�s���$6���7�?�(�-�-��7�+�%9�:��B�+��O�&�	
����r�v�v�s�m�,���0@�$��7�+�%T�U��
��8�8�,�g�6�>�(�-�-�6�B��A�+��O�&�
��W��-����(�-�-�>�>��&�	
��r:c
�&�ddlm}tjtjk(rgngd�}t|�}|�|j
�}tr|jd�|�}t|_
|D]�}t|d��5}tr)|jdjdit����|j|�ddd�|j�D]r}|j!|�}|j#|�}	|D]I}
|
d	k(s|
|vr�
|j%||
�}|j'|
|�}
|j)|
|�}
||f|	|
<�K�t|j+���d
|j,vry|j,d
j/�D]S\}
\}}|j0j%|
�}
|
r
t3|�}n|
dvrt3|�}	t5||
xs|
|��Uy#1swY��$xYw#t6$r}t9|�|�d}~wwxYw)
z�
        Adapted from distutils.dist.Distribution.parse_config_files,
        this method provides the same functionality in subtly-improved
        ways.
        r)�ConfigParser)
zinstall-basezinstall-platbasezinstall-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptszinstall-data�prefixzexec-prefix�home�user�rootNz"Distribution.parse_config_files():�utf-8��encodingz  reading {filename}r5�global)�verbose�dry_runr�)�configparserr�sysr�base_prefix�	frozenset�find_config_filesr$�announcer��optionxform�open�format�locals�	read_file�sections�options�get_option_dictr��_enforce_underscore�_enforce_option_lowercaser��command_optionsrd�negative_optr(�setattrrBr%)r��	filenamesr�ignore_options�parser�filename�reader�sectionr"�opt_dict�opt�val�src�aliasrGs               r8�_parse_config_filesz Distribution._parse_config_files"s��	.�
�z�z�S�_�_�,�
��	�(#�>�2�����.�.�0�I���M�M�>�?���� ���!�	�H��h��1�
)�V���M�M�"?�"8�"?�"?�"K�&�(�"K�L�� � ��(�
)�"�?�?�,�
4�� �.�.��1���/�/��8��"�4�C��j�(�C�>�,A� � �*�*�W�c�2�C��2�2�3��@�C��8�8��g�F�C�%-�s�O�H�S�M�4�	
4�
�O�O��)	�,�4�/�/�/��
 $�3�3�H�=�C�C�E�
	5�O�C��#�s��%�%�)�)�#�.�E��#�C�.�(���.�.���n��
5���e�l�s�C�0�
	5�7
)�
)��H�
5�*�1�-�1�4��
5�s%�AG)�G6�)G3	�6	H�?H�Hc
��d|vs|j|�r|S|jdd�}|jjrd|jj�d�nd}t	j
d|�d|�d|�d	�d
|�d|�d|�d
�dd��|S)N�-�_�(Affected: �).rJzInvalid dash-separated key � in z- (setup.cfg), please use the underscore name �	 instead.z%
            Usage of dash-separated zV will not be supported in future
            versions. Please use the underscore name � instead.
            �
            �!userguide/declarative_config.html�rrr�rSr1)�_skip_setupcfg_normalizationrrr7r#r2)r�r0r.�underscore_opt�affecteds     r8r$z Distribution._enforce_underscoreqs����c�>�T�>�>�w�G��J����S�#�.��;?�=�=�;M�;M�[����!3�!3� 4�B�7�SU��$�)�)�)�#���W�K�@.�.<�-?�y�
J�%�%(�G�,6�6D�5G�H
�
�J�
�
�
9�!�	
��r:c�0�|j�s|j|�r|S|j�}|jjrd|jj�d�nd}tjd|�d|�d|�d�d|�d|�d	|�d
|�d�	dd
��|S)Nr8r9rJzInvalid uppercase key r:z# (setup.cfg), please use lowercase r;z$
            Usage of uppercase key zL will not be supported in
            future versions. Please use lowercase r<r=r>r?r@)�islowerrA�lowerrr7r#r2)r�r0r.�
lowercase_optrCs     r8r%z&Distribution._enforce_option_lowercase�s����;�;�=�D�=�=�g�F��J��	�	��
�;?�=�=�;M�;M�[����!3�!3� 4�B�7�SU��$�)�)�$�S�G�4��{�;$�$1�#4�I�
?�$�$'�7�$�w�k�:3�3@�2C�D
�
�J�
�
�
9�!�	
��r:c�6�d}||vxs|j|�S)N)zoptions.extras_requirezoptions.data_fileszoptions.entry_pointszoptions.package_datazoptions.exclude_package_data)�_is_setuptools_section)r�r.�skips   r8rAz)Distribution._skip_setupcfg_normalization�s(��
���$��J�d�&A�&A�'�&J�"J�Jr:c�N�|dk(xs|jd�xs|t�vS)Nrr")r��_setuptools_commands)r�r.s  r8rIz#Distribution._is_setuptools_section�s3���z�!�
1��!�!�)�,�
1��.�0�0�	
r:c
���|j�}|�|j|�}tr|jd|�d��|j	�D]�\}\}}tr|jd|�d|�d|�d��	|j
D�cgc]
}t
|���}}	|j}		t|t�}
||	vr|
rt||	|t|��nL||vr|
rt||t|��n/t||�rt|||�ntd|�d	|�d
|�d�����ycc}w#t$rg}Y��wxYw#t$ri}	Y��wxYw#t$r}t|�|�d}~wwxYw)a�
        Set the options for 'command_obj' from 'option_dict'.  Basically
        this means copying elements of a dictionary ('option_dict') to
        attributes of an instance ('command').

        'command_obj' must be a Command instance.  If 'option_dict' is not
        supplied, uses the standard option dictionary for this command
        (from 'self.command_options').

        (Adopted from distutils.dist.Distribution._set_command_options)
        Nz  setting options for 'z
' command:z    z = z (from r>z	error in z: command 'z' has no such option 'r�)�get_command_namer#r$rrd�boolean_optionsr'r4r'rLr�r(r(r�r%rB)r��command_obj�option_dict�command_namer��sourcer<�o�	bool_opts�neg_opt�	is_stringrGs            r8�_set_command_optionsz!Distribution._set_command_options�s���#�3�3�5�����.�.�|�<�K���M�M�3�L�>��L�M�'2�'8�'8�':�	5�#�F�O�V�U���
�
��V�H�C��w�g�f�X�Q�G�H�
�;F�;V�;V�W�a�.�q�1�W�	�W�
�%�2�2��

5�&�u�c�2�	��W�$���K����i��>N�:N�O��y�(�Y��K���5�1A�B��[�&�1��K���7�.�#�F�8�;�|�n�DZ�[a�Zb�bc�d����+	5��X��!�
��	�
��"�
���
���
5�*�1�-�1�4��
5�sO�:D/�D*�D/�E�*A=E�*D/�/D=�<D=�E�
E�	E+�E&�&E+c���g}t|jxstjd�}|�-t	d�|�}t|d�}t|d�}||fS|j
�r|g}||fS)z/Add default file and split between INI and TOMLzpyproject.tomlc�2�t|�jdk(S)Nz.toml)r	�suffix)�fs r8r�z8Distribution._get_project_config_files.<locals>.<lambda>�s���Q����'�(A�r:rr)r	r�r��curdirr
r`�exists)r�r)�	tomlfiles�standard_project_metadata�partss     r8�_get_project_config_filesz&Distribution._get_project_config_files�s}���	�$(����)C�"�)�)�EU�$V�!�� ��A�9�M�E��U�1�X��I��U�1�X��I��)�#�#�'�
-�
-�
/�2�3�I��)�#�#r:c�0�|j|�\}}|j|��tj||j|��|D]}tj|||��|j�|j�|j�y)zXParses configuration files from various levels
        and loads configuration.
        )r))�ignore_option_errorsN)
rbr4r�parse_configurationr&r�apply_configurationr�r�r�)r�r)rd�inifilesr_r,s      r8�parse_config_fileszDistribution.parse_config_files�s���#�<�<�Y�G���)�� � �8� �4��$�$��$�&�&�=Q�	
�"�	T�H��-�-�d�H�>R�S�	T�	
���!��)�)�+��$�$�&r:c� �ddlm}|||�S)zResolve pre-setup requirementsr)�_fetch_build_eggs)�	installerrj)r��requiresrjs   r8�fetch_build_eggszDistribution.fetch_build_eggs�s��	1� ��x�0�0r:c���d}d�}tj|��}tj|j|�}td�|�}t
||��D]
}||��y)z�
        Allow plugins to apply arbitrary operations to the
        distribution. Each hook may optionally define a 'order'
        to influence the order of execution. Smaller numbers
        go first and the default is 0.
        z(setuptools.finalize_distribution_optionsc��t|dd�S)N�orderr)r�)�hooks r8�by_orderz/Distribution.finalize_options.<locals>.by_orders���4��!�,�,r:r�c�"�|j�Srp)r�)rGs r8r�z/Distribution.finalize_options.<locals>.<lambda>s��q�v�v�x�r:)r�N)rr�ra�filterfalse�_removedr�r�)r�r=rr�defined�filtered�loadedrFs       r8�finalize_optionszDistribution.finalize_optionss`��;��	-��'�'�e�4���(�(�����@���'��2����X�.�	�B��t�H�	r:c�$�dh}|j|vS)z�
        When removing an entry point, if metadata is loaded
        from an older version of Setuptools, that removed
        entry point will attempt to be loaded and will fail.
        See #2765 for more details.
        �
2to3_doctestsr6)rF�removeds  r8ruzDistribution._removeds��
�
���w�w�'�!�!r:c��tjd��D]>}t||jd�}|��|j	�||j|��@y)Nr�r�)rr�r�r7r�)r�rFr<s   r8�_finalize_setup_keywordsz%Distribution._finalize_setup_keywords"sM���'�'�.H�I�	0�B��D�"�'�'�4�0�E�� �����	�$�����/�	0r:c���ddlm}tjj	tj
d�}tjj
|�s�tj|�|j|�tjj	|d�}t|dd��5}|jd�|jd	�|jd
�ddd�|S|S#1swY|SxYw)Nr)�windows_supportz.eggsz
README.txt�wrrzcThis directory contains eggs that were downloaded by setuptools to build, test, and run plug-ins.

zAThis directory caches those eggs to prevent repeated downloads.

z/However, it is safe to delete this directory.

)rJr�r�r�rMr]r^�mkdir�	hide_filer�write)r�r��
egg_cache_dir�readme_txt_filenamer\s     r8�get_egg_cache_dirzDistribution.get_egg_cache_dir(s���%������R�Y�Y��8�
��w�w�~�~�m�,��H�H�]�#��%�%�m�4�"$�'�'�,�,�}�l�"K���)�3��A�	
M�Q����J�����.�����K�L�	
M���}��	
M���s�(4C(�(C2c� �ddlm}|||�S)z Fetch an egg needed for buildingr)�fetch_build_egg)rkr�)r��reqr�s   r8r�zDistribution.fetch_build_egg=s��.��t�S�)�)r:c��||jvr|j|S|dk(rddlm}|Stjd|��}|D]$}|j�x|j|<}|cSt
j||�S)z(Pluggable version of get_command_class()�bdist_wheelr)r��distutils.commands)r=r7)�cmdclass�command.bdist_wheelr�rr�r�r��get_command_class)r�rr��epsrFr�s      r8r�zDistribution.get_command_classCs����d�m�m�#��=�=��)�)��m�#�8����#�#�*>�W�M���	B�B�02���	�9�D�M�M�'�"�X��O�	B�!�2�2�4��A�Ar:c���tjd��D]D}|j|jvs�|j	�}||j|j<�Ftj|�S�Nr�r�)rr�r7r�r�r��print_commands�r�rFr�s   r8r�zDistribution.print_commandsUs]���'�'�.B�C�	2�B��w�w�d�m�m�+��7�7�9��)1��
�
�b�g�g�&�	2��+�+�D�1�1r:c���tjd��D]D}|j|jvs�|j	�}||j|j<�Ftj|�Sr�)rr�r7r�r�r��get_command_listr�s   r8r�zDistribution.get_command_list\s]���'�'�.B�C�	2�B��w�w�d�m�m�+��7�7�9��)1��
�
�b�g�g�&�	2��-�-�d�3�3r:c��|j�D]2\}}t|d|zd�}|r	||��!|j||��4y)a�Add items to distribution that are named in keyword arguments

        For example, 'dist.include(py_modules=["x"])' would add 'x' to
        the distribution's 'py_modules' attribute, if it was not already
        there.

        Currently, this method only supports inclusion for attributes that are
        lists or tuples.  If you need to add support for adding to other
        attributes in this or a subclass, you can add an '_include_X' method,
        where 'X' is the name of the attribute.  The method will be called with
        the value passed to 'include()'.  So, 'dist.include(foo={"bar":"baz"})'
        will try to call 'dist._include_foo({"bar":"baz"})', which can then
        handle whatever special inclusion logic is needed.
        �	_include_N)rdr��
_include_misc)r�r�r�r��includes     r8r�zDistribution.includecsI���K�K�M�	)�D�A�q��d�K�!�O�T�:�G����
��"�"�1�a�(�	)r:c���|dz}|jr7|jD�cgc]}||k7s�	|j|�r�|��c}|_|jr7|jD�cgc]}||k7s�	|j|�r�|��c}|_|jrJ|jD�cgc].}|j|k7r|jj|�s|��0c}|_yycc}wcc}wcc}w)z9Remove packages, modules, and extensions in named packagerRN)�packagesr��
py_modules�ext_modulesr7�r��package�pfx�ps    r8�exclude_packagezDistribution.exclude_packageys�����m���=�=��=�=���A��L����c�AR���D�M��?�?��?�?���a�7�l�1�<�<�PS�CT���D�O�����)�)� ���6�6�W�$�Q�V�V�->�->�s�-C�� �D������
��
 s'�
C#�C#�C#�#
C(�.C(�C(�&3C-c�h�|dz}|j�D]}||k(s|j|�s�yy)z<Return true if 'exclude_package(package)' would do somethingrRTF)�iter_distribution_namesr�r�s    r8rTzDistribution.has_contents_for�s?����m���-�-�/�	�A��G�|�q�|�|�C�0��	�r:c	�>�t|t�st|�dt�d|�d���	t	||�}|�t|t�st|dz��|r!t
|||D�cgc]	}||vs�|��c}�yy#t
$r}t|�d��|�d}~wwxYwcc}w)zAHandle 'exclude()' for list/tuple attrs without a special handler�: setting must be of type <rKr>�: No such distribution settingN�4: this setting cannot be changed via include/exclude)rLr3r&rNr�r4r()r�r7r<�oldrG�items      r8�
_exclude_misczDistribution._exclude_misc�s����%��+�%��&�3�4G�3H��PU�y�XY�Z��
�	V��$��%�C��?�:�c�9�#=�%��M�M��
���D�$�#� K�$��U�9J�� K�L���
�	V�%���.L�&M�N�TU�U��	V��!Ls#�A:�#	B�-B�:	B�B�Bc�n�t|t�st|�dt�d|�d���	t	||�}|�t
|||�yt|t�st|dz��|D�cgc]	}||vs�|��}}t
||t|�|z�y#t
$r}t|�d��|�d}~wwxYwcc}w)zAHandle 'include()' for list/tuple attrs without a special handlerr�rKr>r�Nr�)rLr3r&rNr�r4r(r`)r�r7r<r�rGr��news       r8r�zDistribution._include_misc�s����%��+�%��&�3�4G�3H��PU�y�XY�Z��
�	V��$��%�C��;��D�$��&��C��+�%��M�M��
�%*�=�D�T��_�4�=�C�=��D�$��S�	�C��0���	V�%���.L�&M�N�TU�U��	V��>s#�B�(	B2�2B2�	B/�B*�*B/c��|j�D]2\}}t|d|zd�}|r	||��!|j||��4y)aRemove items from distribution that are named in keyword arguments

        For example, 'dist.exclude(py_modules=["x"])' would remove 'x' from
        the distribution's 'py_modules' attribute.  Excluding packages uses
        the 'exclude_package()' method, so all of the package's contained
        packages, modules, and extensions are also excluded.

        Currently, this method only supports exclusion from attributes that are
        lists or tuples.  If you need to add support for excluding from other
        attributes in this or a subclass, you can add an '_exclude_X' method,
        where 'X' is the name of the attribute.  The method will be called with
        the value passed to 'exclude()'.  So, 'dist.exclude(foo={"bar":"baz"})'
        will try to call 'dist._exclude_foo({"bar":"baz"})', which can then
        handle whatever special exclusion logic is needed.
        �	_exclude_N)rdr�r�)r�r�r�r��excludes     r8r�zDistribution.exclude�sI�� �K�K�M�	)�D�A�q��d�K�!�O�T�:�G����
��"�"�1�a�(�	)r:c��t|t�stdt�d|�d���t	t|j|��y)Nz#packages: setting must be of type <rKr>)rLr3r&rNr`r�r�)r�r�s  r8�_exclude_packageszDistribution._exclude_packages�sG���(�I�.�%�5�6I�5J�'�RZ�Q]�]^�_��
�	
�S��%�%�x�
0�1r:c��|jj|_|jj|_|d}|jd�}||vr.||\}}||=ddl}|j|d�|dd|d}||vr�.t
j|||�}|j|�}	t|	dd�rd|f|j|�d<|�gS|S)Nr�aliasesTr�command_consumes_arguments�command line�args)
�	__class__�global_optionsr'r#�shlexr�r��_parse_command_optsr�r�)
r�r+r�rr��_srcr3r��nargs�	cmd_classs
          r8r�z Distribution._parse_command_opts�s���"�n�n�;�;��� �N�N�7�7����q�'���&�&�y�1���� �!�'�*�K�D�%��� ���{�{�5�$�/�D��!�H��1�g�G�
�� ��1�1�$���E���*�*�7�3�	��9�:�D�A�5C�U�4K�D� � ��)�&�1�� ��	��r:c	���i}|jj�D]�\}}|j�D]�\}\}}|dk7r�|jdd�}|dk(ru|j|�}|jj�}|j
t|di��|j�D]\}	}
|
|k(s�|	}d}ntd��|dk(rd}||j|i�|<����|S)	ahReturn a '{cmd: {opt:val}}' map of all command-line options

        Option names are all long, but do not include the leading '--', and
        contain dashes rather than underscores.  If the option doesn't take
        an argument (e.g. '--quiet'), the 'val' is 'None'.

        Note that options provided by config files are intentionally excluded.
        r�r7r6rr'NzShouldn't be able to get herer)
r&rdr�get_command_objr'�copy�updater�rCr�)r��d�cmd�optsr0r2r1�cmdobjrV�neg�poss           r8�get_cmdline_optionsz Distribution.get_cmdline_options�s��/1���-�-�3�3�5�	1�I�C��#'�:�:�<�
1���Z�c�3��.�(���k�k�#�s�+���!�8�!�1�1�#�6�F�"�/�/�4�4�6�G��N�N�7�6�>�2�#F�G�$+�M�M�O�N���S��#�:�"%�C�"&�C�!�	N�-�-L�M�M��A�X��C�-0����S�"�%�c�*�+
1�	1�2�r:c#�K�|jxsdEd{���|jxsdEd{���|jxsdD]>}t|t�r|\}}n|j
}|j
d�r|dd}|���@y7�n7�X�w)z@Yield all packages, modules, and extension names in distributionr�N�modulei����)r�r�r�rL�tupler7r�)r��extr7�
_buildinfos    r8r�z$Distribution.iter_distribution_namess������=�=�&�B�&�&��?�?�(�b�(�(��#�#�)�r�	�C��#�u�%�#&� ��j��x�x���}�}�X�&��C�R�y���J�	�		'��(�s �B	�B�B	�B�AB	�B	c�F�ddl}|jrtj||�St	|j
tj�stj||�S|j
jj�dvrtj||�S|j
j}|j
jd��	tj||�|j
j|��S#|j
j|��wxYw)z�If there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
        rN)r�utf8rr)r�
help_commandsr��handle_display_optionsrL�stdout�io�
TextIOWrapperrrF�reconfigure)r��option_orderrrs    r8r�z#Distribution.handle_display_options/s���	���� �7�7��l�K�K��#�*�*�b�&6�&6�7� �7�7��l�K�K��:�:���$�$�&�*;�;� �7�7��l�K�K��:�:�&�&���
�
�����0�	6� �7�7��l�K��J�J�"�"�H�"�5��C�J�J�"�"�H�"�5�s�D�D c�D��|j�t�|�	|�yrp)r��super�run_command)r�rr�s  �r8r�zDistribution.run_commandKs�������	���G�$r:rp)r�zMutableMapping[str, Any] | None�return�None)r�r�)T)r�r�r�rtr�z
Iterator[str])rr�r�rtr�r�)r0r�r.r�r�r�)r.r�r�rt)r)�Iterable[StrPath] | None)NF)r)r�rdrtr�r�)rlrr�z!list[_pkg_resources_Distribution])rr�r�ztype[distutils.cmd.Command])r�r�r�r�)r�r�r�rt)r7r�r<r+r�r�)r�r+r�r�)r�z dict[str, dict[str, str | None]])2r5�
__module__�__qualname__�__doc__r�r`r��__annotations__r�r�r��staticmethodr�r�r�r�r��classmethodr�r�r4r$r%rArIrXrbrhrmryrur~r�r�r�r�r�r�r�rTr�r�r�r�r�r�r�r�r��
__classcell__)r�s@r8r*r*�s����+�\*6���*�$�%� ��	'�#�"�!�"�@+�Q��
��
�D�&
�&�PC�(�8<�
� �
�15�
�	�
��
�$�6��6�rM5�^�(�(K�
�+5�Z
$�/3�%*�'�+�'�#�'�
�	'�,1�"�1�	*�1��$�"��"�0��**�B�$2�4�)�,�*	�M�"1�*)�.2��6%�N� 6�8%�%r:c���	tjd�j}d�|D�}htj
j�|�S#tj$rg}Y�5wxYw)N�
setuptoolsc3�4K�|]}|j���y�wrpr6)r�rFs  r8r�z'_setuptools_commands.<locals>.<genexpr>Xs����=�"�b�g�g�=�s�)r�distributionr��PackageNotFoundErrorrVr�__all__)r�r�s  r8rLrLSsa����,�,�\�:�G�G��=��=��.�Y�
�
�
&�
&�-��-�-���(�(�����s�(A�A �A c��eZdZdZy)rxzrClass for warning about deprecations in dist in
    setuptools. Not ignored by default, unlike DeprecationWarning.N)r5r�r�r�r�r:r8rxrx_s��Fr:rx)r7r�r�r)rEr�r<r+r�r�)rEr�r<r,r�r�)r�zset[str])j�
__future__r�	functoolsr�rar�r�r�r�collections.abcrrrrr�pathlibr	�typingr
rr�more_itertoolsr
r�packaging.markersrr�packaging.specifiersrr�packaging.versionrrJrrrrr7�
_importlibr�_normalizationr�_pathrr�configrr�	discoveryr�errorsr �monkeyr!�warningsr"r#�
distutils.cmdrV�distutils.command�distutils.core�distutils.dist�
distutils.log�distutils.debugr$�distutils.errorsr%r&�distutils.fancy_getoptr'�distutils.utilr(�typing_extensionsr)�
pkg_resourcesr*�_pkg_resources_Distributionr�r�r`r3r�r+r�rNr�r,r9rHrPr^rercrhrvryr~r�r�r�r�r��core�cacherLrxr�r:r8�<module>r
s���"��	���	�	�
�H�H���,�,�5�3�?�%���!�<���+�&�&�!�C������!�F�4�$��+�I��
���4�K�	���U�3��8�_�d�3�i�7�8�	�9�8�3��!&�s�D��c��N�H�S�M�'I�!J��Y�J��K���
�8	���W�5�2�2�,�@���<�!�)�.�.�"=�"=�>�M�\
%�=�\
%�~���.��.�F�9�Fr: