+
    WBiaw                    r   R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^RIHt ^RIHtHtHt ^RIHtHtHt ]P6                  '       d;   ^ RIHtHt ^ RIHt ^ RI H!t! ]PD                  R,8  d   ^ R	I#H$t$ M^ R	IH$t$ ^R
I%H&t&H't' ^ RI(t)^ RI*t)^ RI+t)^ RI,t)]PD                  R-8  d)   ^ RI-t-]-P\                  ! R4      t/]-P\                  ! R4      t0Rt1. R.Ot2R R lt3R R lt4R R lt5R R lt6R R lt7]Pp                   ! R R4      4       t9]Pp                   ! R R4      4       t: ! R R]Pv                  Px                  4      t=R  R! lt>R" R# lt? ! R$ R]P                  P                  4      tB]Pp                   ! R% R4      4       tCR& R' ltDR( R) ltER* R+ ltFR# )/a_  
This is pyproject_metadata, a library for working with PEP 621 metadata.

Example usage:

.. code-block:: python

   from pyproject_metadata import StandardMetadata

   metadata = StandardMetadata.from_pyproject(
       parsed_pyproject, allow_extra_keys=False, all_errors=True, metadata_version="2.3"
   )

   pkg_info = metadata.as_rfc822()
   with open("METADATA", "wb") as f:
       f.write(pkg_info.as_bytes())

   ep = self.metadata.entrypoints.copy()
   ep["console_scripts"] = self.metadata.scripts
   ep["gui_scripts"] = self.metadata.gui_scripts
   for group, entries in ep.items():
       if entries:
           with open("entry_points.txt", "w", encoding="utf-8") as f:
               print(f"[{group}]", file=f)
               for name, target in entries.items():
                   print(f"{name} = {target}", file=f)
               print(file=f)

)annotationsN)	constants)ConfigurationErrorConfigurationWarningErrorCollector)LicensePyProjectReaderReadme)	GeneratorMapping)Any)Requirement)Self)DynamicPyProjectTablez[\r\n]+s   [\r\n]+z0.10.0RFC822MessageRFC822PolicyStandardMetadatac                   V ^8  d   QhRR/# )   return	list[str] )formats   "@/usr/lib/python3.14/site-packages/pyproject_metadata/__init__.py__annotate__r   _   s           c                     \         # N)__all__r   r   r   __dir__r    _   s    Nr   c                    V ^8  d   QhRRRR/# )r   fieldstrr   zfrozenset[str]r   )r   s   "r   r   r   c   s     ; ;S ;^ ;r   c                B    \        \        P                  V ,          4      # )z@
Return the METADATA fields that correspond to a project field.
)	frozensetr   PROJECT_TO_METADATA)r"   s   &r   field_to_metadatar'   c   s     Y2259::r   c                    V ^8  d   QhRRRR/# r   pyproject_tableMapping[str, Any]r   set[str]r   )r   s   "r   r   r   j   s     B B&7 BH Br   c                B    \        V 4      \        P                  ,
          # )z@
Return any extra keys in the top-level of the pyproject table.
)setr   KNOWN_TOPLEVEL_FIELDSr*   s   &r   extras_top_levelr1   j   s     )"A"AAAr   c                    V ^8  d   QhRRRR/# r)   r   )r   s   "r   r   r   q   s      ): x r   c                b    \        V P                  R. 4      4      \        P                  ,
          # )z2
Return any extra keys in the build-system table.
zbuild-system)r.   getr   KNOWN_BUILD_SYSTEM_FIELDSr0   s   &r   extras_build_systemr6   q   s,    
 	O34

-
-	.r   c                    V ^8  d   QhRRRR/# r)   r   )r   s   "r   r   r   {   s     T T$5 T( Tr   c                b    \        V P                  R. 4      4      \        P                  ,
          # )z-
