+
    WBi4                    D   ^ 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	H
t
HtHt ^ RIHtHt ^ RIt^RIHtHt ^RIHt ^RIHtHtHtHt ^RIHtHtHtHt ^R	I H!t!H"t" ]! R
RR7      t#RRRR./t$R R lt%R R lt&R R lt'R R lt(R R lt) ! R R4      t*R# )    )annotationsN)IteratorMappingSequence)AnyTypeVar)_ctxenv)tomllib)BuildBackendExceptionBuildExceptionBuildSystemTableValidationErrorTypoWarning)ConfigSettingsDistributionStrPathSubprocessRunner)check_dependencyparse_wheel_filename_TProjectBuilderProjectBuilder)boundbuild-backendz setuptools.build_meta:__legacy__requireszsetuptools >= 40.8.0c               $    V ^8  d   QhRRRRRR/# )   
dictionaryzMapping[str, str]expectedstrreturnNone )formats   "3/usr/lib/python3.14/site-packages/build/_builder.py__annotate__r%   '   s"      ,       c                    V  FS  p\         P                  ! R W4      P                  4       R8  g   K/  \        P                  ! RV RV R2\
        ^R7       KU  	  R # )Ng?zFound 'z#' in pyproject.toml, did you mean 'z'?)
stacklevel)difflibSequenceMatcherratiowarningswarnr   )r   r   objs   && r$   
_find_typor/   '   sO    ""47==?3FMM#A(2N r&   c                    V ^8  d   QhRRRR/# )r   
source_dirr   r    r!   r"   )r#   s   "r$   r%   r%   1   s     " "7 "t "r&   c                   \         P                  P                  V 4      '       g   R V  R2p\        V4      h\         P                  P	                  V R4      p\         P                  P	                  V R4      p\         P                  P                  V4      '       g9   \         P                  P                  V4      '       g   R V  R2p\        V4      hR# R# )zSource z is not a directorypyproject.tomlzsetup.pyzF does not appear to be a Python project: no pyproject.toml or setup.pyN)ospathisdirr   joinexists)r1   msgpyproject_tomlsetup_pys   &   r$   _validate_source_directoryr<   1   s    77==$$
|#67S!!WW\\*.>?Nww||J
3H77>>.))"''..2J2J
|#ijS!! 3K)r&   c                    V ^8  d   QhRRRR/# )r   r5   r   r    Mapping[str, Any]r"   )r#   s   "r$   r%   r%   <   s     , ,w ,+< ,r&   c                    \        V R 4      ;_uu_ 4       p\        P                  ! VP                  4       P	                  4       4      uuRRR4       #   + '       g   i     R# ; i  \
         d    / u # \         d.   pTP                   RTP                   R2p\        T4      RhRp?i\        P                   d   pRT  RT R2p\        T4      RhRp?ii ; i)rbNz: 'z' zFailed to parse z:  )openr   loadsreaddecodeFileNotFoundErrorPermissionErrorstrerrorfilenamer   TOMLDecodeError)r5   fer9   s   &   r$   _read_pyproject_tomlrM   <   s    
,$==!23  	 ,C

|2.S!t+"" , b1-S!t+,sR   A' 2A
A' A$	A' $A' 'C6C?C (B((C?C CCc                    V ^8  d   QhRRRR/# )r   r:   r>   r    r"   )r#   s   "r$   r%   r%   J   s     ) ).? )DU )r&   c                   R V 9  d   \        V R 4       \        # \        V R ,          4      pRV9  d   \        VR4       Rp\        V4      h\	        VR,          \
        4      '       dI   \        ;QJ d#    R VR,           4       F  '       d   K   RM	  RM! R VR,           4       4      '       g   Rp\        V4      hRV9  d   \        VR4       \        R,          VR&   M*\	        VR,          \        4      '       g   Rp\        V4      hR	V9   ds   \	        VR	,          \
        4      '       dI   \        ;QJ d#    R
 VR	,           4       F  '       d   K   RM	  RM! R
 VR	,           4       4      '       g   Rp\        V4      hVP                  4       0 Rm,
          pV'       d    RRP                  V4       2p\        V4      hV# )zbuild-systemr   z!`requires` is a required propertyc              3  B   "   T F  p\        V\        4      x  K  	  R # 5iN
isinstancer   .0is   & r$   	<genexpr>,_parse_build_system_table.<locals>.<genexpr>X   s      I$Bq
1c$B   FTz&`requires` must be an array of stringsr   z `build-backend` must be a stringbackend-pathc              3  B   "   T F  p\        V\        4      x  K  	  R # 5irQ   rR   rT   s   & r$   rW   rX   i   s     R/Q!:a%%/QrY   z*`backend-path` must be an array of stringszUnknown properties: z, >   r   rZ   r   )
r/   _DEFAULT_BACKENDdictr   rS   listallr   keysr7   )r:   build_system_tabler9   unknown_propss   &   r$   _parse_build_system_tablerc   J   s    ^+>>2n^<= ++%z21-c22*:6==SS I$6z$BISSS I$6z$BI F F 7-c2200%7 /?.O?+*?;SAA0-c22++).94@@sR/A./QRsssR/A./QRRR:-c22&++-0]]M$TYY}%=$>?-c22r&   c               $    V ^8  d   QhRRRRRR/# )r   runnerr   r
   env.IsolatedEnvr    r"   )r#   s   "r$   r%   r%   v   s#     " "$4 "? "O_ "r&   c                "   a a RR VV 3R lllpV# )Nc               (    V ^8  d   QhRRRRRRRR/# )	r   cmdzSequence[str]cwd
