+
     hG  c                  s   R t ^ RIHt ^ RIt^ RIt^ RIHt ^ RIHt ^ RI	H
t
 ^ RIHt ^ RIHtHtHt ^RIHt ^R	IHtHt ^R
IHt ^RIHt ^RIHtHtHt ]'       d   ^ RI H!t! ^ RI"H#t# ]PH                  ! ]%4      t&R R lt'R R lt(R$R R llt)R%R R llt*R&R R llt+ ! R R4      t,R t-]R R l4       t. ! R R]P^                  4      t0 ! R  R!]4      t1 ! R" R#]4      t2R# )'ac  
Load setuptools configuration from ``pyproject.toml`` files.

**PRIVATE MODULE**: API reserved for setuptools internal usage only.

To read project metadata, consider using
``build.util.project_wheel_metadata`` (https://pypi.org/project/build/).
For simple scenarios, you can also try parsing the file directly
with the help of ``tomllib`` or ``tomli``.
)annotationsN)Mapping)contextmanager)partial)TracebackType)TYPE_CHECKINGAnyCallable)StrPath)	FileErrorInvalidConfigError)SetuptoolsWarning)expand)_PREVIOUSLY_DEFINED_MissingDynamicapply)SelfDistributionc                    V ^8  d   QhRRRR/# )   filepathr   returndict Zformat   "D/usr/lib/python3.14/site-packages/setuptools/config/pyprojecttoml.py__annotate__r   $   s     " " "D "    c                s    ^RI Hp \        V R4      ;_uu_ 4       pVP                  V4      uuRRR4       #   + '       g   i     R# ; i)r   )tomllibZrbN)Zcompat.py310r   ZopenZload)r   r   file   &  r   	load_filer!   $   s/    &	h		||D! 
			s	   7A	c               $    V ^8  d   QhRRRRRR/# )r   configr   r   r   r   boolr   r   r   r   r   r   +   s!     : :T :W : :r   c                s   ^RI Hp VP                  P                  R4      p\	        VR4      '       d   VP                  4         VP                  V 4      #   TP                   d   pRTP                   2pTP                  P                  R4      R8w  d5   \        P                  T4       \        P                  TP                  4       RTP                   R2p\        T R	T 24      R