Return any extra keys in the project table.
project)r.   r4   r   KNOWN_PROJECT_FIELDSr0   s   &r   extras_projectr;   {   s'     ""9b12Y5S5SSSr   c                  >    ] tR t^t$ RtR]R&   R R ltR R ltRtR	# )
_SmartMessageSetterz|
This provides a nice internal API for setting values in an Message to
reduce boilerplate.

If a value is None, do nothing.
zemail.message.Messagemessagec               $    V ^8  d   QhRRRRRR/# r   namer#   value
str | Noner   Noner   )r   s   "r   r    _SmartMessageSetter.__annotate__   s!     # # #J #4 #r   c                	.    Vf   R # W P                   V&   R # r   )r>   )selfrA   rB   s   &&&r   __setitem___SmartMessageSetter.__setitem__   s    ="Tr   c                    V ^8  d   QhRRRR/# r   payloadr#   r   rD   r   )r   s   "r   r   rE      s     * *3 *4 *r   c                	<    V P                   P                  V4       R # r   )r>   set_payloadrG   rL   s   &&r   rN   _SmartMessageSetter.set_payload   s      )r   r   N	__name__
__module____qualname____firstlineno____doc____annotations__rH   rN   __static_attributes__r   r   r   r=   r=      s     #"#
* *r   r=   c                  >    ] tR t^t$ RtR]R&   R R ltR R ltRtR	# )
_JSonMessageSetterz
This provides an API to build a JSON message output in the same way as the
classic Message. Line breaks are preserved this way.
dict[str, str | list[str]]datac               $    V ^8  d   QhRRRRRR/# r@   r   )r   s   "r   r   _JSonMessageSetter.__annotate__   s!     # # #J #4 #r   c                	   VP                  4       pVP                  R R4      pVf   R# VR8X  dC   R VP                  R4       4       pV Uu. uF  qU'       g   K  VNK  	  upV P                  V&   R# V\        P
                  9   dH   V P                  P                  V. 4      p\        V\        4      '       g   Q hVP                  V4       R# W P                  V&   R# u upi )-_Nkeywordsc              3  @   "   T F  qP                  4       x  K  	  R # 5ir   )strip).0xs   & r   	<genexpr>1_JSonMessageSetter.__setitem__.<locals>.<genexpr>   s     :)9Aggii)9s   ,)
lowerreplacesplitr\   r   KNOWN_MULTIUSE
setdefault
isinstancelistappend)rG   rA   rB   keyvaluesrf   entrys   &&&    r   rH   _JSonMessageSetter.__setitem__   s    zz|ll3$=::S)9:F)/5A1aa5DIIcNY---II((b1EeT****LL"IIcN 6s   	CCc                    V ^8  d   QhRRRR/# rK   r   )r   s   "r   r   r^      s     & &3 &4 &r   c                	    WR &   R# )descriptionNr   rO   s   &&r   rN   _JSonMessageSetter.set_payload   s
    %]r   r   NrQ   r   r   r   rZ   rZ      s    
 %$#"& &r   rZ   c                  l    ] tR t^tRtRtRt^ tR R lt]	P                  R
8  d   RR R lltRtR	# RtR	# )r   z
This is :class:`email.policy.EmailPolicy`, but with a simple ``header_store_parse``
implementation that handles multiline values, and some nice defaults.
TFc               $    V ^8  d   QhRRRRRR/# )r   rA   r#   rB   r   ztuple[str, str]r   )r   s   "r   r   RFC822Policy.__annotate__   s!     	 	s 	3 	? 	r   c                    VP                  4       \        P                  9  d   RV: 2p\        W1R7      h\	        V4      ^,           pVP                  RRRV,          ,           4      pW3# )z:
Require known headers, and replace newlines with spaces.
zUnknown field rr   
 )rj   r   KNOWN_METADATA_FIELDSr   lenrk   )rG   rA   rB   msgsizes   &&&  r   header_store_parseRFC822Policy.header_store_parse   s]     ::<y>>>"4(+C$S334y1}dD3:$56}r   c               (    V ^8  d   QhRRRRRRRR/# )r   rA   r#   rB   r   refold_binaryboolr   r   )r   s   "r   r   r|      s8     	I 	I	I 	I  		I
 	Ir   c                	  a \        VR 4      '       d   VP                  V R7      # V P                  '       d   V P                  M\        P                  o\        V\        4      '       d   \        P                  V4      pM\        P                  V4      pV P                  R8H  ;'       g    V P                  R8H  ;'       d    T;'       d5    \        V^ ,          4      \        V4      ,           ^,           S8  ;'       gI    \        ;QJ d&    V3R lVR,           4       F  '       g   K   RM	  RM! V3R lVR,           4       4      pV'       g.   V'       dW   \        P                  P                  V4      '       d2   V P!                  VRP#                  V4      4      P                  V R7      # VR	,           V P$                  P#                  V4      ,           V P$                  ,           # )