str | Noneextra_environzMapping[str, str] | Noner    r!   r"   )r#   s   "r$   r%   -_wrap_subprocess_runner.<locals>.__annotate__w   s2     X XX!+XC[X	Xr&   c                h   < S! Y/ SP                   ! 4       ;'       g    / CT;'       g    / C4       R # rQ   )make_extra_environ)ri   rj   rl   r
   re   s   &&&r$   _invoke_wrapped_runner7_wrap_subprocess_runner.<locals>._invoke_wrapped_runnerw   s4     	sVS335;;VATATRTVWr&   NNr"   )re   r
   rp   s   ff r$   _wrap_subprocess_runnerrs   v   s    X X
 "!r&   c                  N   ] tR t^tRt]P                  ]P                  3R R llt	]
]P                  3R R ll4       t]R R l4       t]R R	 l4       t]R
 R l4       tRR R lltRR R lltRR R lltRR R lltR R ltRR R llt]P.                  R R l4       tRtR# )r   z
The PEP 517 consumer API.
c               (    V ^8  d   QhRRRRRRRR/# )	r   r1   r   python_executabler   re   r   r    r!   r"   )r#   s   "r$   r%   ProjectBuilder.__annotate__   s2     (
 (
(
 (
 !	(

 
(
r&   c                   \         P                  P                  V4      V n        \	        V4       W n        W0n        \         P                  P                  VR4      p\        \        V4      4      V n
        V P                  R,          V n        \        P                  ! V P                  V P                  V P                  P                  R4      V P
                  V P                  R7      V n        R# )a  
:param source_dir: The source directory
:param python_executable: The python executable where the backend lives
:param runner: Runner for backend subprocesses

The ``runner``, if provided, must accept the following arguments:

- ``cmd``: a list of strings representing the command and arguments to
  execute, as would be passed to e.g. 'subprocess.check_call'.
- ``cwd``: a string representing the working directory that must be
  used for the subprocess. Corresponds to the provided source_dir.
- ``extra_environ``: a dict mapping environment variable names to values
  which must be set for the subprocess execution.

The default runner simply calls the backend hooks in a subprocess, writing backend output
to stdout/stderr.
r3   r   rZ   )backend_pathrv   re   N)r4   r5   abspath_source_dirr<   _python_executable_runnerr7   rc   rM   _build_system_backendpyproject_hooksBuildBackendHookCallerget_hook)selfr1   rv   re   pyproject_toml_paths   &&&& r$   __init__ProjectBuilder.__init__   s    . !#
 ;":."3 ggll:7GH67KL_7`a**?;$;;MM++//?"55<<

r&   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r   clsztype[_TProjectBuilder]r
   rf   r1   r   re   r   r    r   r"   )r#   s   "r$   r%   rw      s:     

 

#



 

 !	


 


r&   c                	>    V ! VVP                   \        W14      R 7      # ))r1   rv   re   )rv   rs   )r   r
   r1   re   s   &&&&r$   from_isolated_env ProjectBuilder.from_isolated_env   s%     !!33*67
 	
r&   c                   V ^8  d   QhRR/# r   r    r   r"   )r#   s   "r$   r%   rw      s        C  r&   c                    V P                   # )zProject source directory.)r{   r   s   &r$   r1   ProjectBuilder.source_dir   s     r&   c                   V ^8  d   QhRR/# r   r"   )r#   s   "r$   r%   rw      s     ' '3 'r&   c                    V P                   # )z3
The Python executable used to invoke the backend.
)r|   r   s   &r$   rv    ProjectBuilder.python_executable   s    
 &&&r&   c                   V ^8  d   QhRR/# )r   r    set[str]r"   )r#   s   "r$   r%   rw      s     3 3x 3r&   c                :    \        V P                  R,          4      # )z
The dependencies defined in the ``pyproject.toml``'s
``build-system.requires`` field or the default build dependencies
if ``pyproject.toml`` is missing or ``build-system`` is undefined.
r   )setr~   r   s   &r$   build_system_requires$ProjectBuilder.build_system_requires   s     4%%j122r&   Nc               $    V ^8  d   QhRRRRRR/# )r   distributionr   config_settingsConfigSettings | Noner    r   r"   )r#   s   "r$   r%   rw      s(     6 6"6 /6 
	6r&   c                    \         P                  ! RV R24       RV 2p\        V P                  V4      pV P	                  V4      ;_uu_ 4        \        V! V4      4      uuRRR4       #   + '       g   i     R# ; i)a  
Return the dependencies defined by the backend in addition to
:attr:`build_system_requires` for a given distribution.

:param distribution: Distribution to get the dependencies of
    (``sdist`` or ``wheel``)
:param config_settings: Config settings for the build backend
zGetting build dependencies for ...get_requires_for_build_N)r	   loggetattrr   _handle_backendr   )r   r   r   	hook_nameget_requiress   &&&  r$   get_requires_for_build%ProjectBuilder.get_requires_for_build   sc     	2<.DE-l^<	tzz95!!),,|O45 -,,,s   A++A<	c               $    V ^8  d   QhRRRRRR/# )r   r   r   r   r   r    zset[tuple[str, ...]]r"   )r#   s   "r$   r%   rw      s-     F F"F /F 
	Fr&   c                    V P                  W4      P                  V P                  4      pV UUu0 uF  p\        V4       F  qUkK  	  K  	  upp# u uppi )aa  
Return the dependencies which are not satisfied from the combined set of
:attr:`build_system_requires` and :meth:`get_requires_for_build` for a given
distribution.

:param distribution: Distribution to check (``sdist`` or ``wheel``)
:param config_settings: Config settings for the build backend
:returns: Set of variable-length unmet dependency tuples
)r   unionr   r   )r   r   r   dependenciesdus   &&&   r$   check_dependencies!ProjectBuilder.check_dependencies   sM     22<QWWX\XrXrs'E<a1A!1DA1D<EEEs   Ac               (    V ^8  d   QhRRRRRRRR/# )	r   r   r   output_directoryr   r   r   r    rk   r"   )r#   s   "r$   r%   rw      s2      " " /	
 
r&   c                    \         P                  ! RV R24        V P                  RV 2VVRR7      #   \         d7   p\	        TP
                  \        P                  4      '       d    Rp?R# h Rp?ii ; i)a"  
Prepare metadata for a distribution.

:param distribution: Distribution to build (must be ``wheel``)
:param output_directory: Directory to put the prepared metadata in
:param config_settings: Config settings for the build backend
:returns: The full path to the prepared metadata directory
zGetting metadata for r   prepare_metadata_for_build_F)_allow_fallbackN)r	   r   _call_backendr   rS   	exceptionr   HookMissing)r   r   r   r   r   s   &&&& r$   prepareProjectBuilder.prepare   s{     	(c:;
	%%-l^<  %	 &   % 	)--/J/JKK	s   4 A5*A0/A00A5c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r   r   r   r   r   r   r   metadata_directoryrk   r    r   r"   )r#   s   "r$   r%   rw     sC     h h"h "h /	h
 'h 
hr&   c                x    \         P                  ! RV R24       Vf   / MRV/pV P                  ! RV 2W#3/ VB # )a  
Build a distribution.

:param distribution: Distribution to build (``sdist`` or ``wheel``)
:param output_directory: Directory to put the built distribution in
:param config_settings: Config settings for the build backend
:param metadata_directory: If provided, should be the return value of a
    previous ``prepare`` call on the same ``distribution`` kind
:returns: The full path to the built distribution
z	Building r   r   build_)r	   r   r   )r   r   r   r   r   kwargss   &&&&& r$   buildProjectBuilder.build  sM    " 	9\N#./)18LN`7a!!F<."9;Kg`fggr&   c                    V ^8  d   QhRRRR/# )r   r   r   r    r   r"   )r#   s   "r$   r%   rw   %  s     8 8g 8# 8r&   c                  a V P                  RV4      pVe   V# V P                  RV4      p\        \        P                  P                  V4      4      pV'       g   Rp\        V4      hVR,           RVR,           R2pV R2o\        P                  ! V4      ;_uu_ 4       pVP                  VV3R	 lVP                  4        4       4       RRR4       \        P                  P                  W4      #   + '       g   i     L/; i)
aO  
Generate the metadata directory of a distribution and return its path.

If the backend does not support the ``prepare_metadata_for_build_wheel``
hook, a wheel will be built and the metadata will be extracted from it.

:param output_directory: Directory to put the metadata distribution in
:returns: The path of the metadata directory
wheelNzInvalid wheelr   -versionz
.dist-info/c              3  X   <"   T F  qP                  S4      '       g   K  Vx  K!  	  R # 5irQ   )
startswith)rU   membermember_prefixs   & r$   rW   /ProjectBuilder.metadata_path.<locals>.<genexpr>?  s     WlF6G6G6Vls   *
*)r   r   r   r4   r5   basename
ValueErrorzipfileZipFile
extractallnamelistr7   )	r   r   metadatar   matchr9   distinfowr   s	   &&      @r$   metadata_pathProjectBuilder.metadata_path%  s     <<)9:O 