hR
p?ii ; i)i   )_validate_pyprojectztrove-classifier_disable_downloadzconfiguration error: Z`projectzinvalid pyproject.toml config: Z.Z
N) r%   ZFORMAT_FUNCTIONSgetZhasattrr&   validateZValidationErrorsummarynamestrip_loggerdebugdetails
ValueError)r#   r   Z	validatorZtrove_classifierexr+   Zerrors   &&     r   r*   r*   +   s    2 11556HI!455**,
:!!&))$$ :)"**677==*MM'"MM"**%1"''!<E7"WI./T9:s   A C0'BC++C0c               s(    V ^8  d   QhRRRRRRRR/# )r   distr   r   r   ignore_option_errorsr$   r   r   r   r   r   r   r   @   s0     	* 	*
	*	* 	* 		*r   c                s4    \        VRW 4      p\        WV4      # )z]Apply the configuration from a ``pyproject.toml`` file into an existing
distribution object.
T)read_configuration_apply)r3   r   r4   r#   s   &&& r   apply_configurationr7   @   s       $0DKF$))r   c          
     s,    V ^8  d   QhRRRRRRRRRR	/# )
r   r   r   r   r$   r4   r3   Distribution | Noner   zdict[str, Any]r   r   r   r   r   r   L   sA     F FFF F 	F
 Fr   c                s   \         P                  P                  V 4      p \         P                  P                  V 4      '       g   \	        RV : R24      h\        V 4      ;'       g    / pVP                  R/ 4      pVP                  R/ 4      pVP                  R/ 4      pV'       d   V'       g   V'       g   / # RVP                  R/ 4      9   d   \        P                  4        RV9   d   \        P                  RR	7       V'       d,   VP                  e   VP                  RVP                  4       MVP                  RR4       WdR&   WvR&   RV9   d   \        P                  RR	7       \        V4      ;_uu_ 4        RVRRV//p\        W4       R
R
R
4       V'       d,   \         P                  P                  V 4      p	\        WIW#4      # V#   + '       g   i     LE; i)a  Read given configuration file and returns options from it as a dict.

:param str|unicode filepath: Path to configuration file in the ``pyproject.toml``
    format.

:param bool expand: Whether to expand directives and other computed values
    (i.e. post-process the given configuration)

:param bool ignore_option_errors: Whether to silently ignore
    options, values of which could not be resolved (e.g. due to exceptions
    in directives such as file:, attr:, etc.).
    If False exceptions are propagated as expected.

:param Distribution|None: Distribution object to which the configuration refers.
    If not given a dummy object will be created and discarded after the
    configuration is read. This is used for auto-discovery of packages and in the
    case a dynamic configuration (e.g. ``attr`` or ``cmdclass``) is expanded.
    When ``expand=False`` this object is simply ignored.

:rtype: dict
zConfiguration file z does not exist.r'   tool
setuptoolsZtoolsZ	distutilsz[tool.distutils])ZsubjectNzinclude-package-dataTzext-modulesz[tool.setuptools.ext-modules])osZpathZabspathZisfiler	   r!   r)   _ToolsTypoInMetadataZemit_ExperimentalConfigurationZinclude_package_data
setdefault_ignore_errorsr*   Zdirnameexpand_configuration)
r   r   r4   r3   ZasdictZproject_tableZ
tool_tableZsetuptools_tableZsubsetroot_dirs
   &&&&      r   r5   r5   L   s   6 wwx(H77>>(##-h\9IJKKx &&BFJJy"-MFB'J!~~lB7-+;	vzz'2..!!#j "''0B'C ))5##$:D<U<UV##$:DA6N/|(("''0O'P	,	-	-]F\CS4TU" 
.
 77??8,#F6JQQM 
.	-s   ?GG 	c          
     s,    V ^8  d   QhRRRRRRRRR	R/# )
r   r#   r   rA   StrPath | Noner4   r$   r3   r8   r   r   r   r   r   r   r      sA     R RRR R 	R
 
Rr   c                s6    \        WW#4      P                  4       # )a  Given a configuration with unresolved fields (e.g. dynamic, cmdclass, ...)
find their final values.

:param dict config: Dict containing the configuration for the distribution
:param str root_dir: Top-level directory for the distribution/project
    (the same directory where ``pyproject.toml`` is place)
:param bool ignore_option_errors: see :func:`read_configuration`
:param Distribution|None: Distribution object to which the configuration refers.
    If not given a dummy object will be created and discarded after the
    configuration is read. Used in the case a dynamic configuration
    (e.g. ``attr`` or ``cmdclass``).

:rtype: dict
)_ConfigExpanderr   )r#   rA   r4   r3      &&&&r   r@   r@      s    ( 6-AHOOQQr   c                  s    ] tR t^tR#R R lltR R ltR R ltR$R ltR	 tR
 t	R t
R R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR  R! ltR"tR# )%rC   Nc          
     s,    V ^8  d   QhRRRRRRRRR	R
/# )r   r#   r   rA   rB   r4   r$   r3   r8   r   Noner   r   r   r   r   _ConfigExpander.__annotate__   s<     , ,, !, #	,
 ", 
,r   c                	s   Wn         T;'       g    \        P                  ! 4       V n        VP	                  R / 4      V n        V P
                  P	                  R. 4      V n        VP	                  R/ 4      P	                  R/ 4      V n        V P                  P	                  R/ 4      V n        W0n	        W@n
        \        \        ,          ! 4       V n        R# )r'   dynamicr9   r:   N)r#   r;   ZgetcwdrA   r)   project_cfgrG   setuptools_cfgdynamic_cfgr4   _distZsetstr_referenced_files)selfr#   rA   r4   r3   s   &&&&&r   __init__Z_ConfigExpander.__init__   s      //BIIK!::i4''++Ir:$jj488rJ..229bA$8!
!$Sr   c                   V ^8  d   QhRR/# )r   r   r   r   r   r   r   r   rF      s     1 1l 1r   c                	s    ^ RI Hp RV P                  RV P                  P	                  RR4      /pV P
                  ;'       g	    V! V4      # )    r   Zsrc_rootr,   N)setuptools.distr   rA   rH   r)   rK   )rN   r   Zattrsr    r   _ensure_distZ_ConfigExpander._ensure_dist   sB    0T]]FD4D4D4H4HQU4VWzz00\%00r   c               r"   )r   	containerr   fieldrL   fnr   r   r   r   r   r   rF      s!     8 8 8S 8h 8r   c                	s    W!9   d9   \        V P                  4      ;_uu_ 4        V! W,          4      W&   R R R 4       R # R #   + '       g   i     R # ; iN)r?   r4   )rN   rT   rU   rV   rD   r   _process_fieldZ_ConfigExpander._process_field   s@     9 9::#%i&6#7	  ;: :::s   AA	c                	sf    V P                   P                  V/ 4      p\        P                  ! V4      # rW   )rI   r)   _expandZcanonic_package_data)rN   rU   Zpackage_data   && r   _canonic_package_dataZ%_ConfigExpander._canonic_package_data   s+    **..ub9++L99r   c                	s   V P                  4        V P                  4        V P                  R 4       V P                  4       p\        WP                  V P
                  4      pV;_uu_ 4       pVP                  pV P                  4        V P                  V4       V P                  W4       RRR4       VP                  P                  V P                  4       V P                  #   + '       g   i     LA; i)zexclude-package-dataN)_expand_packagesr[   rS   _EnsurePackagesDiscoveredrH   rI   package_dir_expand_data_files_expand_cmdclass_expand_all_dynamicrM   updater#   )rN   r3   ZctxZensure_discoveredr^   s   &    r   r   Z_ConfigExpander.expand   s    ""$""#9:   "'.>.>@S@STS%+77K##%!!+.$$T7	  	%%d&<&<={{ Ss   ,?C$$C4	c                	s   V P                   P                  R 4      pVe   \        V\        \        34      '       d   R# VP                  R4      p\        V\
        4      '       dz   V P                  VR&   V P                   P                  R/ 4      VR&   \        V P                  4      ;_uu_ 4        \        P                  ! R/ VB V P                   R &   RRR4       R# R#   + '       g   i     R# ; i)packagesNfindrA   package-dirZfill_package_dirr   )rI   r)   
isinstanceZlistZtupler   rA   r>   r?   r4   rY   Zfind_packages)rN   rc   rd   r    r   r\   Z _ConfigExpander._expand_packages   s    &&**:6z(T5MBB||F#dD!!#}}D'+':':'E'EmUW'XD#$ 9 9::292G2G2O$2O##J/ ;: " ;::s   0$C  C1	c                	s    \        \        P                  V P                  R 7      pV P	                  V P
                  RV4       R# ))rA   z
data-filesN)r   rY   Zcanonic_data_filesrA   rX   rI   )rN   Z
data_files   & r   r_   Z"_ConfigExpander._expand_data_files   s0    W77$--P
D//zJr   c               rP   )r   r^   Mapping[str, str]r   r   r   r   r   rF      s     G G,= Gr   c                	s    V P                   p\        \        P                  WR 7      pV P	                  V P
                  RV4       R# ))r^   rA   cmdclassN)rA   r   rY   ri   rX   rI   )rN   r^   rA   ri   s   &&  r   r`   Z _ConfigExpander._expand_cmdclass   s5    ==7++XD//XFr   c               r   r   r3   r   r^   rh   r   r   r   r   r   rF      s     ) ) )CT )r   c           
     	s   RpV P                    Uu/ uF  pWC9  g   K  W@P                  WV4      bK  	  ppTP                  V P                  W4      ;'       g    / V P	                  W4      V P                  V4      V P                  V4      V P                  V4      V P                  V4      R7       VP                  4        UUu/ uF  w  rgVf   K  WgbK  	  pppV P                  P                  V4       R# u upi u uppi )version)rk   readmeclassifiersdependenciesZoptional_dependenciesN)rk   rl   entry-pointsscriptsgui-scriptsrm   rn   optional-dependencies)rG   _obtainrb   _obtain_entry_points_obtain_version_obtain_readme_obtain_classifiers_obtain_dependencies_obtain_optional_dependenciesitemsrH   )	rN   r3   r^   ZspecialrU   Zobtained_dynamicZkZvZupdatess	   &&&      r   ra   Z#_ConfigExpander._expand_all_dynamic   s    	
 
