+
    VBi                     >   ^ RI t ^ RIHt ^ RIt^ RIt^ RIt^ RIHt ^ RI	H
t
 ^ RIt ^ RIt^RIHt ^RIHt ^RIHt ]P,                  ! ]4      t ! R R	]4      t0 R2mt0 R3m],          tR
R0t0 R4mtRR.t]P@                  ! R4      t!R t" ! R R]4      t#R t$R t%R t& ! R R]'4      t(RRRRRR/t)R5R R llt*R t+R  t,R5R! R" llt-R# t.R$ R% lt/R& t0R' R( lt1R) R* lt2R6R+ R, llt3R- t4R. R/ lt5R0 R1 lt6R#   ] d     ^RIHt  L  ] d	    ^ RIt  Li ; ii ; i)7    N)AddressPath)tomli)licenses)normalise_core_metadata_name)normalise_versionc                       ] tR t^tRtR# )ConfigError N)__name__
__module____qualname____firstlineno____static_attributes__r       5/usr/lib/python3.14/site-packages/flit_core/config.pyr   r      s    r   r   moduleauthorzCOPYING*zLICEN[CS]E*z^[\w\-\.\/\*\?\[\]]+$c                b    \         P                  ! V P                  R4      4      p\        W4      # )zJRead and check the `pyproject.toml` file with data about the package.
    utf-8)tomllibloads	read_textprep_toml_config)pathds   & r   read_flit_configr   Q   s&     	dnnW-.AA$$r   c                   &   a  ] tR t^Xt o R tRtV tR# )EntryPointsConflictc                    R # )zSPlease specify console_scripts entry points, or [scripts] in flit config, not both.r   selfs   &r   __str__EntryPointsConflict.__str__Y   s    %r   r   N)r   r   r   r   r$   r   __classdictcell____classdict__s   @r   r    r    X   s     & &r   r    c                   V P                  R/ 4      P                  R/ 4      pRV 9   dg   RV9   d   \        R4      hRV9   g   RV9   d   \        R4      h\        V R,          V4      pVP                  R	/ 4      pR
V9   d   VR
,          Vn        MRV9   dv   R	V9   d   \        R4      h\	        VR,          V4      pRR.Vn        RV9   d   \        VR,          4      Vn        RV9   d"   VP                  \        VR,          4      4       M\        R4      h\        V4      0 R$m,
          pV Uu. uF+  qfP                  4       P                  R4      '       d   K)  VNK-  	  ppV'       d)   \        RRP                  R V 4       4      ,           4      hRV9   d   \        VR,          4      RR0,
          pV'       d"   \        RRP                  V4      ,           4      h\        VR,          P                  R. 4      R4      Vn        RR.VR,          P                  R. 4      ,           p\        VR4      Vn        VP                  R/ 4      P                  RR4      p	V	e   Rp
\#        V	\$        4      '       g   \        V
 R24      h\&        P(                  ! V	4      p\+        V4      '       d   \        V
 R24      hVP                  R\,        P.                  ,           4      '       d   \        V
 R 24      hVR!8X  d   \        V
 R"24      hVP0                  V	,          Vn        VP2                  P5                  4       '       g   \        V
 R#24      hV# u upi )%zgValidate config loaded from pyproject.toml and prepare common metadata

Returns a LoadedConfig object.
toolflitprojectmetadatazCUse [project] table for metadata or [tool.flit.metadata], not both.scriptsentrypointszDon't mix [project] metadata with [tool.flit.scripts] or [tool.flit.entrypoints]. Use [project.scripts],[project.gui-scripts] or [project.entry-points] as replacements.r   namezXUse [tool.flit.module] table with new-style [project] metadata, not [tool.flit.metadata]versiondescriptionzBNeither [project] nor [tool.flit.metadata] found in pyproject.tomlsdistexternal-datazx-z%Unexpected tables in pyproject.toml: , c              3   D   "   T F  pR P                  V4      x  K  	  R# 5i)z[tool.flit.{}]N)format).0ss   & r   	<genexpr>#prep_toml_config.<locals>.<genexpr>   s$      N
0@1##A&&0@s    includeexcludez"Unknown keys in [tool.flit.sdist]:z**/__pycache__z**.pyc	directoryNz!tool.flit.external-data.directoryz must be a stringz cannot be an absolute path..z= cannot point outside the directory containing pyproject.toml.z8 cannot refer to the directory containing pyproject.tomlz must refer to a directory>   r3   r   r.   r-   r/   r4   )getr   read_pep621_metadatar   _prep_metadatadynamic_metadataflatten_entrypointsr/   add_scriptsdictsetlower
startswithjoin_check_glob_patternssdist_include_patternssdist_exclude_patterns
isinstancestrospnormpath	isabs_ishossepparentdata_directoryis_dir)r   r   dtool
loaded_cfg
module_tblunknown_sectionsr9   unknown_keysr=   data_dirtoml_keynormps   &&          r   r   r   ]   sW   
 EE&"!!&"-EA~U  MU$:S 
 *!I,=