rA   policyalllongc              3  @   <"   T F  p\        V4      S8  x  K  	  R # 5ir   )r   )re   rf   maxlens   & r   rg   %RFC822Policy._fold.<locals>.<genexpr>   s     >Iq3q6F?Is   :   NNTF z: )hasattrfoldmax_line_lengthsysmaxsizero   bytesRE_EOL_BYTESrl   
RE_EOL_STRrefold_sourcer   anyemailr   _has_surrogatesheader_factoryjoinlinesep)rG   rA   rB   r   linesrefoldr   s   &&&&  @r   _foldRFC822Policy._fold   se    uf%%zzz..-1-A-A-AT))s{{F %''$**51"((/''50  ""f,  EEs58}s4y81<vE ? ?s>E"I>sss>E"I>>	  %,,">">u"E"E**4@EETERR$;!2!25!99DLLHHr   r   N         )F)rR   rS   rT   rU   rV   utf8mangle_from_r   r   r   version_infor   rX   r   r   r   r   r      s>    
 DLO	 *$	I 	I %r   c               (    V ^8  d   QhRRRRRRRR/# )	r   namesr   rr   r#   errorsr   r   zGenerator[str, None, None]r   )r   s   "r   r   r      s,      +9r   c             #    "   V  F  pVP                  R4      w  rEpV'       d+   VP                  4       R8w  d   RpVP                  WqVR7       VP                  4       pVP	                  R4       Fc  pVP                  4       '       g   RpVP                  WqVR7       K0  \        P                  ! V4      '       g   KN  RpVP                  WqVR7       Ke  	  Vx  K  	  R# 5i)	z*
Return normalized names for comparisons.
;privatezB{key} contains an ending tag other than '; private', got {value!r}rr   rB   .z9{key} contains {value!r}, which is not a valid identifierzP{key} contains a Python keyword, which is not a valid import name, got {value!r}N)	partitionlstripconfig_errorrstriprl   isidentifierkeyword	iskeyword)	r   rr   r   fullnamerA   	simicolonr   r   idents	   &&$      r   _validate_import_namesr      s      #+#5#5c#: )Y6VCH={{}ZZ_E%%''Q##C#A""5))h##C#A % 
! s   B6C =#C c               $    V ^8  d   QhRRRRRR/# )r   r   r,   r   r   r   rD   r   )r   s   "r   r   r     s!      ( ~ $ r   c                   V  FR  p\         P                  ! VP                  R4      RR R 4       F!  pW09  g   K  RpVP                  VRVR7       K#  	  KT  	  R# )zU
Check to make sure every name is accounted for. Takes the union of de-tagged names.
r   Nc                    V  R V 2# )r   r   )abs   &&r   <lambda>(_validate_dotted_names.<locals>.<lambda>  s    !AaSzr   z@{key} is missing {value!r}, but submodules are present elsewhereproject.import-namespacesr   )	itertools
accumulaterl   r   )r   r   rA   parentr   s   &$   r   _validate_dotted_namesr     s_     **JJsOCR "9
F "X##C-HPV#W
 r   c                  B   a  ] tR tRtRtR V 3R lltRR R lltRtV ;t# )	r   i  z
This is :class:`email.message.EmailMessage` with two small changes: it defaults to
our `RFC822Policy`, and it correctly writes unicode when being called
with `bytes()`.
c                   V ^8  d   QhRR/# r   r   rD   r   )r   s   "r   r   RFC822Message.__annotate__  s     0 0$ 0r   c                8   < \         SV `  \        4       R7       R# )z)
Create a new message with RFC822Policy.
r   N)super__init__r   )rG   	__class__s   &r   r   RFC822Message.__init__  s     	/r   c               $    V ^8  d   QhRRRRRR/# )r   unixfromr   r   zemail.policy.Policy | Noner   r   r   )r   s   "r   r   r   !  s-     G GG +G 
	Gr   c                D    V P                  WR7      P                  R4      # )z&