%# :E<<[99% 	 

 	%%d8>>B((;&&t,0062248"&"D"DT"J 	  	
 %5$:$:$<N$<DA414$<N(!
 Os   C7C7C<C<c               r   )r   r3   r   rU   rL   r   r   r   r   r   rF     s     * *< * *r   c                	s    \         V,          ! V4      pVf'   V P                  '       g   RV: R2p\        V4      hR # R # )Nz#No configuration found for dynamic z.
Some dynamic fields need to be specified via `tool.setuptools.dynamic`
others must be specified via the equivalent attribute in `setup.py`.)r   r4   r
   )rN   r3   rU   ZpreviousZmsgs   &&&  r   _ensure_previously_setZ&_ConfigExpander._ensure_previously_set  sO    &u-d3D$=$=$=5eY ?Y Y 
 %S)) %>r   c               r   )r   	specifierrL   r^   rh   r   r   r   r   r   rF     s      6Gr   c                	s   ^ RI Hp \        V P                  4      ;_uu_ 4        V P                  pRV9   dQ   V P
                  P                  V! VR,          4      4       \        P                  ! VR,          V4      uuRRR4       # RV9   d)   \        P                  ! VR,          W54      uuRRR4       # \        RV RV: 24      h  + '       g   i     R# ; i)rQ   )always_iterabler   NZattrz	invalid `z`: )Zmore_itertoolsr}   r?   r4   rA   rM   rb   rY   Z
