
    ?wgY                     p    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	d
edefdZ
e
fZy)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y)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     n/var/www/horilla/myenv/lib/python3.12/site-packages/setuptools/config/_validate_pyproject/extra_validations.pyr   r      s    E
 G	" 	r   r   	pyprojectreturnc           
          | j                  di       }|j                  dg       }|D ]N  }||v st        d| d|||   ddd|id| t        t        j                        t        j                  dd	
       | 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0M	2.G M!0B5' JC C =/8w
 %UG,#+,J,P,P#Q9>>  $ r   N)r   inspectr   typingr   r   error_reportingr   r   r   r$   EXTRA_VALIDATIONSr   r   r   <module>r)      sK   
  # ,Cw
_ 
 a 2 ./ r   