Will always handle unicode encoding.
r   zutf-8)	as_stringencode)rG   r   r   s   &&&r   as_bytesRFC822Message.as_bytes!  s      ~~h~6==gFFr   r   )FN)	rR   rS   rT   rU   rV   r   r   rX   __classcell__)r   s   @r   r   r     s    0 0G Gr   c                     ] tR tRt$ RtR]R&   RtR]R&   RtR]R	&   RtR
]R&   Rt	R]R&   Rt
R]R&   RtR]R&   ]P                  ! ]R7      tR]R&   ]P                  ! ]R7      tR]R&   ]P                  ! ]R7      tR]R&   ]P                  ! ]R7      tR]R&   ]P                  ! ]R7      tR]R&   ]P                  ! ]R7      tR]R&   ]P                  ! ]R7      tR]R&   ]P                  ! ]R7      tR]R &   ]P                  ! ]R7      tR]R!&   ]P                  ! ]R7      tR]R"&   RtR#]R$&   RtR#]R%&   ]P                  ! ]R7      tR&]R'&    ]P                  ! ]R7      tR]R(&    RtR]R)&    R*tR+]R,&    R- R. lt ]!R/ R0 l4       t"]!R1 R2 l4       t#]$]%PL                  PN                  RR3R3RR,R*/R4 R5 lll4       t(R6 R7 lt)R8 R9 lt*R:R;/R< R= llt+R> R? lt,R@t-R# )Ar   i,  z
This class represents the standard metadata fields for a project. It can be
used to read metadata from a pyproject.toml table, validate it, and write it
to an RFC822 message or JSON.
r#   rA   Nz packaging.version.Version | NoneversionrC   rx   zLicense | str | Nonelicensezlist[pathlib.Path] | Nonelicense_fileszReadme | Nonereadmez(packaging.specifiers.SpecifierSet | Nonerequires_python)default_factoryzlist[Requirement]dependencieszdict[str, list[Requirement]]optional_dependencieszdict[str, dict[str, str]]entrypointslist[tuple[str, str | None]]authorsmaintainerszdict[str, str]urlsr   classifiersrb   scriptsgui_scriptslist[str] | Noneimport_namesimport_namespaceszlist[Dynamic]dynamicdynamic_metadatametadata_versionFr   
all_errorsc                   V ^8  d   QhRR/# r   r   )r   s   "r   r   StandardMetadata.__annotate__[  s      t r   c                &    V P                  4        R# )z&
Validate the fields on construction.
NvalidaterG   s   &r   __post_init__StandardMetadata.__post_init__[  s     	r   c                   V ^8  d   QhRR/# r   r   r#   r   )r   s   "r   r   r   b  s      s r   c                    V P                   e   V P                   # V P                  f   V P                  e   R# \        V P                  \
        4      '       g   V P                  e   R# V P                  '       d   R# R# )zk
This computes the metadata version based on the fields set in the object
if ``metadata_version`` is None.
z2.5z2.4z2.22.1)r   r   r   ro   r   r#   r   r   r   s   &r   auto_metadata_version&StandardMetadata.auto_metadata_versiona  sg       ,((((D,B,B,NdllC((D,>,>,J   r   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r   s  s     < < <r   c                T    \         P                  P                  V P                  4      # )z+
Return the canonical name of the project.
)	packagingutilscanonicalize_namerA   r   s   &r   canonical_nameStandardMetadata.canonical_namer  s    
 00;;r   allow_extra_keysc               4    V ^8  d   QhRRRRRRRRR	R
RRRR/# )r   r\   r+   project_dirzstr | os.PathLike[str]r   rC   r   r   r  zbool | Noner   r   r   r   r   )r   s   "r   r   r   z  sY     _ __ ,_ %	_
 +_ &_ _ 
_r   c               &
   \        VR7      pTpRV9  d4   Rp	VP                  V	RR7       VP                  R4       Rp	\        V	4      hVR,          p
\        P
                  ! V4      pV'       gN   \        V4      pV'       d;   RP                  \        R V 4       4      4      pR	p	VP                  V	RVVR
