
    i                        S SK Jr  S SKrS SKJr  S SKJr  S SKJr  S SK	J
r
JrJr  S SKJr  S SKJr  SS	 jrSS
 jr\" S/ SQ5      r        SS jrg)    )annotationsN)
namedtuple)Any)InvalidRequirement)InstallationErrorInvalidPyProjectBuildRequiresMissingPyProjectBuildRequires)tomllib)get_requirementc                T    [        U [        5      =(       a    [        S U  5       5      $ )Nc              3  B   #    U  H  n[        U[        5      v   M     g 7f)N)
isinstancestr).0items     _/var/www/html/qgis-automation/mouza_env/lib/python3.13/site-packages/pip/_internal/pyproject.py	<genexpr>"_is_list_of_str.<locals>.<genexpr>   s     (O34D#)>)>3s   )r   listall)objs    r   _is_list_of_strr      s    c4 OS(O3(O%OO    c                B    [         R                  R                  U S5      $ )Nzpyproject.toml)ospathjoin)unpacked_source_directorys    r   make_pyproject_pathr      s    77<<13CDDr   BuildSystemDetails)requiresbackendcheckbackend_pathc                   [         R                  R                  U 5      n[         R                  R                  U5      nU(       d  U(       d  [        U S35      eU(       aI  [	        U SS9 n[
        R                  " UR                  5       5      nSSS5        WR                  S5      nOSnUc  S/SS.nS	U;  a	  [        US
9eUS	   n[        U5      (       d
  [        USS9eU H  n	 [        U	5        M     UR                  S5      nUR                  S/ 5      n/ nUc  SnS/n[        XX5      $ ! , (       d  f       N= f! [         a  n
[        USU	< 3S9U
eSn
A
ff = f)a|  Load the pyproject.toml file.

Parameters:
    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.zutf-8)encodingNzbuild-systemzsetuptools>=40.8.0z setuptools.build_meta:__legacy__)r!   build-backendr!   )packagezIt is not a list of strings.)r(   reasonz$It contains an invalid requirement: r'   zbackend-path)r   r   isfiler   openr
   loadsreadgetr	   r   r   r   r   r    )pyproject_tomlsetup_pyreq_namehas_pyproject	has_setupfpp_tomlbuild_systemr!   requirementerrorr"   r$   r#   s                 r   load_pyproject_tomlr9      s{   , GGNN>2Mx(Ij = >
 	

 .73qmmAFFH-G 4{{>2 ..?
 %+H== J'H8$$+1
 	
  	K(   /G##NB7LE 5%&hEEy 43H " 	/ =k_M 	s$   ,%D2*E2
E 
E!EE!)r   r   returnbool)r   r   r:   r   )r/   r   r0   r   r1   r   r:   r    )
__future__r   r   collectionsr   typingr   "pip._vendor.packaging.requirementsr   pip._internal.exceptionsr   r   r	   pip._internal.utils.compatr
   pip._internal.utils.packagingr   r   r   r    r9    r   r   <module>rD      st    " 	 "  A 
 / 9PE  J 
\F\F#&\F25\F\Fr   