
    i*                         d Z ddlmZ ddlmZmZ ddlmZ  ede          Z G d d	e          Z	 G d
 de          Z
dedefdZdedefdZeefZdS )zThe purpose of this module is implement PEP 621 validations that are
difficult to express as a JSON Schema (or that are not supported by the current
JSON Schema library).
    )cleandoc)MappingTypeVar   )ValidationErrorT)boundc                       e Zd ZdZeZdZdS )RedefiningStaticFieldAsDynamiczAccording to PEP 621:

    Build back-ends MUST raise an error if the metadata specifies a field
    statically as well as being listed in dynamic.
    zMhttps://packaging.python.org/en/latest/specifications/pyproject-toml/#dynamicN__name__
__module____qualname___DESC__doc___URL     o/srv/django_bis/venv311/lib/python3.11/site-packages/setuptools/config/_validate_pyproject/extra_validations.pyr   r      s&        E
 G	" 	DDr   r   c                       e Zd ZdZeZdZdS ) IncludedDependencyGroupMustExistzDAn included dependency group must exist and must not be cyclic.
    z!https://peps.python.org/pep-0735/Nr   r   r   r   r   r      s        EG.DDDr   r   	pyprojectreturnc           
         |                      di           }|                     dg           }|D ]Q}||v rKt          d| d|||         ddd|id| t          t          j                  t          j        dd	
          R| S )Nprojectdynamicz(You cannot provide a value for `project.z6` and list it under `project.dynamic` at the same timez...z # ...zdata.project.descriptionseezPEP 621messagevaluename
definitionrule)getr   r   r   r   )r   project_tabler   fields       r   validate_project_dynamicr)   "   s    MM)R00M	2..G  M!!0C5 C C C =/8w
 -U,,#+,J,P#Q#Q9>      "" r   c           
      N   |                      di           }|                                D ]y\  }}|D ]q}t          |t                    rZ|                     d          x}rC||vr?t	          d| d|d| t          t          j                  t          j        dd          rz| S )	Nzdependency-groupszinclude-groupzThe included dependency group z doesn't existzdata.dependency_groups.r   zPEP 735r    )r&   items
isinstancedictr   r   r   r   )r   dependency_groupskeyr"   eachinclude_groups         r   validate_include_depenencyr2   ;   s    !&92>>'--//  
U 	 	D4&&&*hh&?&??] "):::6Z]ZZZ8388'/0P0V'W'W?D    #	 	 	 		" r   N)r   inspectr   typingr   r   error_reportingr   r   r   r   r)   r2   EXTRA_VALIDATIONSr   r   r   <module>r7      s   
       # # # # # # # # , , , , , ,GCw
 
 
 
 
_ 
 
 
/ / / / / / / / a    2!     . ./IJ   r   