YYx,
Z *6 2J	u	u+  $E*$5t<
'0-&@
#E!%8}9M%NJ"""4i(8#9:P
 	
 5z %  $4V#3a779;O;OPT;U#3VADII N
0@N
 E
 
  	 %5>*i-CC4tyy7NN  -A'Ny"-y-

) 
 'Ny"-. -AY-

) yy"-11+tDH6(C((
*;<==X&U
*EFGGD266M***YZ  C<*TU  %)KK($:
!((//11
*DEFF[ Ws   /&MMc                x   a V3R lo/ pV P                  4        F  w  r#VP                  S! W24      4       K  	  V# )a  Flatten nested entrypoints dicts.

Entry points group names can include dots. But dots in TOML make nested
dictionaries:

[entrypoints.a.b]    # {'entrypoints': {'a': {'b': {}}}}

The proper way to avoid this is:

[entrypoints."a.b"]  # {'entrypoints': {'a.b': {}}}

But since there isn't a need for arbitrarily nested mappings in entrypoints,
flit allows you to use the former. This flattens the nested dictionaries
from loading pyproject.toml.
c              3      <"   / pV P                  4        FB  w  r4\        V\        4      '       d$   S! WAR ,           V,           4       F  pVx  K	  	  K>  WBV&   KD  	  V'       d   W3x  R# R# 5i)r@   N)itemsrO   rG   )r   prefixd1kv	flattened_flattens   &&    r   ri   %flatten_entrypoints.<locals>._flatten   sa     GGIDA!T""!)!CZ\!:I#O "; 1  * s   A A-$	A-)rc   update)epresrf   rg   ri   s   &   @r   rE   rE      s6     
 C


8A>" Jr   c                *   \        V \        4      '       g   \        RP                  V4      4      h\        P
                  ! R4      p. pV  F  pVP                  V4      '       d   \        RP                  W4      4      h\        P                  ! V4      p\        V4      '       d   \        V RV: R24      hVP                  R\        P                  ,           4      '       d   \        RP                  W4      4      hVP                  V4       K  	  V# )z;Check and normalise glob patterns for sdist include/excludez sdist {} patterns must be a listz[\000-\037<>:"\\]zE{} pattern {!r} contains bad characters (<>:"\ or control characters)z	 pattern z is an absolute pathr?   zE{} pattern {!r} points out of the directory containing pyproject.toml)rO   listr   r7   recompilesearchrQ   rR   rS   rJ   rT   rU   append)patsclude	bad_charsnormedpr`   s   &&    r   rL   rL      s    dD!!<CCEJKK 

/0IFAY! 
 QU'1%';<  D266M**W!  	e% ( Mr   c                   ,   a  ] tR t^t o R tR tRtV tR# )LoadedConfigc                    R V n         / V n        / V n        / V n        . V n        . V n        . V n        . V n        R V n        R # N)	r   r-   reqs_by_extrar/   referenced_filesrM   rN   rD   rW   r"   s   &r   __init__LoadedConfig.__init__   sH     "&(#&(# ""r   c                d    V'       d(   R V P                   9   d   \        hWP                   R &   R# R# )console_scriptsN)r/   r    )r#   scripts_dicts   &&r   rF   LoadedConfig.add_scripts  s-     D$4$44))6B  !23	 r   )	rW   rD   r/   r-   r   r~   r}   rN   rM   N)r   r   r   r   r   rF   r   r&   r'   s   @r   rz   rz      s     	#C Cr   rz   z.rstz
text/x-rstz.mdztext/markdownz.txtz
text/plainc                0    V ^8  d   QhR\         R\        /# )   rel_pathproj_dir)rP   r   )r7   s   "r   __annotate__r     s      C 4 r   c                    \        V 4      '       d   \        R 4      hW,          p VP                  RRR7      ;_uu_ 4       pVP                  4       pRRR4       T'       d-   TP                  P                  4       p \        T,          pXT3# RpXT3#   + '       g   i     LJ; i  \         d@   pTP
                  \
        P                  8X  d   \        RP                  T4      4      hh Rp?ii ; i  \         dH    \        P                  RT4       \        P                  RRP                  \        4      4       Rp XT3# i ; i)	zReadme path must be relativerr   )encodingNz"Description file {} does not existz*Unknown extension %r for description file.z  Recognised extensions: %s )rS   r   openreadIOErrorerrnoENOENTr7   suffixrI   readme_ext_to_content_typeKeyErrorlogwarningrK   )	r   r   guess_mimetype	desc_pathfraw_desceextmimetypes	   &&&      r   description_from_filer     s'   899#I^^C'^22avvxH 3 $$&	1#6H X X+ 32 77ell"4;;IF  	  	KKDcJKK5!;<>H X	sH   B' BB' =C4 B$	B' $B' 'C12:C,,C14AEEc                ~   \        V 4      P                  \        4      '       g8   \        \        V 4      ,
          p\        RRP	                  V4      ,           4      h\        4       pV P                  R4      Vn        \        VP                  P                  R4       Uu. uF  qDP                  4       NK  	  up4      '       g   \        RVP                  ,          4      hVP                  pRV 9   dL   V P                  R4      pVP                  P                  V4       \        WaP                  4      w  rxWuR&   WR&   R	V 9   dX   . ;qR
&   \!        V P#                  R	4      P%                  4       4       F%  w  rV	P                  RP'                  W4      4       K'  	  V P%                  4        EF]  w  rVR39   d   K  V\(        9  db   \*        P,                  ! V\(        ^RR7      pRP'                  V4      pV'       d    VRP'                  V^ ,          4      ,          p\        V4      hVP/                  RR4      pWV&   V\0        9   d   \3        V\4        4      '       g   \        RP'                  W4      4      h\        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      '       g   \        RP'                  V4      4      hEK#  VR8X  Ed   \3        V\6        4      '       g   \        RP'                  V4      4      h\        ;QJ d*    R VP9                  4        4       F  '       d   K   RM	  RM! R VP9                  4        4       4      '       g   \        R4      hVP%                  4        FZ  w  pp\        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      '       d   KB  \        RP'                  V4      4      h	  EK-  \3        V\:        4      '       d   EKF  \        RP'                  W4      4      h	  RV9   d   VP#                  R4      VR&   R V9   d   VP#                  R 4      VR!&   VP#                  R. 4      pVP#                  R"/ 4      p/ pVP%                  4        F  w  pp\        ;QJ d    R# V 4       F  '       d   K   RM	  RM! R# V 4       4      '       g   \        R$V 24      h\=        V4      '       g   \        R%V: R&24      h\?        V4      pVPA                  V\        4       4      PC                  V4       VVPD                  V&   K  	  VP9                  4        Uu. uF  p\G        V4      ^8  g   K  VNK  	  ppV'       dG   V Uu. uF  pR'P	                  \!        V4      4      NK  	  pp\        R(R)P	                  V4       24      hVP#                  R*R+4      pVeA   R,VPD                  9   d   \        R-4      h\H        PK                  R.4       VVPD                  R,&   V\5        \M        VPD                  4      4      ,           VR&   \!        VPD                  PO                  4       4      VR/&   VVPD                  R0&   V'       dF   \!        \Q        VP                  \R        RR17      4      pVP                  PU                  V4       VVR2&   V# u upi u upi u upi )4zProcess & verify the metadata from a config file

- Pull out the module name we're packaging.
- Read description-file and check that it's valid rst
- Convert dashes in key names to underscores
  (e.g. home-page in config -> home_page in metadata)
zRequired fields missing: 
r   r@   z(Module name %r is not a valid identifierdescription-filer2   description_content_typeurlsproject_urls{}, {}gffffff?)ncutoffzUnrecognised metadata key: {!r}z (did you mean {!r}?)-_z(Expected a list for {} field, found {!r}c              3   B   "   T F  p\        V\        4      x  K  	  R # 5ir|   rO   rP   r8   as   & r   r:   !_prep_metadata.<locals>.<genexpr>i  s     95az!S))5   FTz'Expected a list of strings for {} fieldrequires-extraz4Expected a dict for requires-extra field, found {!r}c              3   B   "   T F  p\        V\        4      x  K  	  R # 5ir|   rO   ro   r8   r   s   & r   r:   r   p  s     CNqz!T**Nr   z1Expected a dict of lists for requires-extra fieldc              3   B   "   T F  p\        V\        4      x  K  	  R # 5ir|   r   r   s   & r   r:   r   s  s     <t!:a--tr   z5Expected a string list for requires-extra. (extra {})z*Expected a string for {} field, found {!r}requiresrequires_dist	dist_namer0   requires_extrac              3   B   "   T F  p\        V\        4      x  K  	  R # 5ir|   r   r   s   & r   r:   r     s     4t!:a%%tr   z0Expected a string list for requires-extra group zrequires-extra group name  is not valid/z"requires-extra group names clash: ; dev_requiresNdevzEdev-requires occurs together with its replacement requires-extra.dev.zO"dev-requires = ..." is obsolete. Use "requires-extra = {"dev" = ...}" instead.provides_extra.nonewarn_no_fileslicense_files>   r   r   )+rH   
issupersetmetadata_required_fieldsr   rK   rz   rA   r   allsplitisidentifierr-   r~   rs   r   rV   sortedpoprc   r7   metadata_allowed_fieldsdifflibget_close_matchesreplacemetadata_list_fieldsrO   ro   rG   valuesrP   name_is_validr   
setdefaultaddr}   lenr   r   _expand_requires_extrakeys_license_files_from_globsdefault_license_files_globsextend)md_sectr   missingrm   mmd_dictr   desc_contentr   r   labelurlkeyvalueclosestmsgk2r   reqsreqs_noextra
reqs_extraextra_names_by_normedenormgclashing_extra_namesfmtedr   r   s   &&                          r   rC   rC   7  s    w<""#;<<*S\95		'8JJKK
.CX&CJ#***:*:3*?@*?Q *?@AADszzQRRllG W$KK 23	##I.!6y++!N"..6*+133~. V!4!:!:!<=JE ;< > mmo
00--//5L23CAG3::3?C.55gajAAc""[[c"&&eT**!"L%+VC%79 9395933395999!"K%+VC[2 2 : $$eT**!"X%+VE]4 43CELLNC333CELLNCCC!"UVV ;;=4s<t<sss<t<<<%&])/4 4 )
 eS))!"N%+VC%79 9A &J W#*;;z#:  g!++k2 ;;3L-r2J##%4s4t4sss4t444B1#F  Q,QE?  -Q/((6::1=#'%  & )//11aSVaZ1   .BC.B&)$.BC051A0BC
 	
 ;;~t4LC%%%WY Y KKac'3Ce$ 	t233D3DEFF O !'s'8'8'='='? @G ".Cg%8

 	##M2#0 Jk A` Ds   Z0Z5Z5,#Z:c              #      "   \        V P                  ! 4       4       FR  w  rV FG  pR V9   d+   VP                  R ^4      w  rERP                  WAV4      x  K4  RP                  W14      x  KI  	  KT  	  R# 5i);z{} ; extra == "{}" and ({})z{} ; extra == "{}"N)r   rc   r   r7   )rp   extrar   reqr0   envmarks   &     r   r   r     sc     bhhj)Ccz #		#q 13::4PP*11#==  *s   A3A5c                $    V ^8  d   QhR\         /# )r   project_dirr   )r7   s   "r   r   r     s     # #4 #r   c           	         \        4       pV EF  p\        V4      '       d   \        R P                  V4      4      hRV9   d   \        RP                  V4      4      h\        P                  V4      f   \        R4      h V P                  V4       Uu. uF:  pVP                  4       '       g   K  VP                  V 4      P                  4       NK<  	  ppT'       g#   T'       d   \        RP                  T4      4      hTP                  T4       EK  	  V# u upi   \         d1   p\        RP                  YGP                  ^ ,          4      4      hRp?ii ; i)zXInvalid glob pattern for [project.license-files]: '{}'. Pattern must not start with '/'.r?   zUInvalid glob pattern for [project.license-files]: '{}'. Pattern must not contain '..'NzInvalid glob pattern for [project.license-files]: '{}'. Pattern contains invalid characters. https://packaging.python.org/en/latest/specifications/pyproject-toml/#license-filesz:Invalid glob pattern for [project.license-files]: '{}'. {}z8No files found for [project.license-files]: '{}' pattern)rH   rS   r   r7   license_files_allowed_charsmatchglobis_filerelative_toas_posix
