� ,�Re��R�dgZddlZddlZddlZddlZddlZddlZddlZddl Zddl Zddl Zddl Zddl mZddlmZddlmZddlmZddlZddlZddlmZmZmZddlmZdd lmZdd lm Z dd l!m"Z"m#Z#dd l m$Z$dd l%m&Z&ddl%m'Z'ddl(m)Z)m*Z*ddl+m,Z,ddl-m.Z.ddl/Z/ddl0Z/ddl/m1Z1ddl2m3Z3ddl4m5Z5m6Z6ddl7m8Z8ddl9Z9ddl:m;Z;ddl-mm?Z?e@d��e@d��d�ZAd�ZBdeCd eCfd!�ZDd"d#d$eCd eeCfd%�ZEd"d#d$eCd eeCfd&�ZFd"d#d$eCd eeeCfd'�ZGd"d#d eeCfd(�ZHd)�ZId*�ZJd+�ZKeLeMfZNd,�ZOd-�ZPd.�ZQd/�ZRd0�ZSd1�ZTd2�ZUd3�ZVd4�ZWd5�ZXd6�ZYd7�ZZd8�Z[e3ej\j]��Z^Gd9�de^��Z]Gd:�d;e.��Z_dS)<� Distribution�N)� strtobool)�DEBUG��translate_longopt)�iglob)�List�Optional� TYPE_CHECKING)�Path)� defaultdict)�message_from_file)�DistutilsOptionError�DistutilsSetupError)� rfc822_escape)� packaging)� ordered_set)�unique_everseen� partition�)�metadata)�SetuptoolsDeprecationWarning)�windows_support)� get_unpatched)�setupcfg� pyprojecttoml)�ConfigDiscovery��version)�_reqs)� _entry_points)�Messagez&setuptools.extern.packaging.specifiersz#setuptools.extern.packaging.versionc�T�tjdt��t|��S)NzDo not call this function)�warnings�warn�DistDeprecationWarningr)�clss ��/builddir/build/BUILDROOT/alt-python311-setuptools-65.6.3-2.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/setuptools/dist.py�_get_unpatchedr)8s$�� �M�-�/E�F�F�F� �� � ��c�b�t|dd��}|�tjd��}||_|S)N�metadata_version�2.1)�getattrr�Versionr,)�self�mvs r(�get_metadata_versionr2=s5�� ��)�4� 0� 0�B� �z� �_�U� #� #�� "��� �Ir*�content�returnc �<�|���}t|��dkr|d���Sd�|d���t jd�|dd�����f��S)zFReverse RFC-822 escaping by removing leading whitespaces from content.rr� N)� splitlines�len�lstrip�join�textwrap�dedent)r3�liness r(�rfc822_unescaper>Esy�� � � � � �E� �5�z�z�Q����Q�x��� � � � �9�9�e�A�h�o�o�'�'������5����9�9M�9M�)N�)N�O� P� P�Pr*�msgr"�fieldc�&�||}|dkrdS|S)zRead Message header field.�UNKNOWNN��r?r@�values r(�_read_field_from_msgrFMs �� ��J�E� � ����t� �Lr*c�H�t||��}|�|St|��S)z4Read Message header field and apply rfc822_unescape.)rFr>rDs r(�_read_field_unescaped_from_msgrHUs)�� ��e� ,� ,�E� �}�� � �5� !� !�!r*c�B�|�|d��}|gkrdS|S)z9Read Message header field and return all results as list.N)�get_all)r?r@�valuess r(�_read_list_from_msgrL]s(�� �[�[��� %� %�F� ��|�|��t� �Mr*c�f�|������}|dks|sdS|S)NrB)� get_payload�strip)r?rEs r(�_read_payload_from_msgrPes7�� �O�O� � � #� #� %� %�E� � ������t� �Lr*c�L�t|��}tj|d��|_t |d��|_t |d��|_t |d��|_t |d��|_d|_t |d��|_ d|_ t |d��|_ t |d ��|_ t|d ��|_t|d ��|_|j�1|jtjd ��krt!|��|_t |d��|_d |vr(t |d ���d��|_t'|d��|_t'|d��|_|jtjd��kr@t'|d��|_t'|d��|_t'|d��|_nd|_d|_d|_t'|d��|_dS)z-Reads the metadata values from a file object.zmetadata-version�namer�summary�authorNz author-emailz home-pagez download-url�license� descriptionr-�keywords�,�platform� classifierz1.1�requires�provides� obsoletesz license-file)rrr/r,rFrRrVrT� maintainer� author_email�maintainer_email�url� download_urlrHrU�long_descriptionrP�splitrWrL� platforms� classifiersr[r\r]� license_files)r0�filer?s r(� read_pkg_filerils��� �D� !� !�C�#�O�C�0B�,C�D�D�D��$�S�&�1�1�D�I�'��Y�7�7�D�L�+�C��;�;�D��&�s�H�5�5�D�K��D�O�,�S�.�A�A�D�� �D��#�C��5�5�D�H�,�S�.�A�A�D��1�#�y�A�A�D�L�:�3� �N�N�D�� ��%� �����!7�!7�7�7� 6�s� ;� ;���+�C��;�;�D���S���,�S�*�=�=�C�C�C�H�H�� �(��j�9�9�D�N�*�3� �=�=�D�� ����� 6� 6�6�6�+�C��<�<�� �+�C��<�<�� �,�S�+�>�>������ ��� ����,�S�.�A�A�D���r*c��d|vrAtjd��|����d��d}|S)zF Quick and dirty validation for Summary pypa/setuptools#1390. r6z1newlines not allowed and will break in the futurer)r$r%rOrd)�vals r(� single_linerl�sE�� �s�{�{� � �I�J�J�J��i�i�k�k����%�%�a�(�� �Jr*c����|���}�fd�}|dt|����|d|�����|d|�����|���}|r|dt |����d}|D]$\}}t ||d��}|� |||���%|���} | r|dt| ����|j � ��D]} |d d | z���d � |� ����} | r |d | ��|� ��pg} | D]} |d | ���|��d|�����|��d|�����|��d|�����|��d|�����t'|d��r|d|j��|jr|d|j��|jr|jD]}|d|���|��d|jpg��|���}|rD��d|z��|�d��s��d��dSdSdS)z0Write the PKG-INFO format data to a file object.c�>����|�d|�d���dS)Nz: r6)�write)�keyrErhs �r(� write_fieldz#write_pkg_file..write_field�s(��� � � ����e�e�e�,�-�-�-�-�-r*zMetadata-Version�Namer/�Summary))z Home-pagera)z Download-URLrb)�AuthorrT)z Author-emailr_)� Maintainerr^)zMaintainer-emailr`N�Licensez Project-URLz%s, %srX�Keywords�Platform� Classifier�Requires�Provides� Obsoletes�python_requireszRequires-PythonzDescription-Content-TypezProvides-Extraz License-Filez %sr6)r2�str�get_name� get_version�get_descriptionrlr.� get_licenser� project_urls�itemsr:� get_keywords� get_platforms� _write_list�get_classifiers� get_requires� get_provides� get_obsoletes�hasattrr}�long_description_content_type�provides_extrasrg�get_long_descriptionro�endswith)r0rhrrqrS�optional_fieldsr@�attr�attr_valrU� project_urlrWrerY�extrarcs ` r(�write_pkg_filer��s}����'�'�)�)�G�.�.�.�.�.��K�"�C��L�L�1�1�1��K��� � ���(�(�(��K� �4�+�+�-�-�.�.�.��"�"�$�$�G��5�� �I�{�7�3�3�4�4�4��O�'�)�)� ��t��4��t�,�,�� � � �K��x� (� (� (����� � �G��7�� �I�}�W�5�5�6�6�6��(�.�.�0�0�;�;� �� �M�8�k�#9�:�:�:�:��x�x��)�)�+�+�,�,�H��*�� �J��)�)�)��"�"�$�$�*��I��*�*��� �J��)�)�)�)����T�<��)=�)=�)?�)?�@�@�@� ���T�:�t�'8�'8�':�':�;�;�;����T�:�t�'8�'8�':�':�;�;�;����T�;��(:�(:�(<�(<�=�=�=��t�&�'�'�=�� �%�t�';�<�<�<� �)�T�� �.��0R�S�S�S� ��1��)� 1� 1�E� �K�(�%� 0� 0� 0� 0����T�>�4�+=�+C��D�D�D��0�0�2�2���� � � �6�,�,�-�-�-��(�(��.�.� � �J�J�t� � � � � ��� � r*c�� tj|dd���}|jrJ�dS#ttt t f$r}t|�d|�d���|�d}~wwxYw)N)rErR�groupz/ must be importable 'module:attrs' string (got �))r� EntryPoint�extras� TypeError� ValueError�AttributeError�AssertionErrorr)�distr�rE�ep�es r(�check_importabler��s��� � �u�4�t� D� D� D���9������� �z�>�>� B����!�FJ�d�d�E�E�E� R� � �� ��������s� $�A�A�Ac��� t|ttf��sJ�d�|��|ksJ�dS#tt t tf$r}t|�d|�d���|�d}~wwxYw)z"Verify that value is a string list�z must be a list of strings (got r�N) � isinstance�list�tupler:r�r�r�r�r�r�r�rEr�s r(�assert_string_listr��s��� ��%�$���/�/�/�/�/��w�w�u�~�~��&�&�&�&�&�&�� �z�>�>� B����!�7;�t�t�U�U�U� C� � �� ��������s�9=�A5�A0�0A5c�B�|}t|||��|D]�}|�|��stdd|zz���|�d��\}}}|r%||vr!tj�d||��d}tj|t����dS)z(Verify that namespace packages are validz1Distribution contains no modules or packages for znamespace package %r�.z^WARNING: %r is declared as a package namespace, but %r is not: please correct this in setup.pyzeThe namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420).N) r��has_contents_forr� rpartition� distutils�logr%r$r) r�r�rE� ns_packages�nsp�parent�sep�childr?s r(� check_nspr�s����K��t�T�;�/�/�/��9�9���$�$�S�)�)� �%�C�(�3�.�/��� �!�^�^�C�0�0����U� � �f�K�/�/� �M� � �;���  � � � D� � � �c�7�8�8�8�8�%9�9r*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) r�� itertools�starmap� _check_extrar�r�r�r�rr�s r(� check_extrasr� sr��� �Y� �|�U�[�[�]�]� ;� ;�<�<�<�<�<�� �z�>� 2����!� &� � ��  ��������s�9=�A)�A$�$A)c���|�d��\}}}|r&tj|��rtd|z���t t j|����dS)N�:zInvalid environment marker: )r� pkg_resources�invalid_markerrr�r �parse)r��reqsrRr��markers r(r�r�,sh������,�,��D�#�v� �K�-�.�v�6�6�K�!�"@�6�"I�J�J�J����T� � �����r*c�x�t|��|kr&d}t|�||������dS)z)Verify that value is True, False, 0, or 1z0{attr!r} must be a boolean value (got {value!r}))r�rEN)�boolr�format)r�r�rE�tmpls r(� assert_boolr�3s>�� �E�{�{�e���A��!�$�+�+�4�u�+�"E�"E�F�F�F��r*c�h�|stj|�d�t��dSt|�d����)Nz is ignored.z is invalid.)r$r%r&r�r�r�rEs r(�invalid_unless_falser�:sB�� ��� ��+�+�+�-C�D�D�D��� ��3�3�3� 4� 4�4r*c� � ttj|����t|tt f��rt d���dS#t tf$r,}d}t|� ||�����|�d}~wwxYw)z9Verify that install_requires is a valid requirements listzUnordered types are not allowedzm{attr!r} must be a string or list of strings containing valid project/version requirement specifiers; {error}�r��errorN) r�r r�r��dict�setr�r�rr��r�r�rEr�r�s r(�check_requirementsr�As��� R� �U�[�� � � � � � �e�d�C�[� )� )� ?��=�>�>� >� ?� ?�� �z� "�R�R�R� O� �"�$�+�+�4�u�+�"E�"E�F�F�E�Q����� R���s�A A�B �!'B�B c��� tj�|��dS#tjjtf$r,}d}t |�||�����|�d}~wwxYw)z.Verify that value is a valid version specifierzF{attr!r} must be a string containing valid version specifiers; {error}r�N)r� specifiers� SpecifierSet�InvalidSpecifierr�rr�r�s r(�check_specifierr�Os}��R���)�)�%�0�0�0�0�0�� � � 1�>� B�R�R�R� W� �"�$�+�+�4�u�+�"E�"E�F�F�E�Q����� R���s�#�A*�'A%�%A*c�t� tj|��dS#t$r}t|��|�d}~wwxYw)z)Verify that entry_points map is parseableN)r!�load� Exceptionrr�s r(�check_entry_pointsr�ZsM��,���5�!�!�!�!�!�� �,�,�,�!�!�$�$�!�+�����,���s�� 7�2�7c�N�t|t��std���dS)Nztest_suite must be a string)r�r~rr�s r(�check_test_suiter�bs0�� �e�S� !� !�A�!�"?�@�@�@�A�Ar*c�`�t|t��s"td�|�����|���D]a\}}t|t ��s#td�||�����t |d�|��|���bdS)z@Verify that value is a dictionary of package names to glob listszT{!r} must be a dictionary mapping package names to lists of string wildcard patternsz,keys of {!r} dict must be strings (got {!r})zvalues of {!r} dictN)r�r�rr�r�r~r�)r�r�rE�k�vs r(�check_package_datar�gs��� �e�T� "� "� �!� '�'-�v�d�|�|� � � �� � � � �H�H���1��!�S�!�!� �%�>�E�E�d�A�N�N��� � �4�!6�!=�!=�d�!C�!C�Q�G�G�G�G� H�Hr*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�matchr�r�r%)r�r�rE�pkgnames r(�check_packagesr�vsR�������x���0�0� � �M� � �8�� � � ���r*c���eZdZdZd�eejd�d�d�ZdZd�Z d1d�Z d �Z d �Z e d ���Ze d ���Zd �Zd�Ze d���Zd�Zd�Zd�Ze d���Zd1d�Zd�Zd�Zd�Zd1d�Zd�Zd2d�Zd�Zd�Ze d���Z d�Z!d �Z"d!�Z#d"�Z$d#�Z%d$�Z&d%�Z'd&�Z(d'�Z)d(�Z*d)�Z+d*�Z,d+�Z-d,�Z.d-�Z/d.�Z0d/�Z1�fd0�Z2�xZ3S)3raG 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. 'test_suite' -- the name of a test suite to run for the 'test' command. If the user runs 'python setup.py test', the package will be installed, and the named test suite will be run. The format is the same as would be used on a 'unittest.py' command line. That is, it is the dotted name of an object to import and call to generate a test suite. '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��dS�NrCrCr*r(�zDistribution.�s���r*c��dSr�rCrCr*r(r�zDistribution.�s���r*c��dSr�rCrCr*r(r�zDistribution.�s���r*)r�r�r�� license_filergNc�t�|rd|vsd|vrdStjt|d�������}tjj�|��}|�J|�d��s7tjt|d����|_ ||_ dSdSdS)NrRrzPKG-INFO) r�� safe_namer~�lower� working_set�by_key�get� has_metadata� safe_version�_version� _patched_dist)r0�attrsrpr�s r(�patch_missing_pkg_infoz#Distribution.patch_missing_pkg_info�s��� � ��e�+�+�y��/E�/E� �F��%�c�%��-�&8�&8�9�9�?�?�A�A���(�/�3�3�C�8�8�� � �D�$5�$5�j�$A�$A� �)�6�s�5��;K�7L�7L�M�M�D�M�!%�D� � � � � � � r*c�X��t�d��}|si�_|pi}g�_|�dd���_��|��|�dg���_|�dg���_tj d���D]*}t���� |j d���+t���fd�|���D����i�_g�_t%t&j���_t-����_��|�������jj�����j_����dS)N� package_data�src_root�dependency_links�setup_requires�distutils.setup_keywords�r�c�.��i|]\}}|�jv�||��SrC)�_DISTUTILS_UNSUPPORTED_METADATA��.0r�r�r0s �r(� z)Distribution.__init__..�s7��� � � ��A�q��D�@�@�@��1�@�@�@r*)r�r�� dist_files�popr�r�r�r�r� entry_points�vars� setdefaultrR� _Distribution�__init__r��_orig_extras_require�_orig_install_requiresr r� OrderedSet�_tmp_extras_requirer� set_defaults�_set_metadata_defaults�_normalize_version�_validate_versionr�_finalize_requires)r0r��have_package_datar�s` r(r zDistribution.__init__�s����#�D�.�9�9�� � #� "�D� �� ������� � �*�d�3�3�� � �#�#�E�*�*�*� %� � �*<�b� A� A���#�i�i�(8�"�=�=����'�.H�I�I�I� 1� 1�B� ��J�J� !� !�"�'�4� 0� 0� 0� 0���� � � � � �!�K�K�M�M� � � � � � �%'��!�&(��#�#.�{�/E�#F�#F�� �+�D�1�1��� �#�#�E�*�*�*� $� 7� 7� � "� "�4�=�#8� 9� 9�! �! �� �� ���!�!�!�!�!r*c���dh}�fd�t�j��D��}||z }|rd|��}t|���dS)NrRc�@��h|]}t�j|d���|��Sr�)r.r)rrpr0s �r(� z2Distribution._validate_metadata..�s7��� � � ���t�}�c�4�0�0�<� �<�<��D� �M�+�$�+�1�1����1�1� 2� 2� 2�� ��r*c�6�t|tj��rt|��}|�m tj�|��nL#tjjtf$r.tj d|z��tj |��cYSwxYw|S)Nz�The version specified (%r) is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.) r��numbers�Numberr~rrr/�InvalidVersionr�r$r%r!r"rs r(rzDistribution._validate_versions��� �g�w�~� .� .� #��'�l�l�G� � � /��!�)�)�'�2�2�2�2���%�4�i�@� /� /� /�� ��")�)���� "�~�g�.�.�.�.�.� /�����s�A � AB�Bc���t|dd��r|j|j_t|dd��rk|jp|j|_|j���D]>}|�d��d}|r|jj�|���?t|dd��r|j s |j |_ |� ��|� ��dS)z� Set `metadata.python_requires` and fix environment markers in `install_requires` and `extras_require`. r}N�extras_requirer�r�install_requires) r.r}rr r*�keysrdr��addr r+�_convert_extras_requirements�"_move_install_requirements_markers)r0r�s r(rzDistribution._finalize_requires(s��� �4�*�D� 1� 1� A�,0�,@�D�M� )� �4�)�4� 0� 0� =�(,�(A�(X�T�EX�D� %��,�1�1�3�3� =� =��� � �C�(�(��+���=��M�1�5�5�e�<�<�<�� �4�+�T� 2� 2� @�4�;V� @�*.�*?�D� '� �)�)�+�+�+� �/�/�1�1�1�1�1r*c�v�t|dd��pi}ttj��}t|d|��|_|���D]a\}}|j|t j|��D]:}|�|��}|j||z� |���;�bdS)z� Convert requirements in `extras_require` of the form `"extra": ["barbazquux; {marker}"]` to `"extra:{marker}": ["barbazquux"]`. r*Nr) r.r rrrr�r r�� _suffix_for�append)r0� spec_ext_reqs�tmp�sectionr��r�suffixs r(r.z)Distribution._convert_extras_requirementsBs���  ��&6��=�=�C�� ��+�0�1�1��#*�4�1F��#L�#L�� �'�-�-�/�/� E� E�J�G�Q� � $�W� -� -��[��^�^� E� E���)�)�!�,�,���(��6�)9�:�A�A�!�D�D�D�D� E� E� Er*c�B�|jrdt|j��zndS)ze For a requirement, return the 'extras_require' suffix for that requirement. r�r�)r�r~��reqs r(r1zDistribution._suffix_forRs#�� ),� �:�s�S���_�_�$�$��:r*c����d�}t�dd��pd}ttj|����}t ||��}t j||��}ttt|�����_ |D]7}�j dt|j ��z� |���8t�fd��j ���D�����_dS)zv Move requirements in `install_requires` that are using environment markers `extras_require`. c��|j Sr��r�r9s r(� is_simple_reqzFDistribution._move_install_requirements_markers..is_simple_reqds ���z�>� !r*r+NrCr�c 3��K�|]M\}}|tt�d�t�j|��D������fV��NdS)c3�4K�|]}t|��V��dSr�)r~)rr6s r(� zLDistribution._move_install_requirements_markers...qs(����"K�"K�a�3�q�6�6�"K�"K�"K�"K�"K�"Kr*N)r�r��fromkeys�map� _clean_reqrs �r(rAzBDistribution._move_install_requirements_markers..osq�����# �# ���1���T�]�]�"K�"K�3�t���3J�3J�"K�"K�"K�K�K�L�L� M�# �# �# �# �# �# r*)r.r�r r��filterr�� filterfalserCr~r+rr�r2r�r�r*)r0r>�spec_inst_reqs� inst_reqs� simple_reqs� complex_reqsr6s` r(r/z/Distribution._move_install_requirements_markersZs ��� "� "� "�!��'9�4�@�@�F�B�����^�4�4�5�5� ��]�I�6�6� � �,�]�I�F�F� � $�S��k�%:�%:� ;� ;���� D� D�A� � $�S�3�q�x�=�=�%8� 9� @� @�� C� C� C� C�"�# �# �# �# ��0�6�6�8�8�# �# �# � � ����r*c��d|_|S)zP Given a Requirement, remove environment markers and return it. Nr=)r0r:s r(rDzDistribution._clean_requs���� �� r*c���|jj}|r|ng}|jj}|r||vr|�|��|�|�d}t t |�|������|j_dS)z>> list(Distribution._expand_patterns(['LICENSE'])) ['LICENSE'] >>> list(Distribution._expand_patterns(['setup.cfg', 'LIC*'])) ['setup.cfg', 'LICENSE'] c3��K�|]Y}tt|����D]:}|�d���tj�|���6|V��;�ZdS)�~N)�sortedrr��os�path�isfile)r�patternrUs r(rAz0Distribution._expand_patterns..�s����� � ���u�W�~�~�.�.� � ���=�=��%�%�  �+-�'�.�.��*>�*>�  � � � � � � � � r*rC)rNs r(rMzDistribution._expand_patterns�s#�� � �#� � � � r*c ��ddlm}tjtjkrgngd�}t |��}|�|���}tr|�d��|��}t|_ |D�]'}tj |d���5}tr,|�dj d it������|�|��ddd��n #1swxYwY|���D]�}|�|��}|�|��} |D]V} | d ks| |vr� |�|| ��} |�| |��} |�| |��} || f| | <�W��|�����)d |jvrdS|jd ���D]~\} \} } |j�| ��} | rt5| �� } n| d vrt5| ��} t7|| p| | ���]#t8$r}t;|��|�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}�__name__�global)�verbose�dry_runrC)� configparserrY�sysrZ� base_prefix� frozenset�find_config_filesr�announcer~� optionxform�io�openr�r#� read_file�sections�options�get_option_dictr��warn_dash_deprecation�make_option_lowercaser �command_optionsr�� negative_optr�setattrr�r)r0� filenamesrY�ignore_options�parser�filename�readerr5rp�opt_dict�optrk�src�aliasr�s r(�_parse_config_filesz Distribution._parse_config_files�s��� .�-�-�-�-�-� �z�S�_�,�,� �B���� �(#�>�2�2�� � ��.�.�0�0�I� � @� �M�M�>� ?� ?� ?������ ���!� � �H����G�4�4�4� )���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��4�4�S�'�B�B�C��4�4�S�'�B�B�C�%-�s�O�H�S�M�M�4� �O�O� � � � � �4�/� /� /� �F� "&�!5�h�!?�!E�!E�!G�!G� 5� 5� �S�*�3���%�)�)�#�.�.�E�� %�#�C�.�.�(����.�.�.���n�n�� 5���e�l�s�C�0�0�0�0��� 5� 5� 5�*�1�-�-�1�4����� 5���� 5� 5s+�A C.�.C2 �5C2 �H0�0 I�:I � Ic�D�|dvr|S|�dd��}ttjtjj|�������}|�d��s |dkr||vr|Sd|vrtj d|�d|�d���|S) N)zoptions.extras_requirezoptions.data_files�-�_rprzUsage of dash-separated 'zL' will not be supported in future versions. Please use the underscore name '� ' instead) �replacer�r��chainr��command�__all__�_setuptools_commands� startswithr$r%)r0r}r5�underscore_opt�commandss r(rrz"Distribution.warn_dash_deprecation�s��� � � � ��J����S�#�.�.��� �� � � %� � %� %� '� '� � � � �� �"�"�9�-�-� "��:�%�%��x�'�'�!� !� �#�:�:� �M�M��3�3����(� � � � �r*c�n� tjd��jjS#tj$rgcYSwxYw)Nr!)r� distributionr�names�PackageNotFoundError)r0s r(r�z!Distribution._setuptools_commands sE�� ��(��6�6�C�I� I���,� � � ��I�I�I� ���s � �4�4c ��|dks|���r|S|���}tjd|�d|�d|�d���|S)NrzUsage of uppercase key 'z' in 'z?' will be deprecated in future versions. Please use lowercase 'r�)�islowerr�r$r%)r0r}r5� lowercase_opts r(rsz"Distribution.make_option_lowercasesd�� �j� � �C�K�K�M�M� ��J�� � � � � �� � ��s�s�G�G�G�]�]�]� ,� � � � �r*c �,�|���}|�|�|��}tr|�d|z��|���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 '%s' command:z z = z (from r�c�,�g|]}t|����SrCr)r�os r(� z5Distribution._set_command_options..3s!��W�W�W�a�.�q�1�1�W�W�Wr*z error in z : command 'z' has no such option '�')�get_command_namerqrrjr��boolean_optionsr�rur�r~rvrr�rr�) r0� command_obj� option_dict� command_namer�sourcerE� bool_opts�neg_opt� is_stringr�s r(�_set_command_optionsz!Distribution._set_command_optionss��#�3�3�5�5� � � ��.�.�|�<�<�K� � P� �M�M�?�,�N� O� O� O�)4�):�):�)<�)<� 5� 5� %�V�_�f�e�� Q�� � � ����������O�P�P�P� �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�.�.�!�6�6�<�<�<����9������� 5� 5� 5�*�1�-�-�1�4����� 5����3 5� 5s=�B!�! B0�/B0�4B<�< C � C �B!E2�2 F�<F � Fc���g}t|jp tjd��}|�.Ps���Q����'�(A�r*rr)r r�rT�curdirrr��exists)r0rw� tomlfiles�standard_project_metadata�partss r(�_get_project_config_filesz&Distribution._get_project_config_filesKs���� �$(���)C�"�)�EU�$V�$V�!� � ��A�A�9�M�M�E��U�1�X���I��U�1�X���I�I� &� -� -� /� /� 4�2�3�I��)�#�#r*Fc� �|�|��\}}|�|���tj||j|���|D]}t j|||���|���|���dS)zXParses configuration files from various levels and loads configuration. )rw)�ignore_option_errorsN) r�r�r�parse_configurationrtr�apply_configurationrrO)r0rwr��inifilesr�rzs r(�parse_config_fileszDistribution.parse_config_filesWs���#�<�<�Y�G�G���)� � � �8� �4�4�4��$� �$�&�=Q� � � � �"� T� T�H� � -�d�H�>R� S� S� S� S� ���!�!�!� �$�$�&�&�&�&�&r*c���tj�tj|��|jd���}|D]#}tj�|d����$|S)zResolve pre-setup requirementsT)� installer�replace_conflicting)r�)r�r��resolver r��fetch_build_eggr-)r0r[�resolved_distsr�s r(�fetch_build_eggszDistribution.fetch_build_eggshsk��&�2�:�:� �K�� !� !��*� $�;� � �� #� >� >�D� � %� )� )�$�� )� =� =� =� =��r*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..by_order|s���4��!�,�,� ,r*r�c�*�|���Sr�)r�)r�s r(r�z/Distribution.finalize_options..�s��q�v�v�x�x�r*)rpN)rrr�rF�_removedrCrS)r0r�r��defined�filtered�loadedr�s r(�finalize_optionszDistribution.finalize_optionsss���;�� -� -� -��'�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_doctests)rR)r��removeds r(r�zDistribution._removed�s�� � ���w�'�!�!r*c��tjd���D]>}t||jd��}|�$|���||j|���?dS)Nr�r�)rrr.rRr�)r0r�rEs r(�_finalize_setup_keywordsz%Distribution._finalize_setup_keywords�sb���'�.H�I�I�I� 0� 0�B��D�"�'�4�0�0�E�� ����� � �$����/�/�/�� 0� 0r*c���tj�tjd��}tj�|��s�tj|��t j|��tj�|d��}t|d��5}|� d��|� d��|� d��ddd��n #1swxYwY|S)Nz.eggsz README.txt�wzcThis 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. ) rTrUr:r�r��mkdirr� hide_filermro)r0� egg_cache_dir�readme_txt_filenamer�s r(�get_egg_cache_dirzDistribution.get_egg_cache_dir�s0���� � �R�Y��8�8� ��w�~�~�m�,�,� M� �H�]� #� #� #� � %�m� 4� 4� 4�"$�'�,�,�}�l�"K�"K� ��)�3�/�/� M�1����J�������.�������K�L�L�L� M� M� M� M� M� M� M� M� M� M� M���� M� M� M� M��s�"AC.�.C2�5C2c�&�ddlm}|||��S)z Fetch an egg needed for buildingr)r�)�setuptools.installerr�)r0r:r�s r(r�zDistribution.fetch_build_egg�s&��8�8�8�8�8�8���t�S�)�)�)r*c���||jvr |j|Stjd|���}|D]#}|���x|j|<}|cSt�||��S)z(Pluggable version of get_command_class()�distutils.commands)r�rR)�cmdclassrrr�r �get_command_class)r0r��epsr�r�s r(r�zDistribution.get_command_class�s{�� �d�m� #� #��=��)� )��#�*>�W�M�M�M��� B� B�B�02��� � � 9�D�M�'� "�X��O�O�O� �2�2�4��A�A� Ar*c���tjd���D]3}|j|jvr#|���}||j|j<�4t �|��S�Nr�r�)rrrRr�r�r �print_commands�r0r�r�s r(r�zDistribution.print_commands�s_���'�.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 �|��Sr�)rrrRr�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)r�r.� _include_misc)r0r�r�r��includes r(r�zDistribution.include�sn���K�K�M�M� )� )�D�A�q��d�K�!�O�T�:�:�G�� )���� � � � ��"�"�1�a�(�(�(�(�  )� )r*c������dz�|jr��fd�|jD��|_|jr��fd�|jD��|_|jr��fd�|jD��|_dSdS)z9Remove packages, modules, and extensions in named packager�c�J��g|]}|�k�|�����|�� SrC�r��r�p�package�pfxs ��r(r�z0Distribution.exclude_package..�s5�������A��L�L����c�AR�AR�L��L�L�Lr*c�J��g|]}|�k�|�����|�� SrCr�r�s ��r(r�z0Distribution.exclude_package..�s6�������a�7�l�l�1�<�<�PS�CT�CT�l��l�l�lr*c�^��g|])}|j�k� |j�����'|��*SrC)rRr�r�s ��r(r�z0Distribution.exclude_package..�sE��� � � ���6�W�$�$�Q�V�->�->�s�-C�-C�$��$�$�$r*N)�packages� py_modules� ext_modules)r0r�r�s `@r(�exclude_packagezDistribution.exclude_package�s�������m�� �=� �������=����D�M� �?� �������?����D�O� � � � � � � � ��)� � � �D� � � � � r*c�z�|dz}|���D] }||ks|�|��rdS�!dS)z.s#��� K� K� K�$��U�9J�9J��9J�9J�9Jr*�r��sequencerr.r�rv)r0rRrE�oldr�s ` r(� _exclude_misczDistribution._exclude_miscs�����%��*�*� �%�>B�d�d�E�E�E�J��� � X��$��%�%�C�C��� X� X� X�%�&H�4�&O�P�P�VW� W����� X���� �?�:�c�8�#<�#<�?�%��M�M��� �� M� �D�$� K� K� K� K�#� K� K� K� L� L� L� L� L� M� M��>� A �A�A c���t|t��st|�d|�d���� t||���n%#t$r}td|z��|�d}~wwxYw��t |||��dSt�t��st|dz����fd�|D��}t ||�|z��dS)zAHandle 'include()' for list/tuple attrs without a special handlerz: setting must be a list (r�r�Nr�c���g|]}|�v�|�� SrCrC)rr�r�s �r(r�z.Distribution._include_misc..!s���=�=�=�D�T��_�_�4�_�_�_r*r�)r0rRrEr��newr�s @r(r�zDistribution._include_miscs����%��*�*� Y�%�4�4�4�QV�QV�QV�&W�X�X� X� X��$��%�%�C�C��� X� X� X�%�&H�4�&O�P�P�VW� W����� X���� �;� �D�$�� &� &� &� &� &��C��*�*� +�%��M�M��� �>�=�=�=�E�=�=�=�C� �D�$��c� � *� *� *� *� *r�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)r�r.r�)r0r�r�r��excludes r(r�zDistribution.exclude$sn�� �K�K�M�M� )� )�D�A�q��d�K�!�O�T�:�:�G�� )���� � � � ��"�"�1�a�(�(�(�(�  )� )r*c��t|t��std|�d����tt |j|����dS)Nz+packages: setting must be a list or tuple (r�)r�r�rr�rCr�)r0r�s r(�_exclude_packageszDistribution._exclude_packages;sV���(�H�-�-� �%�%�DL�H�H�N��� � �S��%�x� 0� 0�1�1�1�1�1r*c��|jj|_|jj|_|d}|�d��}||vr9||\}}||=ddl}|�|d��|dd�<|d}||v�9t �|||��}|�|��} t| dd��rd|f|�|��d<|�gS|S)Nr�aliasesTr�command_consumes_arguments� command line�args) � __class__�global_optionsrurq�shlexrdr �_parse_command_optsr�r.) r0ryrr�rr~rr �nargs� cmd_classs r(r z Distribution._parse_command_optsBs��"�n�;��� �N�7����q�'���&�&�y�1�1���� � � ��)�J�C���� � �L�L�L��{�{�5�$�/�/�D��!��H��1�g�G� �� � ��1�1�$���E�E���*�*�7�3�3� � �9�:�D� A� A� �5C�U�4K�D� � �� )� )�&� 1�� �� �� r*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. rr�r�rruNzShouldn't be able to get herer) rtr�r��get_command_objru�copy�updater.r�r ) r0�d�cmd�optsr}r~rk�cmdobjr��neg�poss r(�get_cmdline_optionsz Distribution.get_cmdline_options]s@�� ���-�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�0�r*c#��K�|jpdD]}|V��|jpdD]}|V��|jpdD]G}t|t��r|\}}n|j}|�d��r |dd�}|V��HdS)z@Yield all packages, modules, and extension names in distributionrC�moduleNi����)r�r�r�r�r�rRr�)r0�pkgr�extrR� buildinfos r(r�z$Distribution.iter_distribution_names�s������=�&�B� � �C��I�I�I�I��o�+�� � �F��L�L�L�L��#�)�r� � �C��#�u�%�%� �"%���i�i��x���}�}�X�&�&� !��C�R�C�y���J�J�J�J� � r*c�4�ddl}|jrt�||��St |jt j��st�||��S|jj� ��dvrt�||��S|jj}|j� d��� t�||��|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^�utf8r^r_) rf� help_commandsr �handle_display_optionsr��stdoutrl� TextIOWrapperr`r�� reconfigure)r0� option_orderrfr`s r(r z#Distribution.handle_display_options�s �� � � � � � � L� �7�7��l�K�K� K��#�*�b�&6�7�7� L� �7�7��l�K�K� K� �:� � $� $� &� &�*;� ;� ;� �7�7��l�K�K� K��:�&�� � �����0�0�0� 6� �7�7��l�K�K� �J� "� "�H� "� 5� 5� 5� 5��C�J� "� "�H� "� 5� 5� 5� 5���s �C:�:Dc�r��|���t���|��dSr�)r�super� run_command)r0r�rs �r(r'zDistribution.run_command�s5��� ������ �����G�$�$�$�$�$r*r�)NF)4ra� __module__� __qualname__�__doc__r�rrrr�r�r rr� staticmethodrrrr.r1r/rDrOrMr�rrr�rsr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr rr�r r'� __classcell__)rs@r(rr�s-�������1�1�h*6���&�1�$� �%�� '�'�#��M� &� &� &�""�""�""�""�H +� +� +�Q�Q�Q�� � ��\� �����\��$2�2�2�4E�E�E� �;�;��\�;� � � �6��� � � �&�  �  ��\�  �M5�M5�M5�M5�^���6��� � � �,5�,5�,5�,5�\ $� $� $�'�'�'�'�" � � ����$� "� "��\� "�0�0�0� ���&*�*�*� B� B� B�2�2�2�4�4�4�)�)�)�,���*���M�M�M�"+�+�+�&)�)�)�.2�2�2����6&�&�&�P���$6�6�6�8%�%�%�%�%�%�%�%�%r*c��eZdZdZdS)r&zrClass for warning about deprecations in dist in setuptools. Not ignored by default, unlike DeprecationWarning.N)rar(r)r*rCr*r(r&r&�s"������F�F�F�Fr*r&)`r�rlrfr�rTr$r&� distutils.logr��distutils.core� distutils.cmd�distutils.dist�distutils.command�distutils.utilr�distutils.debugr�distutils.fancy_getoptr�globrr�r;�typingr r r �pathlibr � collectionsr �emailr�distutils.errorsrrr�setuptools.externrr� setuptools.extern.more_itertoolsrr� _importlibrr�rr!�setuptools.commandr�setuptools.monkeyr�setuptools.configrr�setuptools.discoveryrr��setuptools.extern.packagingrr r!� email.messager"� __import__r)r2r~r>rFrHrLrPrirlr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��corerr r&rCr*r(�rGs0�� � �� � � � � � � � � � � � � � � � �����������������������������$�$�$�$�$�$�!�!�!�!�!�!�4�4�4�4�4�4���������������0�0�0�0�0�0�0�0�0�0�������#�#�#�#�#�#�#�#�#�#�#�#�F�F�F�F�F�F�F�F�(�(�(�(�(�(�'�'�'�'�'�'�)�)�)�)�)�)�G�G�G�G�G�G�G�G� � � � � � �*�*�*�*�*�*���������&�&�&�&�&�&�+�+�+�+�+�+�5�5�5�5�5�5�5�5�0�0�0�0�0�0�����/�/�/�/�/�/��������������&�%�%�%�%�%�%� � � 3�4�4�4� � � 0�1�1�1���� ���Q�S�Q�S�Q�Q�Q�Q��i������ �����"� �"�#�"�(�3�-�"�"�"�"��Y��s��x��S� �7J������ ��h�s�m�����)B�)B�)B�X � � �D�D�D�N �$�;����� � � �9�9�9�2 � � ����G�G�G�5�5�5� R� R� R�R�R�R�,�,�,�A�A�A� H� H� H����� �i�n�9�:�:� �u %�u %�u %�u %�u %�=�u %�u %�u %�pF�F�F�F�F�9�F�F�F�F�Fr*