7$45$RWW%5%5e%<=!CS/!N+,AeI.>-?zJ#*A__U##qLL WajjlW $
 ww||,77 $#s   "+C44D	c          
     ,    V ^8  d   QhRRRRRRRRR	R/# )
r   r   r   outdirr   r   r   r   r   r    r"   )r#   s   "r$   r%   rw   C  s4     . ..&-.@U.hk.	.r&   c                	   \         P                  P                  V4      p\        V P                  V4      p\         P                  P                  V4      '       d8   \         P                  P                  V4      '       g   R V R2p\        V4      hM\         P                  ! V4       V P                  V4      ;_uu_ 4        V! W#3/ VB pRRR4       \         P                  P                  VX4      #   + '       g   i     L0; i)zBuild path 'z' exists and is not a directoryN)r4   r5   rz   r   r   r8   r6   r   makedirsr   r7   )r   r   r   r   r   callbackr9   r   s   &&&&,   r$   r   ProjectBuilder._call_backendC  s     (4::y177>>&!!77==(($VH,KL$S)) ) KK!!),,$VGGH - ww||FH-- -,s   
C33D	c                    V ^8  d   QhRRRR/# )r   hookr   r    zIterator[None]r"   )r#   s   "r$   r%   rw   W  s     V VC VN Vr&   c              #  	^  "    R x  R #   \         P                   d5   p\        TRT P                   R2\        P
                  ! 4       4      R hR p?i\        P                   d   p\        TRT 24      R hR p?i\         d'   p\        T\        P
                  ! 4       R7      R hR p?ii ; i5i)Nz	Backend 'z' is not available.z0Backend subprocess exited when trying to invoke )exc_info)	r   BackendUnavailabler   r   sysr   
subprocessCalledProcessError	Exception)r   r   r   s   && r$   r   ProjectBuilder._handle_backendV  s     	V11 	'DMM?*=> 	
 ,, 	x'	5efjek3lmsww 	V'	CLLNKQUU	VsH   B-
 B-B*/AB*%B*&A66B*B*!B%%B**B-)r   r~   r   r|   r}   r{   rQ   rr   )__name__
__module____qualname____firstlineno____doc__r   
executabler   default_subprocess_runnerr   classmethodr   propertyr1   rv   r   r   r   r   r   r   r   
contextlibcontextmanagerr   __static_attributes__r"   r&   r$   r   r      s     "%#2#L#L	(
T 
 $3#L#L	

 

     ' ' 3 36(F"6h*8<.& V Vr&   )+
__future__r   r   r)   r4   r   r   r,   r   collections.abcr   r   r   typingr   r   r    r	   r
   _compatr   _exceptionsr   r   r   r   _typesr   r   r   r   _utilr   r   r   r\   r/   r<   rM   rc   rs   r   r"   r&   r$   <module>r      s    #   	  
   7 7      L K 9 -5EF  7'( ",)X"dV dVr&   