ValueErrorargsrk   )r   globsr   r   patternfilefilesexs   &&&     r   r   r     sP   EMW3396'?  7?006w  ',,W5=f 
		 (,,W55D<<> 9  -6685   JQQRYZ  	U#A B 
  	LSST[]d]def]gh 	s0    DD0#DDDE'+EEc           
          \        W,          V4      '       g+   \        R P                  W\        W,          4      4      4      hR# ){} field should be {}, not {}N)rO   r   r7   type)r   
field_nameclss   &&&r   _check_typer	    s:    amS))+22:DDWX
 	
 *r   c                    V ^8  d   QhRR/# )r   returnNr   )r7   s   "r   r   r     s     
 
T 
r   c                     \        W,          V4      '       gI   \        R P                  VRP                  \	        \
        V4      4      \        W,          4      4      4      hR# )r  z or N)rO   r   r7   rK   maprP   r  )r   r  cls_lists   &&&r   _check_typesr    sO    amX..+22FKKC(:;T!-=P
 	
 /r   c                     \        W,          \        4      '       dG   \        ;QJ d"    R  W,           4       F  '       d   K   RM	  RM! R  W,           4       4      '       g   \        RP	                  V4      4      hR# )c              3   B   "   T F  p\        V\        4      x  K  	  R # 5ir|   r   r   s   & r   r:   %_check_list_of_str.<locals>.<genexpr>  s      6$1q