J R7       VP                  V
4      pV F*  pWR,          9   g   K  Rp	VP                  V	RV 2R7       K,  	  V
P                  R4      pRpVf   Rp	VP                  V	RR7       MVP                  VR4      pVe   Tp\        P                  P                  R4      pV
P                  R4      pVeC   VP                  VR4      pVe,    V'       d    \        P                  P                  V4      MR
pMMRV9  d   Rp	VP                  V	RR7       V
P                  R4      pVe   VP                  VR4      MR
pV
P                  R4      pR
pVe7   VP                  VR4      pVe!    \        P                   P#                  V4      pR
pVP'                  4       ;_uu_ 4        T ! R=/ RVbRVbRVbRVP)                  W4      bRVP+                  W4      bRVP-                  W4      bR VbR!VP/                  V
4      bR"VP1                  V
4      bR#VP3                  V
4      bR$VP5                  V
P                  R$. 4      R%4      bR&VP5                  V
P                  R&. 4      R'4      bR(VP7                  V
P                  R(/ 4      R)4      ;'       g    / bR*VP9                  V
P                  R*. 4      R+4      ;'       g    . bR,VP9                  V
P                  R,. 4      R-4      ;'       g    . bR.VP7                  V
P                  R./ 4      R/4      ;'       g    / bR0VP7                  V
P                  R1/ 4      R24      ;'       g    / bR3VP9                  V
P                  R4R
4      R54      bR6VP9                  V
P                  R7R
4      R84      bR9VbR:T;'       g    . bR;VbR<Vb pR
R
R
4       VP                  R4       Vf   Q hV#   \        P                  P                   d    Rp	TP                  T	RTR7        ELi ; i  \        P                   P$                   d    Rp	TP                  T	RTR7        ELi ; i  + '       g   i     L; i)>aU  
Read metadata from a pyproject.toml table. This is the main method for
creating an instance of this class. It also supports two additional
fields: ``allow_extra_keys`` to control what happens when extra keys are
present in the pyproject table, and ``all_errors``, to  raise all errors
in an ExceptionGroup instead of raising the first one.
collect_errorsr9   z'Section {key} missing in pyproject.tomlr~   zFailed to parse pyproject.tomlzUnreachable code, c              3  (   "   T F  q: x  K
  	  R # 5ir   r   )re   ks   & r   rg   2StandardMetadata.from_pyproject.<locals>.<genexpr>  s     1OJqE(Js   z)Extra keys present in {key}: {extra_keys}N)rr   
