Current File : //usr/lib/python3/dist-packages/pip/_internal/__pycache__/pyproject.cpython-312.pyc
�

/�g�����ddlZddlZddlmZddlmZmZmZddl	m
Z
ddlmZm
Z
ddlmZmZmZdedefd	�Zd
edefd�Zedgd
��Zdeededededeef
d�Zy)�N)�
namedtuple)�Any�List�Optional)�tomli)�InvalidRequirement�Requirement)�InstallationError�InvalidPyProjectBuildRequires�MissingPyProjectBuildRequires�obj�returnc�J�t|t�xrtd�|D��S)Nc3�<K�|]}t|t����y�w)N)�
isinstance�str)�.0�items  �9/usr/lib/python3/dist-packages/pip/_internal/pyproject.py�	<genexpr>z"_is_list_of_str.<locals>.<genexpr>s����(O�4��D�#�)>�(O�s�)r�list�all)r
s r�_is_list_of_strrs���c�4� �O�S�(O�3�(O�%O�O��unpacked_source_directoryc�B�tjj|d�S)Nzpyproject.toml)�os�path�join)rs r�make_pyproject_pathr s��
�7�7�<�<�1�3C�D�Dr�BuildSystemDetails)�requires�backend�check�backend_path�
use_pep517�pyproject_toml�setup_py�req_namec���tjj|�}tjj|�}|s|st|�d���|rKt	|d��5}tj|j��}ddd�jd�}nd}|r|s|�
|std��d}nr|r(d|vr$|�|std	j|d���d}nH|�F|xsBtjjd
�xs tjjd�}|�J�|sy|�dgd
d�}|�J�d|vrt|���|d}	t|	�s
t|d���|	D]}
	t!|
��|jd�}|jdg�}
g}|�d
}dg}t%|	|||
�S#1swY��3xYw#t"$r}t|d|
����|�d}~wwxYw)aBLoad the pyproject.toml file.

    Parameters:
        use_pep517 - Has the user requested PEP 517 processing? None
                     means the user hasn't explicitly specified.
        pyproject_toml - Location of the project's pyproject.toml file
        setup_py - Location of the project's setup.py file
        req_name - The name of the requirement we're processing (for
                   error reporting)

    Returns:
        None if we should use the legacy code path, otherwise a tuple
        (
            requirements from pyproject.toml,
            name of PEP 517 backend,
            requirements we should check are installed after setting
                up the build environment
            directory paths to import the backend from (backend-path),
                relative to the project root.
        )
    zW does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.zutf-8)�encodingNzbuild-systemzIDisabling PEP 517 processing is invalid: project does not have a setup.pyT�
build-backendzbDisabling PEP 517 processing is invalid: project specifies a build backend of {} in pyproject.toml�
setuptools�wheelzsetuptools>=40.8.0z setuptools.build_meta:__legacy__)r"r,r")�packagezIt is not a list of strings.)r/�reasonz$It contains an invalid requirement: zbackend-path)rr�isfiler
�openr�loads�read�get�format�	importlib�util�	find_specrrrr	rr!)r&r'r(r)�
has_pyproject�	has_setup�f�pp_toml�build_systemr"�requirement�errorr#r%r$s               r�load_pyproject_tomlrAsR��0�G�G�N�N�>�2�M������x�(�I�����j�=�
>�
�	
�
�
�.�7�
3�	,�q��k�k�!�&�&�(�+�G�	,��{�{�>�2�����Y��!�*�#�3��
��
�	�/�\�9��!�*�#�$�$*�F�<��+H�$I��
�
�
�
�	��
5��>�>�+�+�L�9�9�
5��>�>�+�+�G�4�4�	��!�!�!�����.�.�?�
���#�#�#���%�+�H�=�=��J�'�H��8�$�+��1�
�	
� ���	���$������/�G��#�#�N�B�7�L��E���5��%�&���h����E�E�i	,�	,��x"�	�/� �=�k�_�M���
��	�s$� $F5�.G�5F?�	G!�G�G!)�importlib.utilr7r�collectionsr�typingrrr�pip._vendorr�"pip._vendor.packaging.requirementsrr	�pip._internal.exceptionsr
rr�boolrrr r!rA�rr�<module>rJs����	�"�&�&��N���P��P��P�E�3�E�3�E� ��J���
VF����VF�03�VF�?B�VF�NQ�VF�
� �!�VFr