1cMr   FTz${} field should be a list of stringsN)rO   ro   r   r   r7   )r   r  s   &&r   _check_list_of_strr    se    amT**## 6$%M6### 6$%M6 3 3 299*E
 	
3r   c                $    V ^8  d   QhR\         /# r   r  )rz   )r7   s   "r   r   r     s     K K Kr   c                    \        4       pVP                  pR V 9  d   \        R4      h\        V R \        4       \        V R ,          4      '       g   \        RV R ,           R24      hV R ,          VR &   VR ,          P                  RR4      Vn        V P                  4       \        ,
          pV'       d&   \        P                  RRP                  V4      4       RV 9   d'   \        V R\        4       \        V R,          4      VR&   R	V 9   d   \        V R	\        4       V R	,          VR
&   RV 9   Ed   V R,          p\        V\        4      '       d5   VP                  P!                  V4       \#        WQP$                  4      w  rgEMT\        V\&        4      '       Ed3   \)        VP                  4       4      0 RWm,
          pV'       d   \        RP+                  V4      4      hRV9   dd   VR,          pVP-                  R4      ^ ,          P/                  4       p	V	\0        P3                  4       9  d   \        RP+                  V	4      4      hM\        R4      hRV9   dW   RV9   d   \        R4      hVP                  P!                  VR,          4       \#        VR,          VP$                  RR7      w  rjM'RV9   d   VR,          pM\        R4      h\        R4      hWcR	&   WsR&   RV 9   d   V R,          VR&   \)        4       pRV 9   Ed   \5        V R\        \&        34       \        V R,          \        4      '       d   V R,          p\7        V4      VR&   EMzV R,          p\)        VP                  4       4      RR0,
          pV'       d   \        RP+                  V4      4      hRV9   Ed   RV9   d   \        R4      h\8        P:                  ! VR,          4      p\=        V4      '       d   \        RVR,           R 24      hVP?                  R!\@        PB                  ,           4      '       d   \        RVR,           R"24      hVP$                  V,          pVPE                  4       '       g   \        R#VR,           R$24      hVPG                  VP$                  4      PI                  4       pVPK                  V4       MRV9   d   M\        R%4      hR&V 9   db   \        V R&\L        4       V R&,          p\O        VP$                  V4      p\        V PQ                  R4      \&        4      '       d   \        R'4      hM+VPS                  \O        VP$                  \T        RR(7      4       \W        V4      pVP                  PY                  V4       VVR)&   R*V 9   d3   \        V R*\L        4       VPS                  \[        V R*,          4      4       R+V 9   d5   \        V R+\L        4       VPS                  \[        V R+,          R,R-7      4       R.V 9   d(   \]        V R.4       R/P                  V R.,          4      VR.&   R0V 9   dv   \]        V R04       V R0,          pVPQ                  RR14      pV'       d;   V F4  pVP?                  R24      '       g   K  \        R3P+                  V4      4      h	  V R0,          VR0&   R4V 9   dd   \        V R4\&        4       . ;pVR5&   \W        V R4,          P_                  4       4       F'  w  ppVP!                  R6P+                  VV4      4       K)  	  R7V 9   d   \        V R7\&        4       V R7,          P3                  4        F  p\        V\&        4      '       g   \        R84      h\`        ;QJ d*    R9 VP3                  4        4       F  '       d   K   RM	  R:M! R9 VP3                  4        4       4      '       d   K|  \        R;4      h	  \)        V R7,          P                  4       4      R<R=0,          '       d   \        R>4      hV R7,          Vn1        R?V 9   d   \        V R?\&        4       \`        ;QJ d1    R@ V R?,          P3                  4        4       F  '       d   K   RM&	  R:M"! R@ V R?,          P3                  4        4       4      '       g   \        RA4      hV R?,          VPb                  R<&   RBV 9   d   \        V RB\&        4       \`        ;QJ d1    RC V RB,          P3                  4        4       F  '       d   K   RM&	  R:M"! RC V RB,          P3                  4        4       4      '       g   \        RD4      hV RB,          VPb                  R=&   REV 9   d   \]        V RE4       V RE,          pM. pRFV 9   Ed   \        V RF\&        4       V RF,          p\`        ;QJ d*    RG VP3                  4        4       F  '       d   K   RM	  R:M! RG VP3                  4        4       4      '       g   \        RH4      h/ pVP_                  4        F  w  pp\`        ;QJ d    RI V 4       F  '       d   K   RM	  R:M! RI V 4       4      '       g   \        RJP+                  V4      4      h\        V4      '       g   \        RKV: R24      h\e        V4      pVPg                  V\)        4       4      PK                  V4       VVPh                  V&   K  	  VP3                  4        Uu. uF  p\k        V4      ^8  g   K  VNK  	  p pV '       dG   V  Uu. uF  pRLP                  \W        V4      4      NK  	  p!p\        RMRNP                  V!4       24      h\W        VPh                  P                  4       4      VRO&   V\M        \m        VPh                  4      4      ,           VRP&   V'       d   VVPh                  RQ&   RRV 9   df   \]        V RR4       \)        V RR,          4      p"V"RR	0,
          p#V#'       d   \        RS4      hV"Po                  V 4      '       d   \        RT4      hV"Vn8        RV 9  d   RVPp                  9  d   \        RU4      hR	V 9  d   R	VPp                  9  d   \        RV4      hV# u upi u upi )Xr0   z)name must be specified in [project] tablezname r   r   r   z$Unexpected names under [project]: %sr5   r1   r2   summaryreadmetextr  content-typez)Unrecognised keys in [project.readme]: {}r   z&Unrecognised readme content-type: {!r}z5content-type field required in [project.readme] tablez6[project.readme] should specify file or text, not bothF)r   z5file or text field required in [project.readme] tablez,project.readme should be a string or a tabler   requires-pythonrequires_pythonlicenselicense_expressionz*Unrecognised keys in [project.license]: {}z7[project.license] should specify file or text, not bothzLicense file path (z) cannot be an absolute pathr?   z) cannot contain '..'zLicense file z does not existz6file or text field required in [project.license] tablelicense-fileszjlicense-files cannot be used with a license table, use 'project.license' with a license expression insteadr   r   authorsmaintainers