read_filesZ	read_attrr1   )rN   r|   	directiver^   r}   rA   s   &&&&  r   _expand_directiveZ!_ConfigExpander._expand_directive  s     	3D5566}}H"&&--oi>O.PQ)))F*;XF	 76
 "((6):KR 76 y3ymDEE 76 s   AC	$C	7C		C	c               r"   )r   r3   r   rU   rL   r^   rh   r   r   r   r   r   rF   *  s"      L  CT r   c                	s    W P                   9   d(   V P                  R V 2V P                   V,          V4      # V P                  W4       R# )ztool.setuptools.dynamic.N)rJ   r   r{   )rN   r3   rU   r^   rD   r   rs   Z_ConfigExpander._obtain*  sO    $$$))*5'2  ' 
 	##D0r   c               r   rj   r   r   r   r   r   rF   4  s      L ?P r   c                	s    R V P                   9   d9   R V P                  9   d(   \        P                  ! V P	                  VR V4      4      # R# )rk   N)rG   rJ   rY   rk   rs   )rN   r3   r^   s   &&&r   ru   Z_ConfigExpander._obtain_version4  sA    $d6F6F)F??T9k:  r   c               r   )r   r3   r   r   zdict[str, str] | Noner   r   r   r   r   rF   =  s      < 4I r   c                	s    R V P                   9  d   R# V P                  pR V9   d/   RV P                  VR / 4      RVR ,          P                  RR4      /# V P	                  VR 4       R# )rl   Ntextzcontent-typez
