� u��ga���L�UddlmZddlZddlZddlZddlZddlZddlZddlZddl m Z m Z m Z m Z ddlmZddlmZddlmZmZmZddlmZmZddlmZmZdd lmZmZdd lmZd d l m!Z!m"Z"m#Z#m$Z%d d l&m'Z'd dl(m)Z)d dl*m+Z+d dl"m,Z,d dl-m.Z.m/Z/d dl0m1Z1d dl2m3Z3d dl4m5Z5d dl6m7Z7m8Z8ddl9Z:ddl;Z:ddl<Z:ddl=Z:ddl>Z:ddl?m@Z@ddlAmBZBmCZCddlDmEZEddlFmGZGer ddlHmIZIddlJmKZLdgZMeNeOfZP eeNeQdfeOeQfZRdeSd<d ZTeeQeUeQefe eQfZVdeSd!< d<d&�ZWd'�ZXd=d+�ZYd,�ZZd-�Z[d.�Z\d/�Z]d0�Z^d1�Z_d>d2�Z`d3�Zad4�Zbd5�Zcd6�Zderddl<mKZene5e:jfjK��ZeGd7�dee��ZKejgd?d9���ZhGd:�d;e8��ZidS)@�)� 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]�_OrderedStrSequence�name�str�returnr c�~�|dkrtjddd���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__�r.s �_/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/setuptools/dist.py� __getattr__r<KsW�� �z���$�)� N� F�"� � � � � �� �I�8�I�I��I�I� J� J�J�c�� tj|dd���}|jrJ�dS#ttt t f$r}t|�d|�d���|�d}~wwxYw)N)�valuer.�groupz/ must be importable 'module:attrs' string (got �))r� EntryPoint�extras� TypeError� ValueErrorr8�AssertionErrorr&)�dist�attrr?�ep�es r;�check_importablerKVs���� � �u�4�t� D� D� D���9���}���� �z�>�>� B����!�� P� P�e� P� P� P� � �� ��������s� $�A�A�ArHr?�Nonec ��� t|t��sJ�d�|��|ksJ�dS#ttt t f$r#}t|�dt�d|�d���|�d}~wwxYw)z"Verify that value is a string list�z must be of type <�> (got rAN) � isinstancer7�joinrDrEr8rFr&�_sequence_type_repr�rGrHr?rJs r;�assert_string_listrT`s��� ��%��+�+�+�+�+��w�w�u�~�~��&�&�&�&�&�&�� �z�>�>� B����!�� O� O�)<� O� O�U� O� O� O� � �� ��������s�26�A6�A1�1A6c�2�|}t|||��|D]�}|�|��std|�����|�d��\}}}|r%||vr!tj�d||��tjddd�����dS) 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) rT�has_contents_forr&� rpartition� distutils�log�warnr#r6)rGrHr?� ns_packages�nsp�parent�_sep�_childs r;� check_nsprbns����K��t�T�;�/�/�/�� � ���$�$�S�)�)� �%�]�VY�]�]��� � #�~�~�c�2�2����f� � �f�K�/�/� �M� � �;���  � � � %�)� =� J�J� � � � � � � r=c��� ttjt|�������dS#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�itemsrDrEr8r&rSs r;� check_extrasri�sr��� �Y� �|�U�[�[�]�]� ;� ;�<�<�<�<�<�� �z�>� 2����!� &� � ��  ��������s�9=�A)�A$�$A)c���|�d��\}}} t|��n'#t$rd|�d|�d�}t|��d�wxYwt t j|����dS)N�:zInvalid environment marker: z (rA)r � _check_markerrr&rdr�parse)�extra�reqs�_namer`�marker�msgs r;rgrg�s����/�/�#�.�.��E�4��1��f������ �1�1�1�A�V�A�A�u�A�A�A��!�#�&�&�D�0�1���� ���T� � �����s �+�$Ac�T�|sdSt|��}|���dS�N)r�evaluate)rq�ms r;rlrl�s+�� �����v���A��J�J�L�L�L�L�Lr=c�V�t|��|krt|�d|�d����dS)z)Verify that value is True, False, 0, or 1z must be a boolean value (got rAN)�boolr&�rGrHr?s r;� assert_boolrz�s:�� �E�{�{�e���!�T�"U�"U�5�"U�"U�"U�V�V�V��r=c�h�|st�|�d���dSt|�d����)Nz is ignored.z is invalid.)�DistDeprecationWarningr6r&rys r;�invalid_unless_falser}�sC�� ���#�#�t�$9�$9�$9�:�:�:��� ��3�3�3� 4� 4�4r=c��� ttj|����t|t��rt d���dS#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)rdrrmrP�setrDrEr&�rGrHr?�errorrrs r;�check_requirementsr��s��� 2� �U�[�� � � � � � �e�S� !� !� ?��=�>�>� >� ?� ?�� �z� "�2�2�2�� P� P�HM� P� P� �"�#�&�&�E�1����� 2���s�AA � A6�A1�1A6c�� t|��dS#ttf$r}|�d|��}t|��|�d}~wwxYw)z.Verify that value is a valid version specifierz7 must be a string containing valid version specifiers; N)rrr8r&r�s r;�check_specifierr��sc��2��U������� �n� -�2�2�2��W�W�PU�W�W��!�#�&�&�E�1�����2���s��A�;�Ac�t� tj|��dS#t$r}t|��|�d}~wwxYw)z)Verify that entry_points map is parseableN)r�load� Exceptionr&rSs r;�check_entry_pointsr��sM��,���5�!�!�!�!�!�� �,�,�,�!�!�$�$�!�+�����,���s�� 7�2�7c��t|t��st|�d����|���D]E\}}t|t��std|�d|�d����t |d|�d�|���FdS)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 rAz values of z dictN)rP�dictr&rhr/rT)rGrHr?�k�vs r;�check_package_datar��s��� �e�T� "� "� �!�� '� '� '� � � �� � � � �@�@���1��!�S�!�!� �%�D�4�D�D�a�D�D�D��� � �4�!;�d�!;�!;�!;�Q�?�?�?�?� @�@r=c�z�|D]7}tjd|��s tj�d|���8dS)Nz \w+(\.\w+)*z[WARNING: %r not a valid package name; please use only .-separated package names in setup.py)�re�matchrZr[r\)rGrHr?�pkgnames r;�check_packagesr��sR�������x���0�0� � �M� � �8�� � � ���r=c ���eZdZUdZd�eed�d�d�eed�Zded<dMdNd�Zd�Z d�Z e d���Z d�Z d�ZdOd�ZdOd�Ze dPdQd���Ze dPdRd���ZdMd�ZdSd"�ZdSd#�ZdTd$�ZdTd%�ZdMd&�ZdUd)�Z dVdWd,�ZdXd0�ZdOd1�Ze d2���Zd3�Zd4�Z d5�Z!dYd8�Z"d9�Z#d:�Z$dOd;�Z%dZd=�Z&d[d>�Z'd\dB�Z(d\dC�Z)dOdD�Z*d]dF�Z+dG�Z,d^dI�Z-dJ�Z.dK�Z/dO�fdL� Z0�xZ1S)_r+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��dSrt�r�r=r;�<lambda>zDistribution.<lambda>#s���r=c��dSrtr�r�r=r;r�zDistribution.<lambda>&s��d�r=c��dSrtr�r�r=r;r�zDistribution.<lambda>'s���r=c��dSrtr�r�r=r;r�zDistribution.<lambda>(s���r=)�long_description_content_type� project_urls�provides_extras�license_expression� license_file� license_files�install_requires�extras_require� list[str]�namespace_packagesN�attrs�MutableMapping[str, Any] | Noner0rLc�6��t|d��}|si|_|pi}g|_d|_d|_|�dd��|_|�dg��|_|�dg��|_tj d���D]*}t|��� |j d���+t|j����ddhz��fd �|���D��}t#j||��tt&��|_t+|��|_|�|��|�|j j��|j _|���dS) N� package_data�src_root�dependency_links�setup_requires�distutils.setup_keywords�r@r�r�c�$��i|] \}}|�v� ||�� Sr�r�)�.0r�r�� metadata_onlys �r;� <dictcomp>z)Distribution.__init__.<locals>.<dictcomp>Bs)���O�O�O�t�q�!���8N�8N�a��8N�8N�8Nr=)�hasattrr�� dist_files�include_package_data�exclude_package_data�popr�r�r�r� entry_points�vars� setdefaultr.r�_DISTUTILS_UNSUPPORTED_METADATArh� _Distribution�__init__r/�_referenced_filesr� set_defaults�_set_metadata_defaults�_normalize_version�version�_finalize_requires)�selfr��have_package_datarI� dist_attrsr�s @r;r�zDistribution.__init__1s����#�D�.�9�9�� � 9�68�D� �� ���68���15��!�AE��!�$)�I�I�j�$�$?�$?�� �+0�9�9�5G��+L�+L���).���3C�R�)H�)H����'�.H�I�I�I� 1� 1�B� ��J�J� !� !�"�'�4� 0� 0� 0� 0��D�@�A�A� ��,�.>�?�?� �O�O�O�O�u�{�{�}�}�O�O�O� ���t�Z�0�0�0� "%�S������+�D�1�1��� �#�#�E�*�*�*� $� 7� 7�� �8M� N� N�� �� ���!�!�!�!�!r=c���dh}�fd�t�j��D��}||z }|rd|��}t|���dS)Nr.c�@��h|]}t�j|d���|��Srt)�getattrr)r��keyr�s �r;� <setcomp>z2Distribution._validate_metadata.<locals>.<setcomp>Ss7��� � � ���t�}�c�4�0�0�<� �<�<�<r=z&Required package metadata is missing: )r�rr&)r��required�provided�missingrrs` r;�_validate_metadatazDistribution._validate_metadataQsu����8�� � � � ��D�M�*�*� � � �� �X�%�� � +�D�7�D�D�C�%�c�*�*� *� +� +r=c ���|j���D]I\}}t|j���||�||�������JdS)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�rhr�rr��get)r�r��option�defaults r;r�z#Distribution._set_metadata_defaults^sk�� $�C�I�I�K�K� Q� Q�O�F�G� ��� � � *� *�6�5�9�9�V�W�W�Y�Y�3O�3O� P� P� P� P� Q� Qr=c� �ddlm}t|tj��rt |��}nt||��s|�|St t |����}||krtjd|�d|�d���|S|S)Nr)�sic� Normalizing '�' to '�') rNr�rP�numbers�Numberr/rr"r6)r�r�� normalizeds r;r�zDistribution._normalize_versionhs��������� �g�w�~� .� .� ��'�l�l�G�G� ��� %� %� ����N����)�)�*�*� � �j� � � � �!M��!M�!M� �!M�!M�!M� N� N� N�� ��r=c�x�t|dd��r|j|j_|���|j|j_|j|j_|jrX|j���D]@}|�d��d}|r|jj� |���?dSdS)z� Set `metadata.python_requires` and fix environment markers in `install_requires` and `extras_require`. �python_requiresNrkr) r�r�r�_normalize_requiresr�r��keys�splitr�r�)r�rns r;r�zDistribution._finalize_requiresxs��� �4�*�D� 1� 1� A�,0�,@�D�M� )� � � �"�"�"�)-�)>�� �&�'+�':�� �$� � � D��,�1�1�3�3� D� D��� � �C�(�(��+���D��M�1�<�<�U�C�C�C��  D� D� D� Dr=c��t|dd��pg}t|dd��pi}tj|��r tjnt}|t t tj|������|_ tj|��r tj nt}|d�|� ��D����|_ dS)zAMake sure requirement-related attributes exist and are normalizedr�Nr�c 3�K�|]?\}}|ttttj|pg������fV��@dSrt)rd�mapr/rrm)r�r�r�s r;� <genexpr>z3Distribution._normalize_requires.<locals>.<genexpr>�s\����$ �$ �:>�!�Q�Q��S��e�k�!�'�r�2�2�3�3�4�4� 5�$ �$ �$ �$ �$ �$ r=)r�r� is_static�Listrdr�r/rrmr��Dictr�rhr�)r�r�r��list_�dict_s r;r�z Distribution._normalize_requires�s���"�4�);�T�B�B�H�b�� ��'7��>�>�D�"��!(� 1�2B� C� C�M�� � ��� %��c�#�u�{�;K�/L�/L�&M�&M� N� N��� '� 1�.� A� A�K�� � �t��#�e�$ �$ �BP�BV�BV�BX�BX�$ �$ �$ � � ����r=c��|j���}d�|D��}|jj}|r�tj|��r tjnt }|t|����}||kr'tj d|�d|�d���||j_|r%tdd� |��z���d S|r4d}tj dd d� |��zd |��� ��d Sd S) 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 c�<�g|]}|�d���|��S)z License :: �� startswith)r��cls r;� <listcomp>z=Distribution._finalize_license_expression.<locals>.<listcomp>�s)��X�X�X�b�2�=�=��;W�;W�X�r�X�X�Xr=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_classifiersr�rr��Strr/rr"r6r rQr#)r�� classifiers�license_classifiers� license_expr�str_r�� pypa_guidess r;�_finalize_license_expressionz)Distribution._finalize_license_expression�sO���m�3�3�5�5� �X�X�K�X�X�X���}�7� � � �")�"3�L�"A�"A�J�7�;�;�s�D���>�|�L�L�M�M�J��z�)�)��$�%V�\�%V�%V��%V�%V�%V�W�W�W�3=�� �0�"� �(�R��i�i� 3�4�4�5���� � � !� �B�K� (� -�5�/�15���;N�1O�1O�P�O�+�O�O�  � � � � � � � r=c�.�|jj}|pg}|jj}|r||vr|�|��|�|�gd�}|�|d���}n|�|d���}t t |����|j_dS)z<Compute names of all license files which should be included.N)z LICEN[CS]E*zCOPYING*zNOTICE*zAUTHORS*F)� enforce_matchT)rr�r��append�_expand_patternsrdr)r�r��patternsr��filess r;�_finalize_license_filesz$Distribution._finalize_license_files�s���*.�-�*E� � �&�B��#'�=�#=� � � *�L��8�8� �O�O�L� )� )� )� � �\�%9�J�I�I�H��)�)�(�%�)�H�H�E�E��)�)�(�$�)�G�G�E�&*�?�5�+A�+A�&B�&B�� �#�#�#r=Tr�r�rx� Iterator[str]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��|�����D]X}|�d���tj�|���6|�tjd��V��Y�dS)�~�/N)�sorted� _find_pattern�endswith�os�path�isfile�replace�sep)r��patternr �clsr�s ��r;r�z0Distribution._expand_patterns.<locals>.<genexpr>�s������ � ���s�0�0��-�H�H�I�I� � ���=�=��%�%�  �+-�'�.�.��*>�*>�  � �L�L���� %� %� � � � � � � r=r�)rr�r�s` `r;r�zDistribution._expand_patterns�s4���� � � � � �#� � � � r=r r/c�|�d}d|vrtjd|�d�dd|��d���|�tjd f��sd |vrt d|�d ����t jd |���tjdd|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�r5rz:\z/ should be relative and must not start with '/'z^[\w\-\.\/\*\?\[\]]+$Nz$Please provide a valid glob pattern.z0Pattern {pattern!r} contains invalid characters.)r r�r5T)� recursivez,Cannot find any files for the given pattern.z,Pattern {pattern!r} did not match any files.)r r5) r#r6r�rr r r�r�r)r r�r��founds r;rzDistribution._find_pattern�s.��$6� � �7�?�?� (� -�:�7�:�:�:��P�+�O�O�&� � � � � � � �r�v�s�m� ,� ,� ���0@�0@�$�U�7�U�U�U��� � �8�,�g� 6� 6� >� (� -�6�B��O�+�O�O�&�  � � � ��W��-�-�-�� � �� � (� -�>�>��&�  � � � �� r=c ��ddlm}tjtjkrgngd�}t |��}|�|���}tr|�d��|��}t|_ |D�]"}t|d���5}tr,|�dj d it������|�|��ddd��n #1swxYwY|���D]�}|�|��}|�|��} |D]V} | d ks| |vr� |�|| ��} |�| |��} |�| |��} || f| | <�W��|�����$d |jvrdS|jd ���D]~\} \} } |j�| ��} | rt3| �� } n| d vrt3| ��} t5|| p| | ���]#t6$r}t9|��|�d}~wwxYwdS) z� Adapted from distutils.dist.Distribution.parse_config_files, this method provides the same functionality in subtly-improved ways. r)� ConfigParser) z install-basezinstall-platbasez install-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptsz install-data�prefixz exec-prefix�home�user�rootNz"Distribution.parse_config_files():�utf-8��encodingz reading {filename}r9�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_optionsrh� negative_optr)�setattrrEr%)r�� filenamesr�ignore_options�parser�filename�reader�sectionr-�opt_dict�opt�val�src�aliasrJs r;�_parse_config_filesz Distribution._parse_config_files"s��� .�-�-�-�-�-� �z�S�_�,�,� �B���� �(#�>�2�2�� � ��.�.�0�0�I� � @� �M�M�>� ?� ?� ?������ ���!� � �H��h��1�1�1� )�V��M��M�M�"?�"8�"?�"K�"K�&�(�(�"K�"K�L�L�L�� � ��(�(�(� )� )� )� )� )� )� )� )� )� )� )���� )� )� )� )�"�?�?�,�,� 4� 4�� �.�.��1�1���/�/��8�8��"�4�4�C��j�(�(�C�>�,A�,A� � �*�*�W�c�2�2�C��2�2�3��@�@�C��8�8��g�F�F�C�%-�s�O�H�S�M�M�4� �O�O� � � � � �4�/� /� /� �F� $�3�H�=�C�C�E�E� 5� 5�O�C��#�s��%�)�)�#�.�.�E�� %�#�C�.�.�(����.�.�.���n�n�� 5���e�l�s�C�0�0�0�0��� 5� 5� 5�*�1�-�-�1�4����� 5���� 5� 5s+�A C)�)C- �0C- �H+�+ I �5I�I r;r9c ���d|vs|�|��r|S|�dd��}|jjrd|jj�d�nd}t jd|�d|�d|�d �d |�d |�d |�d �dd���|S)N�-�_� (Affected: �).rNzInvalid 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�rWr5)�_skip_setupcfg_normalizationr rr.r#r6)r�r;r9�underscore_opt�affecteds r;r/z Distribution._enforce_underscoreqs��� �c�>�>�T�>�>�w�G�G�>��J����S�#�.�.��;?�=�;M�U�7���!3�7�7�7�7�SU��$�)� J�#� J� J�W� J� J�.<� J� J� J� �%(� � �6D� � �� � � � 9�!� � � � ��r=c ��|���s|�|��r|S|���}|jjrd|jj�d�nd}t jd|�d|�d|�d�d|�d|�d |�d |�d � d d ���|S)NrCrDrNzInvalid uppercase key rEz# (setup.cfg), please use lowercase rFz$ Usage of uppercase key zL will not be supported in future versions. Please use lowercase rGrHrIrJrK)�islowerrL�lowerrr.r#r6)r�r;r9� lowercase_optrNs r;r0z&Distribution._enforce_option_lowercase�s��� �;�;�=�=� �D�=�=�g�F�F� ��J�� � � � � �;?�=�;M�U�7���!3�7�7�7�7�SU��$�)� ?�S� ?� ?�� ?� ?�$1� ?� ?� ?� �$'� � �/6� � �3@� � �� � � � 9�!� � � � ��r=c�:�d}||vp|�|�� S)N)zoptions.extras_requirezoptions.data_fileszoptions.entry_pointszoptions.package_datazoptions.exclude_package_data)�_is_setuptools_section)r�r9�skips r;rLz)Distribution._skip_setupcfg_normalization�s+�� ���$��J�d�&A�&A�'�&J�&J�"J�Jr=c�X�|dkp$|�d��p|t��vS)Nrr-)r��_setuptools_commands)r�r9s r;rTz#Distribution._is_setuptools_section�s9�� �z� !� 1��!�!�)�,�,� 1��.�0�0�0� r=c �.�|���}|�|�|��}tr|�d|�d���|���D�]3\}\}}tr|�d|�d|�d|�d��� d�|jD��}n#t $rg}YnwxYw |j}n#t $ri}YnwxYw t|t��} ||vr(| r&t|||t|�� ��n`||vr!| rt||t|����n;t||��rt|||��ntd |�d |�d |�d ������#t$r} t| ��| �d} ~ wwxYwdS) 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 rAc�,�g|]}t|����Sr�r')r��os r;r�z5Distribution._set_command_options.<locals>.<listcomp>�s!��W�W�W�a�.�q�1�1�W�W�Wr=z error in z : command 'z' has no such option 'r�)�get_command_namer.r$r&rh�boolean_optionsr8r2rPr/r3r)r�r%rE) r�� command_obj� option_dict� command_namer��sourcer?� bool_opts�neg_opt� is_stringrJs r;�_set_command_optionsz!Distribution._set_command_options�s-��#�3�3�5�5� � � ��.�.�|�<�<�K� � N� �M�M�L�L�L�L�L� M� M� M�'2�'8�'8�':�':� 5� 5� #�F�O�V�U�� I�� � �G�V�G�G��G�G�f�G�G�G�H�H�H� �W�W�;�;V�W�W�W� � ��!� � � �� � � � ���� �%�2����!� � � ����� ���� 5�&�u�c�2�2� ��W�$�$��$��K����i��>N�>N�:N�O�O�O�O��y�(�(�Y�(��K���5�1A�1A�B�B�B�B��[�&�1�1���K���7�7�7�7�.�d�F�d�d�|�d�d�[a�d�d�d������� 5� 5� 5�*�1�-�-�1�4����� 5����1 5� 5s=�B"�" B1�0B1�5B=�= C � C �B!E3�3 F�=F � Fr4�Iterable[StrPath] | Nonec���g}t|jp tjd��}|�<t d�|��}t |d��}t |d��}n|���r|g}||fS)z/Add default file and split between INI and TOMLzpyproject.tomlNc�2�t|��jdkS)Nz.toml)r �suffix)�fs r;r�z8Distribution._get_project_config_files.<locals>.<lambda>�s���Q����'�(A�r=rr)r r�r�curdirr rd�exists)r�r4� tomlfiles�standard_project_metadata�partss r;�_get_project_config_filesz&Distribution._get_project_config_files�s���� �$(���)C�"�)�EU�$V�$V�!� � ��A�A�9�M�M�E��U�1�X���I��U�1�X���I�I� &� -� -� /� /� 4�2�3�I��)�#�#r=F�ignore_option_errorsc�H�|�|��\}}|�|���tj||j|���|D]}t j|||���|���|���|� ��dS)zXParses configuration files from various levels and loads configuration. )r4)rpN) ror?r�parse_configurationr1r�apply_configurationr�r�r�)r�r4rp�inifilesrlr7s r;�parse_config_fileszDistribution.parse_config_files�s���#�<�<�Y�G�G���)� � � �8� �4�4�4��$� �$�&�=Q� � � � �"� T� T�H� � -�d�H�>R� S� S� S� S� ���!�!�!� �)�)�+�+�+� �$�$�&�&�&�&�&r=�requiresr�!list[_pkg_resources_Distribution]c�&�ddlm}|||��S)zResolve pre-setup requirementsr)�_fetch_build_eggs)� installerry)r�rvrys r;�fetch_build_eggszDistribution.fetch_build_eggs�s)�� 1�0�0�0�0�0� � ��x�0�0�0r=c���d}d�}tj|���}tj|j|��}t d�|��}t ||���D] }||���dS)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 r;�by_orderz/Distribution.finalize_options.<locals>.by_order s���4��!�,�,� ,r=r�c�*�|���Srt)r�)rJs r;r�z/Distribution.finalize_options.<locals>.<lambda>s��q�v�v�x�x�r=)r�N)rr�re� filterfalse�_removedr�r)r�r@r��defined�filtered�loadedrIs r;�finalize_optionszDistribution.finalize_optionss���;�� -� -� -��'�e�4�4�4���(����@�@���'�'��2�2����X�.�.�.� � �B� �B�t�H�H�H�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_doctestsr:)rI�removeds r;r�zDistribution._removeds�� � ���w�'�!�!r=c��tjd���D]>}t||jd��}|�$|���||j|���?dS)Nr�r�)rr�r�r.r�)r�rIr?s r;�_finalize_setup_keywordsz%Distribution._finalize_setup_keywords"sb���'�.H�I�I�I� 0� 0�B��D�"�'�4�0�0�E�� ����� � �$����/�/�/�� 0� 0r=c��ddlm}tj�tjd��}tj�|��s�tj|��|�|��tj�|d��}t|dd���5}|� d��|� d ��|� d ��ddd��n #1swxYwY|S) 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. ) rNr�rr rQrjrk�mkdir� hide_filer(�write)r�r�� egg_cache_dir�readme_txt_filenameris r;�get_egg_cache_dirzDistribution.get_egg_cache_dir(sJ��%�%�%�%�%�%��� � �R�Y��8�8� ��w�~�~�m�,�,� M� �H�]� #� #� #� � %� %�m� 4� 4� 4�"$�'�,�,�}�l�"K�"K� ��)�3��A�A�A� M�Q����J�������.�������K�L�L�L� M� M� M� M� M� M� M� M� M� M� M���� M� M� M� M��s�+AC7�7C;�>C;c�&�ddlm}|||��S)z Fetch an egg needed for buildingr)�fetch_build_egg)rzr�)r��reqr�s r;r�zDistribution.fetch_build_egg=s&��.�.�.�.�.�.���t�S�)�)�)r=r�type[distutils.cmd.Command]c���||jvr |j|S|dkrddlm}|Stjd|���}|D]#}|���x|j|<}|cSt j||��S)z(Pluggable version of get_command_class()� bdist_wheelr)r��distutils.commands)r@r.)�cmdclass�command.bdist_wheelr�rr�r�r��get_command_class)r�rr��epsrIr�s r;r�zDistribution.get_command_classCs��� �d�m� #� #��=��)� )� �m� #� #� 8� 8� 8� 8� 8� 8�� ��#�*>�W�M�M�M��� B� B�B�02��� � � 9�D�M�'� "�X��O�O�O� �2�4��A�A� Ar=c��tjd���D]3}|j|jvr#|���}||j|j<�4t j|��S�Nr�r�)rr�r.r�r�r��print_commands�r�rIr�s r;r�zDistribution.print_commandsUs\���'�.B�C�C�C� 2� 2�B��w�d�m�+�+��7�7�9�9��)1�� �b�g�&���+�D�1�1�1r=c��tjd���D]3}|j|jvr#|���}||j|j<�4t j|��Sr�)rr�r.r�r�r��get_command_listr�s r;r�zDistribution.get_command_list\s\���'�.B�C�C�C� 2� 2�B��w�d�m�+�+��7�7�9�9��)1�� �b�g�&���-�d�3�3�3r=c ��|���D]=\}}t|d|zd��}|r ||���'|�||���>dS)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)rhr�� _include_misc)r�r�r�r��includes r;r�zDistribution.includecsn���K�K�M�M� )� )�D�A�q��d�K�!�O�T�:�:�G�� )���� � � � ��"�"�1�a�(�(�(�(�  )� )r=�packagec������dz�|jr��fd�|jD��|_|jr��fd�|jD��|_|jr��fd�|jD��|_dSdS)z9Remove packages, modules, and extensions in named packagerVc�J��g|]}|�k�|�����|�� Sr�r��r��pr��pfxs ��r;r�z0Distribution.exclude_package.<locals>.<listcomp>~s5�������A��L�L����c�AR�AR�L��L�L�Lr=c�J��g|]}|�k�|�����|�� Sr�r�r�s ��r;r�z0Distribution.exclude_package.<locals>.<listcomp>�s6�������a�7�l�l�1�<�<�PS�CT�CT�l��l�l�lr=c�^��g|])}|j�k� |j�����'|��*Sr�)r.r�r�s ��r;r�z0Distribution.exclude_package.<locals>.<listcomp>�sE��� � � ���6�W�$�$�Q�V�->�->�s�-C�-C�$��$�$�$r=N)�packages� py_modules� ext_modules)r�r�r�s `@r;�exclude_packagezDistribution.exclude_packageys�������m�� �=� �������=����D�M� �?� �������?����D�O� � � � � � � � ��)� � � �D� � � � � r=c�z�|dz}|���D] }||ks|�|��rdS�!dS)z<Return true if 'exclude_package(package)' would do somethingrVTF)�iter_distribution_namesr�)r�r�r�r�s r;rXzDistribution.has_contents_for�sT����m���-�-�/�/� � �A��G�|�|�q�|�|�C�0�0�|��t�t���ur=r.r?r,c�n��t�t��st|�dt�d��d���� t ||��}n%#t $r}t|�d���|�d}~wwxYw|�'t|t��st|dz���|rt ||�fd�|D����dSdS)zAHandle 'exclude()' for list/tuple attrs without a special handler�: setting must be of type <rOrA�: No such distribution settingN�4: this setting cannot be changed via include/excludec���g|]}|�v�|�� Sr�r�)r��itemr?s �r;r�z.Distribution._exclude_misc.<locals>.<listcomp>�s#��� K� K� K�$��U�9J�9J��9J�9J�9Jr=)rPr7r&rRr�r8r3)r�r.r?�oldrJs ` r;� _exclude_misczDistribution._exclude_misc�s ����%��+�+� �%��Z�Z�4G�Z�Z�PU�Z�Z�Z��� � V��$��%�%�C�C��� V� V� V�%��&M�&M�&M�N�N�TU� U����� V���� �?�:�c�9�#=�#=�?�%��M�M��� �� M� �D�$� K� K� K� K�#� K� K� K� L� L� L� L� L� M� M��A� A(�A#�#A(c���t|t��st|�dt�d|�d���� t ||���n%#t $r}t|�d���|�d}~wwxYw��t |||��dSt�t��st|dz����fd�|D��}t ||t���|z��dS)zAHandle 'include()' for list/tuple attrs without a special handlerr�rOrAr�Nr�c���g|]}|�v�|�� Sr�r�)r�r�r�s �r;r�z.Distribution._include_misc.<locals>.<listcomp>�s���=�=�=�D�T��_�_�4�_�_�_r=)rPr7r&rRr�r8r3rd)r�r.r?rJ�newr�s @r;r�zDistribution._include_misc�s"����%��+�+� �%��Z�Z�4G�Z�Z�PU�Z�Z�Z��� � V��$��%�%�C�C��� V� V� V�%��&M�&M�&M�N�N�TU� U����� V���� �;� �D�$�� &� &� &� &� &��C��+�+� 1�%��M�M��� �>�=�=�=�E�=�=�=�C� �D�$��S� � �C�� 0� 0� 0� 0� 0r�c ��|���D]=\}}t|d|zd��}|r ||���'|�||���>dS)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)rhr�r�)r�r�r�r��excludes r;r�zDistribution.exclude�sn�� �K�K�M�M� )� )�D�A�q��d�K�!�O�T�:�:�G�� )���� � � � ��"�"�1�a�(�(�(�(�  )� )r=r�c��t|t��stdt�d|�d����t t |j|����dS)Nz#packages: setting must be of type <rOrA)rPr7r&rRrdr�r�)r�r�s r;�_exclude_packageszDistribution._exclude_packages�sa���(�I�.�.� �%�_�6I�_�_�RZ�_�_�_��� � �S��%�x� 0� 0�1�1�1�1�1r=c��|jj|_|jj|_|d}|�d��}||vr9||\}}||=ddl}|�|d��|dd�<|d}||v�9t j|||��}|�|��} t| dd��rd|f|�|��d<|�gS|S)Nr�aliasesTr�command_consumes_arguments� command line�args) � __class__�global_optionsr2r.�shlexr�r��_parse_command_optsr�r�) r�r6r�rr��_srcr>r��nargs� cmd_classs r;r�z Distribution._parse_command_opts�s��"�n�;��� �N�7����q�'���&�&�y�1�1���� � �!�'�*�K�D�%��� � �L�L�L��{�{�5�$�/�/�D��!��H��1�g�G� �� � ��1�$���E�E���*�*�7�3�3� � �9�:�D� A� A� �5C�U�4K�D� � �� )� )�&� 1�� �� �� r=� dict[str, dict[str, str | None]]c ��i}|j���D]�\}}|���D]�\}\}}|dkr�|�dd��}|dkr�|�|��}|j���}|�t|di����|���D]\} } | |kr| }d}n�td���n|dkrd}||� |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�rBrArr2NzShouldn't be able to get herer) r1rhr �get_command_objr2�copy�updater�rFr�) r��d�cmd�optsr;r=r<�cmdobjrb�neg�poss r;�get_cmdline_optionsz Distribution.get_cmdline_options�s@��/1���-�3�3�5�5� 1� 1�I�C��#'�:�:�<�<� 1� 1���Z�c�3��.�(�(���k�k�#�s�+�+���!�8�8�!�1�1�#�6�6�F�"�/�4�4�6�6�G��N�N�7�6�>�2�#F�#F�G�G�G�$+�M�M�O�O�N�N���S��#�:�:�"%�C�"&�C�!�E�&� -�-L�M�M�M�"��A�X�X��C�-0�� � �S�"�%�%�c�*�*�+ 1�.�r=c#��K�|jpdEd{V��|jpdEd{V��|jpdD]G}t|t��r|\}}n|j}|�d��r |dd�}|V��HdS)z@Yield all packages, modules, and extension names in distributionr�N�modulei����)r�r�r�rP�tupler.r)r��extr.� _buildinfos r;r�z$Distribution.iter_distribution_namess������=�&�B�&�&�&�&�&�&�&��?�(�b�(�(�(�(�(�(�(��#�)�r� � �C��#�u�%�%� �#&� ��j�j��x���}�}�X�&�&� !��C�R�C�y���J�J�J�J� � r=c��ddl}|jrtj||��St |jt j��stj||��S|jj� ��dvrtj||��S|jj}|j� d��� tj||��|j� |���S#|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_optionsrP�stdout�io� TextIOWrapperrrQ� reconfigure)r�� option_orderr"rs r;r�z#Distribution.handle_display_options/s�� � � � � � � L� �7��l�K�K� K��#�*�b�&6�7�7� L� �7��l�K�K� K� �:� � $� $� &� &�*;� ;� ;� �7��l�K�K� K��:�&�� � �����0�0�0� 6� �7��l�K�K� �J� "� "�H� "� 5� 5� 5� 5��C�J� "� "�H� "� 5� 5� 5� 5���s �2C"�"C?c�r��|���t���|��dSrt)r��super� run_command)r�rr�s �r;r�zDistribution.run_commandKs5��� ������ �����G�$�$�$�$�$r=rt)r�r�r0rL)r0rL)T)r�r�r�rxr0r)r r/r�rxr0r�)r;r/r9r/r0r/)r9r/r0rx)r4re)NF)r4rerprxr0rL)rvrr0rw)rr/r0r�)r�r/r0rL)r�r/r0rx)r.r/r?r,r0rL)r�r,r0rL)r0r�)2r9� __module__� __qualname__�__doc__r�rdr��__annotations__r�r�r�� staticmethodr�r�r�r�r�� classmethodr�rr?r/r0rLrTrdrorur{r�r�r�r�r�r�r�r�r�r�rXr�r�r�r�r�r�r�r�r�� __classcell__)r�s@r;r+r+�s���������+�+�\*6����*�l�$� �%�� �� '� '�#�"�!�!�!�"�"�"�"�"�@ +� +� +�Q�Q�Q�� � ��\� �D�D�D�&  �  �  �&�&�&�&�PC�C�C�C�(�8<� � � � ��[� �$�6�6�6�6��\�6�rM5�M5�M5�M5�^����(����(K�K�K�K� � � � �+5�+5�+5�+5�Z $� $� $� $�/3�%*�'�'�'�'�'�,1�1�1�1�����$� "� "��\� "�0�0�0� ���**�*�*� B�B�B�B�$2�2�2�4�4�4�)�)�)�)�,����* � � � �M�M�M�M�"1�1�1�1�*)�)�)�)�.2�2�2�2����6%�%�%�%�N��� 6�6�6�8%�%�%�%�%�%�%�%�%�%r=�set[str]c�� tjd��j}d�|D��}n#tj$rg}YnwxYwhtjj�|�S)N� setuptoolsc3�$K�|] }|jV�� dSrtr:)r�rIs r;r�z'_setuptools_commands.<locals>.<genexpr>Xs$����=�=�"�b�g�=�=�=�=�=�=r=)r� distributionr��PackageNotFoundErrorrZr�__all__)r�r�s r;rWrWSsn����,�\�:�:�G� �=�=� �=�=�=���� � (������������ .�Y� � &� -�� -�-s �%(�<�<c��eZdZdZdS)r|zrClass for warning about deprecations in dist in setuptools. Not ignored by default, unlike DeprecationWarning.N)r9r�r�r�r�r=r;r|r|_s"������F�F�F�Fr=r|)r.r/r0r )rHr/r?r,r0rL)rHr/r?r-r0rL)r0r�)j� __future__r� functoolsr�rer�rr�r"�collections.abcrrrrr�pathlibr �typingr r r �more_itertoolsr r�packaging.markersrr�packaging.specifiersrr�packaging.versionrrNrrrrrB� _importlibr�_normalizationr�_pathrr�configrr� discoveryr�errorsr �monkeyr!�warningsr"r#� distutils.cmdrZ�distutils.command�distutils.core�distutils.dist� distutils.log�distutils.debugr$�distutils.errorsr%r&�distutils.fancy_getoptr(�distutils.utilr)�typing_extensionsr*� pkg_resourcesr+�_pkg_resources_Distributionrr�rdr7r/r,r�rRr�r-r<rKrTrbrirgrlrzr}r�r�r�r�r�r��core�cacherWr|r�r=r;�<module>r!s���"�"�"�"�"�"�"����� � � � ��������� � � � � � � � � � � � �H�H�H�H�H�H�H�H�H�H�H�H�������������,�,�,�,�,�,�,�,�,�,�5�5�5�5�5�5�5�5�3�3�3�3�3�3�3�3�?�?�?�?�?�?�?�?�%�%�%�%�%�%������������� !� � � � � �<�<�<�<�<�<�������������+�+�+�+�+�+�+�+�&�&�&�&�&�&�&�&�&�&�&�&�!�!�!�!�!�!�C�C�C�C�C�C�C�C���������������������!�!�!�!�!�!�F�F�F�F�F�F�F�F�4�4�4�4�4�4�$�$�$�$�$�$��J�+�+�+�+�+�+�I�I�I�I�I�I� � �� �4�K� ���U�3��8�_�d�3�i�7�8� �8�8�8�8�3��!&�s�D��c��N�H�S�M�'I�!J��J�J�J�J��K�K�K�K���� � � � � � � �8 � � �������W�W�W� 5�5�5� 2� 2� 2� 2�2�2�2�,�,�,� @� @� @�����?�<�<�<�<�<�<�<�!�M�)�.�"=�>�>�M�\ %�\ %�\ %�\ %�\ %�=�\ %�\ %�\ %�~ ��.�.�.���.�F�F�F�F�F�9�F�F�F�F�Fr=
Memory