maintainer)
group_namekeywords,classifiersNzLicense :: zaLicense classifiers are deprecated in favor of the license expression. Remove the '{}' classifierr   r   r   entry-pointsz4projects.entry-points should only contain sub-tablesc              3   B   "   T F  p\        V\        4      x  K  	  R # 5ir|   r   r8   rf   s   & r   r:   'read_pep621_metadata.<locals>.<genexpr>  s     @<az!S))<r   Tz:[projects.entry-points.*] tables should have string valuesr   gui_scriptszkScripts should be specified in [project.scripts] or [project.gui-scripts], not under [project.entry-points]r.   c              3   B   "   T F  p\        V\        4      x  K  	  R # 5ir|   r   r)  s   & r   r:   r*    s     H/G!:a%%/Gr   z2[projects.scripts] table should have string valuesgui-scriptsc              3   B   "   T F  p\        V\        4      x  K  	  R # 5ir|   r   r)  s   & r   r:   r*    s     L/K!:a%%/Kr   z6[projects.gui-scripts] table should have string valuesdependenciesoptional-dependenciesc              3   B   "   T F  p\        V\        4      x  K  	  R # 5ir|   r   r   s   & r   r:   r*    s     A0@1:a&&0@r   z7Expected a dict of lists in optional-dependencies fieldc              3   B   "   T F  p\        V\        4      x  K  	  R # 5ir|   r   r   s   & r   r:   r*    s     84az!S))4r   z5Expected a string list for optional-dependencies ({})z!optional-dependencies group name r   z)optional-dependencies group names clash: r   r   r   r   dynamiczAflit only supports dynamic metadata for 'version' & 'description'z=keys listed in project.dynamic must not be in [project] tablezFversion must be specified under [project] or listed as a dynamic fieldzJdescription must be specified under [project] or listed as a dynamic field>   r  r  r  )9rz   r-   r   r	  rP   r   r   r   r   pep621_allowed_fieldsr   r   rK   r	   rO   r~   rs   r   rV   rG   rH   r7   r   stripr   r   r  normalise_compound_license_exprrQ   rR   rS   rJ   rT   rU   r   r   r   r   ro   r   rA   rk   r   r   r   pep621_peopler  rc   r   r/   r   r   r}   r   r   intersectionrD   )$projr   lcr   unexpected_keysr  r   r   
unrec_keys
mtype_baser   r   licence_exprlicense_tbl	license_f	license_pr   license_files_sortedr&  license_exprclr   r   r   grpr   optdepsr   r   r   r   r   r   r   r3  unrec_dynamics$   &&                                  r   rB   rB     s
   	BkkGTEFFfc"f&&E$v,}=>>6lGFO''S1BIiik$99O:DIIo<VWDD)S).tI?	D--!-0	4hfc""&&v.%:6;;%O"L(%%V[[]+.NNJ!?FFzR  '!.1%^^C0399;
%?%F%F%HH%@GG
S  I "K  V#%P  ##**6&>:"76NDKK#a 6!%f~!K  >  "..6*+D %)*;%<!"EMDT9sDk2d9os++	?L,KL,YG()y/K[--/0FF3CCJ!@GG
S  $[(%Q   LLV)<=	Y''%-k&.A-BB^_  ''rvv66%-k&.A-BBWX  !KK)3	 ((**%k&6I5J/&Z[[%11$++>GGI	!!),;&!L  $D/40_%1$++uEdhhy)400J  1 	%8	

 "-0343GODD)T*}T)_56D-.}T-%8\RST4,!hhtJ'78
4/=){{#7>!}}]33!117  " "&m!4~D&$'133w~. f!3!3!56JE3s ;< 7 D.$/'..0Cc4((!J  3@3::<@333@3::<@@@!P  1 tN#((*+/@-.PPPJ  n-DD)T*sHtI/E/E/GHsssHtI/E/E/GHHHD  -1O()D-.sLtM/B/I/I/KLsssLtM/B/I/I/KLLLH  )-](;}%40N+$&D148./sA0@AsssA0@AAAI  !#}}GAt384833384888!KRRSTU  !##!7uMJ  13E!,,UCE:>>qA&*BU# ' -335 
5!Q!AA5 	  
  2FG2FQSXXfQi(2FEG;DIIe<L;MN  %+2+;+;+@+@+B$C ! 	t223C3CDEE O $0!D4+d9o&9m"<<S  %%O  &IR5H5H$HT
 	
 	T!R=P=P(PX
 	
 IS 
 Hs   q-q#q!c                $    V ^8  d   QhR\         /# r  )bool)r7   s   "r   r   r     s      4 r   c                 `    \        \        P                  ! R V \        P                  4      4      # )z)^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$)rI  rp   r   
IGNORECASE)r0   s   &r   r   r     s%    4dBMM  r   c                $    V ^8  d   QhR\         /# r  )rG   )r7   s   "r   r   r     s      $ r   c                T   . . r2V  F  p\        V\        4      '       g   \        RP                  V4      4      h\	        VP                  4       4      RR0,
          pV'       d   \        RP                  W4      4      hRV9   dA   VR,          pRV9   d   \        \        VR,          VR7      4      pVP                  V4       K  RV9   g   K  VP                  VR,          4       K  	  / pV'       d   RP                  V4      Wq&   V'       d   RP                  V4      WqR,           &   V# )z@Convert authors/maintainers from PEP 621 to core metadata fieldsz{} info must be list of dictsr0   emailz Unrecognised keys in {} info: {})	addr_specr5   _email)
rO   rG   r   r7   rH   r   rP   r   rs   rK   )peopler#  namesemailspersonr<  rN  rm   s   &&      r   r7  r7    s    6&$''=DDZPQQ'67*;;
299*Q  f7OEGF6NeDEMM% vLL(   C))E*%)YYv%6!"Jr   c                r    \         P                  P                  V 4      ;'       g    V P                  R4      # )zLike os.path.isabs(), but Windows paths from a drive root count as absolute

isabs() worked this way up to Python 3.12 (inclusive), and where we reject
absolute paths, we also want to reject these odd halfway paths.
)r   \)rT   r   isabsrJ   )r   s   &r   rS   rS   1  s(     77==>>$//+">>r   c                0    V ^8  d   QhR\         R\         /# r   r9   r  rP   )r7   s   "r   r   r   :  s     ? ?s ?s ?r   c                   RpV '       d   V P                  4       '       d   \        R4      h^ p. p \        R\        P                  ! RV 4      4       EF  pVP                  4       R8X  d   \        R4      hVR9   dO   V'       d   VR,          R9   d"   RV R	2p\        VP                  WR
7      4      hVP                  RV R24       Ky  VP                  4       R9   d"   RV R	2p\        VP                  WR
7      4      hVR8X  dQ   V'       d,   VR,          R9  d   Rp\        VP                  WR
7      4      hV^,          pVP                  V4       EK  VR8X  dy   V'       d   VR,          R9   d"   RV R	2p\        VP                  WR
7      4      hV^,          pV^ 8  d   Rp\        VP                  WR
7      4      hVP                  V4       EK  V'       d,   VR,          R9  d   Rp\        VP                  WR
7      4      h\        V4      pVP                  V4       EK  	  V^ 8w  d   Rp\        VP                  WR
7      4      hVR,          R9   d9   VR,          P                  4       pRV R	2p\        VP                  WR
7      4      h RP!                  T4      #   \         dF    \        P                  P                  R4      '       d   \        P                  RT : R24       T u # h i ; i)a  Validate and normalise a compund SPDX license expression.

Per the specification, licence expression operators (AND, OR and WITH)
are matched case-sensitively. The WITH operator is not currently supported.

Spec: https://spdx.github.io/spdx-spec/v2.2.2/SPDX-license-expressions/
z6'{s}' is not a valid SPDX license expression: {reason}z-The SPDX license expression must not be emptyNz	 +|([()])WITHz.The SPDX 'WITH' operator is not yet supported!(z a license ID is missing before '')r9   reasonr   z"operators must be uppercase, not 'z&'(' must follow either AND, OR, or '(')zunbalanced bracketsz/a license ID must follow either AND, OR, or '('z*a license ID or expression should follow 'FLIT_ALLOW_INVALIDzInvalid license ID z allowed by FLIT_ALLOW_INVALID >   ORAND>   r]   OR  AND  WITH >   orandwith>   r]  rf  rg  >   rf  rg  rh  )isspacer   filterrp   r   upperr7   rs   rI   normalise_simple_license_exprr5  rT   environrA   r   r   rK   )r9   invalid_msgstackpartspartr_  simple_expr	last_parts   &       r   r6  r6  :  s    KK		IKKEE/4,!:;Dzz|v%!$RTT&b	-M M?vQGF%k&8&81&8&LMMqa[)!66=dV1E!+"4"4q"4"HIIU2Y.DDEF%k&8&81&8&LMM
T"b	-M M?vQGF%k&8&81&8&LMM
192F%k&8&81&8&LMMT"U2Y.DDNF%k&8&81&8&LMM;DA[)C <F A:*Fk0010DEE933b	)IA)ANFk0010DEE 4 775>  ::>>.//KK-aU2PQRH	s4   AJ' B
J' AJ' 'A7J' B6J' '/K7K75K7c                0    V ^8  d   QhR\         R\         /# rY  rZ  )r7   s   "r   r   r   |  s      S S r   c                |   V P                  4       pVP                  R4      '       d7   V R,          p\        P                  ! RV4      '       d   RV 2# \	        R4      hVP                  R4      pV'       d   VRR
 p \        V,          R,          pT'       d   T R2# T#   \         d    \	        T : R	24      hi ; i)zNormalise a simple SPDX license expression.

https://spdx.github.io/spdx-spec/v2.2.2/SPDX-license-expressions/#d3-simple-license-expressions
zlicenseref-:   NNz[a-zA-Z0-9\-.]+zLicenseRef-zOLicenseRef- license expression can only contain ASCII letters & digits, - and .+Nidz$ is not a recognised SPDX license IDre  )rI   rJ   rp   	fullmatchr   endswithr   r   )r9   lsrefor_laternormalised_ids   &    r   ro  ro  |  s    
 
B	}}]##f<<*C00 && 
 	

 {{3HWH T* ""  HQE!EFGGHs   =B   B;>   r   r&  dev-requires>   r   r   r  r$  r"  	dist-name	home-pageauthor-emailr   r  r   maintainer-email>   r0   r   r  r   r3  r  r.   r1   r$  r&  r2   r!  r/  r-  r'  r  r  r0  )T)r   )7r   email.headerregistryr   r   loggingrT   os.pathr   rQ   pathlibr   rp   r   ImportErrorvendorr   
_spdx_datar   commonr   	versionnor	   	getLoggerr   r   r   r   r   r   r   r4  r   rq   r   r   r    r   rE   rL   objectrz   r   r   rC   r   r   r	  r  r  rB   r   r7  rS   r6  ro  r   r   r   <module>r     s[    (   	   	  ! 0 (!	* 	      
 *  *=9  jj)AB %&+ &
\|DDC6 C( L	?
L <DL>#J


K\6??Da    ,     s)   C9 9DD		DDDD