text/x-rst)rG   rJ   rs   r)   r{   )rN   r3   rJ   rZ   r   rv   Z_ConfigExpander._obtain_readme=  sn    4<<'&&{" T8R8H 5 9 9., W  	##D(3r   c               r"   )r   r3   r   r^   rh   r   z dict[str, dict[str, Any]] | Noner   r   r   r   r   rF   L  s$       /@	)r   c                	s4  a aa Rp\         ;QJ d    V 3R lV 4       F  '       g   K   RM	  RM! V 3R lV 4       4      '       g   R# S P                  VR V4      pVf   R# \        P                  ! V4      oR S/oR VVV 3R llpV! RR	4       V! RR
4       S# )ro   rp   rq   c              3  s@   <"   T F  qSP                   9   x  K  	  R # 5irW   )rG   )Z.0rU   rN   s   & r   Z	<genexpr>Z7_ConfigExpander._obtain_entry_points.<locals>.<genexpr>P  s     =fUDLL(fs   TFNc               s     V ^8  d   QhRRRR/# )r   rU   rL   groupr   r   r   r   r   Z:_ConfigExpander._obtain_entry_points.<locals>.__annotate__[  s     	( 	( 	(C 	(r   c                s   < VS9   dI   SP                  V4      pV SP                  9  d    \        \        P                  ! W4      4      hVSV &   R # R # rW   )ZpoprG   r
   r   r0   )rU   r   valueexpandedgroupsrN   s   && r   _set_scriptsZ:_ConfigExpander._obtain_entry_points.<locals>._set_scripts[  sH    

5),,_-D-DU-RSS"'	 r   Zconsole_scriptsZgui_scripts)ro   rp   rq   )Zanyrs   rY   Zentry_points)rN   r3   r^   Zfieldsr   r   r   r   s   f&&   @@r   rt   Z$_ConfigExpander._obtain_entry_pointsL  s     <s=f=sss=f===||D.+><%%d+/=v.F	( 	( 	Y 12]M2r   c               rP   r   r3   r   r   r   r   r   r   rF   g  s       r   c                	s~    R V P                   9   d,   V P                  VR / 4      pV'       d   VP                  4       # R# )rm   N)rG   rs   
splitlinesrN   r3   r   rZ   r   rw   Z#_ConfigExpander._obtain_classifiersg  s5    DLL(LL}b9E''))r   c               rP   r   r   r   r   r   r   rF   n  s       r   c                	st    R V P                   9   d'   V P                  VR / 4      pV'       d   \        V4      # R# )rn   N)rG   rs   _parse_requirements_listr   rZ   r   rx   Z$_ConfigExpander._obtain_dependenciesn  s1    T\\)LL~r:E/66r   c               rP   r   r   r   r   r   r   rF   u  s      , r   c                	sX   R V P                   9  d   R# R V P                  9   dn   V P                  R ,          p\        V\        4      '       g   Q hVP	                  4        UUu/ uF%  w  r4V\        V P                  RV 2V/ 4      4      bK'  	  upp# V P                  VR 4       R# u uppi )rr   Nz.tool.setuptools.dynamic.optional-dependencies.)rG   rJ   rf   r   rz   r   r   r{   )rN   r3   Zoptional_dependencies_mapr   r~   s   &&   r   ry   Z-_ConfigExpander._obtain_optional_dependenciesu  s    "$,,6"d&6&66(,(8(89P(Q%7>>>> )B(G(G(I	 )J$E /**HP!  )J	 	 	##D*AB	s   #+B&)	rK   rM   r#   rG   rJ   r4   rH   rA   rI   NFN)zpackage-data)__name__
__module____qualname____firstlineno__rO   rS   rX   r[   r   r\   r_   r`   ra   r{   r   rs   ru   rv   rt   rw   rx   ry   __static_attributes__r   r   r   rC   rC      sd    ,"18
:"
PKG
)<*6 r   rC   c                s    V P                  4        Uu. uFD  pVP                  4       '       g   K  VP                  4       P                  R 4      '       d   KB  VNKF  	  up# u upi )Z#)r   r-   Z
startswith)r   Zlinerg   r   r   r     sV     $$&&D::< 	 $

 7 7 < 	&  s   A "A A c               rP   )r   r4   r$   r   r   r   r   r   r     s     H H Hr   c              #  s   "   V '       g   R x  R #  R x  R #   \          d;   p\        P                  RTP                  P                   RT 24        R p?R # R p?ii ; i5i)Nzignored error: z - )Z	Exceptionr.   r/   	__class__r   )r4   r2   rg   r   r?   r?     sO     H H(=(='>c"FGGHs*   A  A A/AA AA c                  sR   a  ] tR tRtR V 3R lltR V 3R lltR V 3R lltRtV ;t# )	r]   i  c               s(    V ^8  d   QhRRRRRRRR/# )r   distributionr   rH   r   rI   r   rE   r   r   r   r   r   &_EnsurePackagesDiscovered.__annotate__  s,     . .(.7;.MQ.	.r   c                	s>   < \         SV `  V4       W n        W0n        R # rW   )superrO   _project_cfg_setuptools_cfg)rN   r   rH   rI   r      &&&&r   rO   Z"_EnsurePackagesDiscovered.__init__  s     	&'-r   c               rP   )r   r   r   r   r   r   r   r   r     s     # #4 #r   c                s  < V P                   V P                  r!VP                  R/ 4      pTP                  VP                  ;'       g    / 4       W1n        VP
                  P                  4        VP                  P                  f+   V P                  P                  R4      VP                  n        VP                  f   VP                  R4      Vn        VP                  f   VP                  R4      Vn        \        SV `9  4       # )zWhen entering the context, the values of ``packages``, ``py_modules`` and
``package_dir`` that are missing in ``dist`` are copied from ``setuptools_cfg``.
re   r,   
py-modulesrc   )rK   r   r>   rb   r^   Zset_defaultsZ_ignore_ext_modulesZmetadatar,   r   r)   
py_modulesrc   r   	__enter__)rN   r3   Zcfgr^   r   s   &   r   r   Z#_EnsurePackagesDiscovered.__enter__  s     JJ 4 4c&)nn]B&G4++11r2&--/ ==%!%!2!2!6!6v!>DMM??"!ggl3DO== GGJ/DMw ""r   c               s(    V ^8  d   QhRRRRRRRR/# )	r   exc_typeztype[BaseException] | None	exc_valuezBaseException | None	tracebackzTracebackType | Noner   rE   r   r   r   r   r   r     s8     @ @,@ (@ (	@
 
@r   c                s   < V P                   P                  RV P                  P                  4       V P                   P                  RV P                  P                  4       \
        SV `  WV4      # )zWhen exiting the context, if values of ``packages``, ``py_modules`` and
``package_dir`` are missing in ``setuptools_cfg``, copy from ``dist``.
rc   r   )r   r>   rK   rc   r   r   __exit__)rN   r   r   r   r   r   r   r   Z"_EnsurePackagesDiscovered.__exit__  sW     	''
DJJ4G4GH''djj6K6KLwY??r   )r   r   )	r   r   r   r   rO   r   r   r   Z__classcell__)r   s   @r   r]   r]     s#    . .# #,@ @r   r]   c                      ] tR tRtRtRtR# )r=   i  z``{subject}` in `pyproject.toml` is still *experimental* and likely to change in future releases.r   Nr   r   r   r   Z_SUMMARYr   r   r   r   r=   r=     s    	3 r   r=   c                  r   )r<   i  zNIgnoring [tools.setuptools] in pyproject.toml, did you mean [tool.setuptools]?r   Nr   r   r   r   r<   r<     s
    X r   r<   )F)TFNr   )3Z__doc__Z
__future__r    Zloggingr;   Zcollections.abcr   Z
contextlibr   Z	functoolsr   Ztypesr   Ztypingr   r   r   Z_pathr   Zerrorsr	   r
   Zwarningsr   r(   r   rY   Z_apply_pyprojecttomlr   r   r   r6   Ztyping_extensionsr   rR   r   Z	getLoggerr   r.   r!   r*   r7   r5   r@   rC   r   r?   ZEnsurePackagesDiscoveredr]   r=   r<   r   r   r   <module>r      s   	 #  	 # %   / /  2 (  W W&,


H
%":*	*FRR.Z Zz H H*@ @ @ *@Z!2 , r   