extra_keyswarnzCField {key} declared as dynamic in "project.dynamic" but is definedzproject.rA   UNKNOWNField {key} missingproject.namez0.0.0r   project.versionz6Invalid {key} value, expecting a valid PEP 440 versionrr   gotzDField {key} missing and 'version' not specified in "project.dynamic"rx   zproject.descriptionzrequires-pythonzproject.requires-pythonz4Invalid {key} value, expecting a valid specifier setr   r   r   r   r   r   r   r   zproject.authorsr   zproject.maintainersr   project.urlsr   zproject.classifiersrb   zproject.keywordsr   zproject.scriptsr   zgui-scriptszproject.gui-scriptsr   import-namesproject.import-namesr   import-namespacesr   r   r   r   r   r   )r   r   finalizeAssertionErrorpathlibPathr;   r   sortedget_dynamicr4   
ensure_strr  r   VersionInvalidVersion
specifiersSpecifierSetInvalidSpecifiercollectget_licenseget_license_files
get_readmeget_dependenciesget_optional_dependenciesget_entrypointsensure_peopleensure_dictensure_list)clsr\   r  r   r   r  r   	pyprojectr*   r   r9   r  extra_keys_strr   r"   raw_namerA   tmp_namer   raw_versionversion_stringproject_description_rawrx   requires_python_rawr   requires_python_stringrG   s   &&&&&$$                    r   from_pyprojectStandardMetadata.from_pyprojecty  s   $ $:>	*.O+;C""3I"6?@$C %%!),ll;/'-J!%61OJ1O+O!PA&&!-)T1	 '  ''0EY'[&&s(5'0B&C 
 ;;v&'C""3N"; ++HnEH#4=4E4E4M4Mg4Vkk),"&11+?PQN)
 * "))11.A!  * g%X  ""3,=">
 #*++m"< '2   !8:OP 	 &kk*;<*%.%9%9#%>&" &1&/&:&:&G&G.'O    --- (- "--gC	-
 (99'O- !++GA- !0- '77@- '0&I&I'&R- &55g>- "//KK	2.0A- &33KKr24I-" **7;;vr+BNS  %-& &11KKr24I   --. #..KK
B/1C   5-6 "--KK	2.0A   =-> &11KKr24I   E-F '22KK57MG-L #,"7"7KK 3T:<W#M-R  S-T "2!7!7RU-V "2W-X &Y-D !` 	;<s !((77 RC**!2 + @ !++<< PC**!:@V +  ! sV   R !R ,S %DT ?,T ,,T ,T AT T 5S S5S=<S= T	c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r     s      = r   c                R    \        4       p\        V4      pV P                  V4       V# )z-
Return an RFC822 message with the metadata.
)r   r=   _write_metadatarG   r>   smart_messages   &  r   	as_rfc822StandardMetadata.as_rfc822  s(      /+G4]+r   c                   V ^8  d   QhRR/# )r   r   r[   r   )r   s   "r   r   r   $  s      3 r   c                B    / p\        V4      pV P                  V4       V# )z*
Return a JSON message with the metadata.
)rZ   rF  rG  s   &  r   as_jsonStandardMetadata.as_json$  s&     /1*73]+r   r  Tc                    V ^8  d   QhRRRR/# )r   r  r   r   rD   r   )r   s   "r   r   r   -  s     v6 v6 v6 v6r   c               2	   \        V P                  R7      pV P                  \        P                  9  d$   RpVP                  V\        P                  R7        \        P                  P                  V P                  RR7       V P                  e6   \        V P                  \        4      '       d   R
pVP                  VRR7       \        V P                  \        4      '       dd   \         ;QJ d&    R V P"                   4       F  '       g   K   RM	  RM! R V P"                   4       4      '       d   RpVP                  VRR7       V'       Ed	   V P$                  '       d/   RV P$                  9   d   \&        P(                  ! R\*        ^R7       V P                  \        P,                  9  d   \        V P                  \        4      '       d   \&        P(                  ! R\*        ^R7       Mk\         ;QJ d&    R V P"                   4       F  '       g   K   RM	  RM! R V P"                   4       4      '       d   \&        P(                  ! R\*        ^R7       \        V P                  \        4      '       d5   V P                  \        P,                  9   d   RpVP                  VRR7       V P                  e5   V P                  \        P,                  9   d   RpVP                  VRR7       V P.                   F+  p\1        V4      ^ 8  g   K  RpVP                  VRVR7       K-  	  V P2                  e5   V P                  \        P4                  9   d   RpVP                  VRR7       V P6                  e5   V P                  \        P4                  9   d   RpVP                  VRR7       \9        \;        V P2                  ;'       g    . RVR 7      4      p\9        \;        V P6                  ;'       g    . R!VR 7      4      pWV,          pV'       d   R"pVP                  VRVR#7       \=        WV,          VR 7       VP?                  R$4       R	#   \        P                  P                   d%    RpTP                  TRT P                  R7        ELi ; i)%a  
Validate metadata for consistency and correctness.

Will also produce warnings if ``warn`` is given. Respects
``all_errors``. This is called when loading a pyproject.toml, and when
making metadata. Checks:

- ``metadata_version`` is a known version or None
- ``name`` is a valid project name
- ``license_files`` can't be used with classic ``license``
- License classifiers can't be used with SPDX license
- ``description`` is a single line (warning)
- ``license`` is not an SPDX license expression if metadata_version >= 2.4 (warning)
- License classifiers deprecated for metadata_version >= 2.4 (warning)
- ``license`` is an SPDX license expression if metadata_version >= 2.4
- ``license_files`` is supported only for metadata_version >= 2.4
- ``project_url`` can't contain keys over 32 characters
- ``import-name(paces)s`` is only supported on metadata_version >= 2.5
- ``import-name(space)s`` must be valid names, optionally with ``; private``
- ``import-names`` and ``import-namespaces`` cannot overlap.
r  z@The metadata_version must be one of {versions} or None (default))versionsTr   zInvalid project name {name!r}. A valid name consists only of ASCII letters and numbers, period, underscore and hyphen. It must start and end with a letter or numberr  )rr   rA   NzN{key} must not be used when "project.license" is not a SPDX license expressionzproject.license-filesr~   c              3  B   "   T F  qP                  R 4      x  K  	  R# 5iz
License ::N
startswithre   cs   & r   rg   ,StandardMetadata.validate.<locals>.<genexpr>V  s      1
0@1LL&&0@   Fz[Setting {key} to an SPDX license expression is not compatible with 'License ::' classifierszproject.licenser   z{The one-line summary "project.description" should not contain more than one line. Readers might merge or truncate newlines.)
stacklevelzGSet "project.license" to an SPDX license expression for metadata >= 2.4c              3  B   "   T F  qP                  R 4      x  K  	  R# 5irS  rT  rV  s   & r   rg   rX  j  s     N=Ml33=MrY  zx'License ::' classifiers are deprecated for metadata >= 2.4, use a SPDX license expression for "project.license" insteadzcSetting {key} to an SPDX license expression is only supported when emitting metadata version >= 2.4z={key} is only supported when emitting metadata version >= 2.4z2{key} names cannot be more than 32 characters longr  r  z={key} is only supported when emitting metadata version >= 2.5r   r   r  )r   r!  z:{key} overlaps with 'project.import-namespaces': {in_both})rr   in_bothzMetadata validation failed) r   r   r  r   KNOWN_METADATA_VERSIONSr   r  r  r	  rA   InvalidNamer   ro   r   r   r#   r   r   rx   warningsr  r   PRE_SPDX_METADATA_VERSIONSr   r   r   PRE_2_5_METADATA_VERSIONSr   r.   r   r   r"  )rG   r  r   r   rA   r   r   r\  s   &$      r   r   StandardMetadata.validate-  s   ,  t?%%Y-N-NNTCi.O.OP	IOO--dii$-G )jw.O.ObC)@AdllC((SS 1
040@0@1
SSS 1
040@0@1
 .
 .
 pC):;4DD,<,<$< R( 
 ))1U1UUdllG44MMa,#$
 SNT=M=MNSSSNT=M=MNNNMM U,#$ t||S))**i.R.RRwC):; ***i.R.RRQC)@AIID4y2~J##C^#F  )**i.Q.QQQC)?@ "".**i.Q.QQQC)DE"!!''R

  "&&,,".A&

 2NC)?Q|?O45q ** 	Ih  diiH	Is   +Q ?RRc                    V ^8  d   QhRRRR/# )r   rH  z(_SmartMessageSetter | _JSonMessageSetterr   rD   r   )r   s   "r   r   r     s      S4 S4ES4	S4r   c                x
   \        V P                  R7      pVP                  4       ;_uu_ 4        V P                  RR7       RRR4       V P                  VR&   V P
                  VR&   V P                  '       g   RpVP                  VRR	7       \        V P                  4      VR
&   V P                  '       d   V P                  VR&   RP                  V P                  4      ;'       g    RVR&   \        V P                  4      VR&   \        V P                  4      VR&   \        V P                  4      VR&   \        V P                  4      VR&   \!        V P"                  \$        4      '       d   V P"                  P&                  VR&   M/\!        V P"                  \        4      '       d   V P"                  VR&   V P(                  eN   \+        \-        V P(                  4      4       F*  p\.        P0                  ! VP3                  4       4      VR&   K,  	  MV P                  \4        P6                  9  dx   \!        V P"                  \$        4      '       dX   V P"                  P8                  '       d<   \.        P0                  ! V P"                  P8                  P3                  4       4      VR&   V P:                   F  pWQR&   K	  	  V P<                  P?                  4        F  w  rgV RV 2VR&   K  	  V P@                  '       d   \        V P@                  4      VR&   V PB                   F  p\        V4      VR&   K  	  V PD                  P?                  4        FY  w  rV	PG                  RR4      PG                  RR4      PI                  4       pWR&   V
 F  p\        \K        W4      4      VR&   K  	  K[  	  V PL                  '       d]   V PL                  PN                  '       g   Q hV PL                  PN                  VR&   VPQ                  V PL                  P&                  4       V PR                  ;'       g    .  F  pWR&   K	  	  V PT                  ;'       g    .  F  pWR &   K	  	  V PR                  e   V PR                  '       g   R!VR&   V P                  R"8w  d   V PV                   Fo  pVPI                  4       R(9   d   R#V: R$2pVP                  V4       VPI                  4       \4        PX                  9  d   R%V: R$2pVP                  V4       WR&&   Kq  	  VP[                  R'4       R#   + '       g   i     EL; i))z=
Write the metadata to the message. Handles JSON or Message.
r  F)r  NzMetadata-VersionNamer  r  r~   r)  Summaryri   KeywordsAuthorzAuthor-Email
MaintainerzMaintainer-Emailr   zLicense-ExpressionzLicense-File
Classifierr  zProject-URLzRequires-PythonzRequires-Distr   r`   ra   zProvides-ExtrazDescription-Content-TypezImport-NamezImport-Namespacer   r  zMetadata field z cannot be declared dynamiczUnknown metadata field r   zFailed to write metadata>   rA   r   r   ).r   r   r.  r   r  rA   r   r   r#   rx   r   rb   
_name_listr   _email_listr   ro   r   r   textr   r&  r.   osfspathas_posixr   r`  filer   r   itemsr   r   r   rk   rj   _build_extra_reqr   content_typerN   r   r   r   r   r"  )rG   rH  r   r   license_file
classifierrA   urldepextrarequirements
norm_extrarequirementimport_nameimport_namespacer"   s   &&              r   rF   StandardMetadata._write_metadata  sH     t?^^MMuM%  -1,F,F() $		f|||'C):;#&t||#4i  '+'7'7M)$$'HHT]]$;$C$Ctj! #-T\\":h(3DLL(An%&01A1A&Bl#,78H8H,I()dllG,,'+||'8'8M)$c**26,,M./) &s4+=+='> ?02		,:O:O:Q0Rn- !@ &&i.R.RR4<<11!!!,.IIdll6G6G6P6P6R,SM.)**J*4,' +
 *ID.2V2cU+;M-( +/243G3G/HM+,$$C-0XM/* %#'#=#=#C#C#EEsC088cBHHJJ.8*++14$Z=2o.  , $F ;;;;;+++++8<8P8PM45%%dkk&6&67,,222K+6-( 3 $ 6 6 < <" <0@,- != (1B1B1B+-M-(%%...;;=$BB+E94OPC'',;;=	(G(GG3E9<WXC'',+0i( / 	23Y s   T((T9	r   ).rR   rS   rT   rU   rV   rW   r   rx   r   r   r   r   dataclassesr"   rp   r   dictr   r   r   r   r   r   rb   r   r   r   r   r   r   r   r   r   propertyr  r
  classmethodrn  pathcurdirrB  rI  rM  r   rF  rX   r   r   r   r   r   ,  s1    I04G-4"K"$(G!(/3M,3 FM @DO=D&1&7&7&ML#M:E:K:K;7  .9->->t-TK*T,7,=,=d,SG)S0;0A0ARV0WK-W&,,TBD.B(..tDKD%++DAHiA)//EG^E"-"3"3D"IKI%)L")*.'.(..tDG]D #."3"3D"IiI $(j' J    < <  /1ggnn'+-1_ )-_ !_ _Bv6t v6pS4 S4r   c                    V ^8  d   QhRRRR/# r   peopler   r   rC   r   )r   s   "r   r   r     s     L L3 L
 Lr   c                F    RP                  R V  4       4      ;'       g    R# )z(
Build a comma-separated list of names.
r  c              3  >   "   T F  w  rV'       d   K  Vx  K  	  R # 5ir   r   )re   rA   email_s   &  r   rg   _name_list.<locals>.<genexpr>  s     CfldFTTfs   
Nr   r  s   &r   rk  rk    s!     99CfCCKKtKr   c                    V ^8  d   QhRRRR/# r  r   )r   s   "r   r   r     s     	 	4 	 	r   c                F    RP                  R V  4       4      ;'       g    R# )z)
Build a comma-separated list of emails.
r  c              3  z   "   T F1  w  rV'       g   K  \         P                  P                  W34      x  K3  	  R # 5ir   )r   r  
formataddr)re   rA   _emails   &  r   rg   _email_list.<locals>.<genexpr>  s/      
GM|tQW2EKK""D>22vs   ;(;Nr  r  s   &r   rl  rl    s1    
 			 
GM
 	
 	 	 	r   c               $    V ^8  d   QhRRRRRR/# )r   ry  r#   r|  r   r   r   )r   s   "r   r   r     s&       r   c                   \         P                   ! V4      pVP                  '       d   RVP                  P                  9   d8   \        P                  P                  RVP                   RV : 24      Vn        V# \        P                  P                  VP                   RV : 24      Vn         V# \        P                  P                  RV : 24      Vn        V# )z/
Build a new requirement with an extra marker.
or(z) and extra == z and extra == z	extra == )copymarker_markersr  markersMarker)ry  r|  s   &&r   rs  rs    s     ))K(K;%%...!*!2!2!9!9K&&'ui@"K  "+!2!2!9!9%%&nUI>"K
  '..55	%6KLr   )r      r   )
r   r   r   r   r	   r   r6   r;   r1   r'   )GrV   
__future__r   r  r  email.messager   email.policyemail.utilsr   r   rn  os.pathr$  r   typingr_  r   r   r   r   r   r   r9  r   r   r	   TYPE_CHECKINGcollections.abcr
   r   r   packaging.requirementsr   r   typing_extensionsr   project_tabler   r   packaging.markersr  packaging.specifierspackaging.utilspackaging.versionrecompiler   r   __version__r   r    r'   r1   r6   r;   	dataclassr=   rZ   r   EmailPolicyr   r   r   r>   EmailMessager   r   rk  rl  rs  r   r   r   <module>r     s  < #        	   
    L L 7 7	22
'!*6    j J'J::k*L ;BT * * *& & & &:6I5<<++ 6Ir2GEMM.. G0 K4 K4 K4\L	r   