
    KiI                       S SK Jr  S SKrS SKrS SKrS SKrS SKrS SKrS SKrS SK	r	S SK
r
S SKrS SKrS SKrS SKrS SKJrJrJr  S SKJr  S SKJrJrJr  S SKrS SKrSSKJrJr  SSKJr  SS	K J!r!J"r"J#r#  SS
K$J%r%J&r&J'r'J(r(  SSKJ)r)  SSSSSSSS.r*\+RY                  \*S5      r-\R\                  " S\*S9r/S-S jr0S.S/S jjr1  S0             S1S jjr2S2S jr3S3S jr4S4S5S jjr5S6S jr6\Rn                   S7               S8S jj5       r8                S9S jr9\Rn                  S:S  j5       r:S;S! jr;    S<               S=S" jjr<    S<               S=S# jjr=    S<               S=S$ jjr>S>S% jr?S?S& jr@S7S@S' jjrAS-S( jrB\CS):X  a  \A" \
R                  SS S*5        S+S,/rEg)A    )annotationsN)IteratorMappingSequence)partial)AnyNoReturnTextIO   )ProjectBuilder_ctx)env)BuildBackendExceptionBuildExceptionFailedProcessError)ConfigSettingsDistributionStrPathSubprocessRunner)DefaultIsolatedEnvz[91mz[92mz[93mz[1mz[2mz[4mz[0m)redgreenyellowbolddim	underlinereset _styles)defaultc                 T   S[         R                  ;   aC  S[         R                  ;   a  [        R                  " SSS9  [        R                  [        5        O8S[         R                  ;   d#  [        R                  R                  5       (       a  g [        R                  [        5        g )NNO_COLORFORCE_COLORzLBoth NO_COLOR and FORCE_COLOR environment variables are set, disabling color   )
stacklevel)
osenvironwarningswarnr   set
_NO_COLORSsysstdoutisatty     P/var/www/html/dynamic-report/venv/lib/python3.13/site-packages/build/__main__.py_init_colorsr2   1   sc    RZZBJJ&MMhuvwJ	"**	$

(9(9(;(;KK
r0   c                `    [        U R                  " U40 [        R                  5       D6USS9  g )NT)fileflush)printformatr   get)fmtmsgr4   s      r1   _cprintr;   ;   s"    	#**S
*GKKM
*TBr0   c                0    [        S[        U 5      U5        g )Nz{yellow}WARNING{reset} {})r;   str)messagecategoryfilenamelinenor4   lines         r1   _showwarningrC   ?   s     'Wt<r0   c                    ^ [         R                  " 5       R                  S-
  n U S::  a  Sn [        [        R
                  SU S9mS S.SU4S jjjnU$ )	Nr$   r   N     )subsequent_indentwidth)originc          	     x  > [         R                  S:  a  UcV  U R                  5       tp#[        ST" USS9[        R
                  S9  U H   n[        T" USS9[        R
                  S9  M"     g US   S:X  aB  US	   S
:X  a  SOSnU R                  5        H   n[        ST" XES9[        R
                  S9  M"     g g g )Nz{bold}{}{reset}z* )initial_indentr4   rF   r   
subprocessr   cmdz> z< z{dim}{}{reset})r   	verbosity
splitlinesr;   r,   stderrr6   )r>   rI   firstrestrB   rL   fills         r1   log_make_logger.<locals>.logQ   s    >>R~!(!3!3!5)4d+KRUR\R\] D$tD9

K ! l*)/e);#..0D,d4.W^a^h^hi 1 +  r0   )r>   r=   rI   ztuple[str, ...] | NonereturnNone)shutilget_terminal_sizecolumnsr   textwraprU   )max_terminal_widthrV   rU   s     @r1   _make_loggerr_   J   sT    113;;a?Q8==D@RSD>B j j Jr0   c                >   [         [        l        [        R                  " 5       S:X  a   SS KnUR                  5         [        5         [        R                  R                  [        5       5        [        R                  R                  U 5        g ! [         a     N]f = f)NWindowsr   )rC   r(   showwarningplatformsystemcoloramainitModuleNotFoundErrorr2   r   LOGGERr*   r_   	VERBOSITY)rP   re   s     r1   
_setup_clirj   a   si    'HI%	MMO NKKOOLN#NNy! # 		s   B 
BBc                J    [        SU [        R                  S9  [        U5      e)z
Print an error message and exit. Will color the output when writing to a TTY.

:param msg: Error message
:param code: Error code
z{red}ERROR{reset} {}rM   )r;   r,   rR   
SystemExit)r:   codes     r1   _errorrn   r   s      "Ccjj9
T
r0   c                2    SR                  S U  5       5      $ )Nz -> c              3  d   #    U  H&  oR                  S 5      S   R                  5       v   M(     g7f);r   N)	partitionstrip).0deps     r1   	<genexpr>$_format_dep_chain.<locals>.<genexpr>~   s(     J	}}S)!,2244	s   .0)join)	dep_chains    r1   _format_dep_chainrz   }   s    ;;J	JJJr0   c              #  6  #    U (       a  [        US9 n[        [        R                  Xq5      nU(       a	  [        XS9nU" 5       n	UR	                  U	R
                  5        UR	                  U	R                  X#5      5        U	v   S S S 5        g [        [        U5      nU(       a	  [        XS9nU" 5       n	U(       dH  U	R                  X#5      n
U
(       a0  SR                  S U
 5       5      n[        5         [        SU 35        U	v   g ! , (       d  f       g = f7f)N)	installerrunnerr   c              3  p   #    U  H,  oS    [        USS 5      4  H  o"(       d  M  SU-   v   M     M.     g7f)r   r   Nz
	)rz   )rt   depsru   s      r1   rv   '_bootstrap_build_env.<locals>.<genexpr>   s<      '-4TaJ[\`abac\dJe@fjmLFSL@fLWs    66zMissing dependencies:)r   r   r   from_isolated_envinstallbuild_system_requiresget_requires_for_buildcheck_dependenciesrx   r;   rn   )	isolationsrcdirdistributionconfig_settingsskip_dependency_checkr|   r~   r   make_builderbuildermissingdependenciess               r1   _bootstrap_build_envr      s      )4">#C#CSQL&|C"nG KK556KK66|UVM 54 ~v6"<?L.$00OG!ww '-4'   	.|n=>9 54s   DA1DBD
DDc           
         [        U UUUUU[        R                  S:  a  [        R                  OS 5       nUR                  X2U5      sS S S 5        $ ! , (       d  f       g = f)Nr   )r   r   rP   pyproject_hooksquiet_subprocess_runnerbuild)r   r   outdirr   r   r   r|   r   s           r1   _buildr      sW     
37>>A3E//4
 
}}\?C
 
 
s   A
A c               #  "  #     S v   g ! [         [        4 a  n [        [        U 5      5         S n A g S n A f[         a  n [        U R                  [        R                  5      (       a  [        5         [        [        U 5      5        U R                  (       aP  [        R                  " U R                  S   U R                  S   U R                  S   SS9nSR                  U5      nO[        R                  " S5      n[        SUR                  S5      5        [        [        U 5      5         S n A g S n A f[          aN  n [        R                  " 5       R                  S5      n[        SU5        [        [        U 5      5         S n A g S n A ff = f7f)	Nr   r   r$   rK   )limitr   z
{dim}{}{reset}

)r   r   rn   r=   r   
isinstance	exceptionrN   CalledProcessErrorr;   exc_info	tracebackformat_exceptionrx   
format_excrs   	Exception)etb_linestbs      r1   _handle_build_errorr      s    ./ s1v  akk:#@#@AAI3q6N:: 11

1

1

1	H "B%%b)B$bhhtn5s1v !!#))$/$b)s1vsL   F	 FF2FFC-D1,F1F>AFFFFc                    [        U 5      S:X  a  Sn[        U5      e[        U 5      S:X  a  U S   $ SR                  SR                  U S S 5      U S   5      $ )Nr   zno elementsr   z	{} and {}z, rK   )len
IndexErrorr7   rx   )elementsr:   s     r1   _natural_language_listr      s_    
8}o	X!	{!!IIhsm$RL
 	
r0   c           
         / nU H?  n[        X@XX5U5      n	UR                  [        R                  R	                  U	5      5        MA     U$ )a`  
Run the build process.

:param srcdir: Source directory
:param outdir: Output directory
:param distribution: Distribution to build (sdist or wheel)
:param config_settings: Configuration settings to be passed to the backend
:param isolation: Isolate the build in a separate environment
:param skip_dependency_check: Do not perform the dependency check
)r   appendr&   pathbasename)
r   r   distributionsr   r   r   r|   builtr   outs
             r1   build_packager      sF    & E%YofopRWW%%c*+ & Lr0   c                   SSK Jn  SU;   a  Sn[        U5      e[        X@USX5U5      n	[        R
                  R                  U	5      n
[        R                  " SS9n/ nU(       a  UR                  R                  U	5       nUR                  U5         [        R                  " S[        U5       S35        [        R
                  R                  XS	[!        S
5      *  5      n U H?  n[        X@XX5U5      nUR#                  [        R
                  R                  U5      5        MA     [$        R&                  " USS9   S	S	S	5        U
/UQ$ ! [$        R&                  " USS9  f = f! , (       d  f       N-= f)a  
Build a sdist and then the specified distributions from it.

:param srcdir: Source directory
:param outdir: Output directory
:param distribution: Distribution to build (only wheel)
:param config_settings: Configuration settings to be passed to the backend
:param isolation: Isolate the build in a separate environment
:param skip_dependency_check: Do not perform the dependency check
r   )tarfilesdistz=Only binary distributions are allowed but sdist was specifiedzbuild-via-sdist-)prefixz	Building z from sdistNz.tar.gzT)ignore_errors)_compatr   
ValueErrorr   r&   r   r   tempfilemkdtempTarFileopen
extractallr   rV   r   rx   r   r   rZ   rmtree)r   r   r   r   r   r   r|   r   r:   r   
sdist_name	sdist_outr   tr   r   s                   r1   build_package_via_sdistr     s5   & !-Mo9fg_hiE!!%(J  (:;IE__!!%(ALL#=9%;M%J$K;WXi<Ms9~o1NO$1L F/r{|CLL!1!1#!67 %2 it< )  it< )(s%    E$BE
'E$
E!!E$$
E2c           
         SS K nS
SS jjn[        X@SX5XhS9 n	[        R                  " 5        n
[	        [
        R                  R                  U	R                  U
5      S5      S5       nUR                  R                  UR                  5       5      u  pS S S 5        S S S 5        S S S 5        [        [        R                  " WSSS	95        / $ ! , (       d  f       N?= f! , (       d  f       NH= f! , (       d  f       NQ= f)Nr   c                    [         R                  R                  5       nU(       a  UR                  U5        [        R
                  " XU5        g N)r&   r'   copyupdater   run_subprocess)rO   cwdextra_environr   s       r1   r   '_build_metadata.<locals>.run_subprocess<  s1    jjooJJ}%Cc*r0   wheelr}   METADATArbFr$   )ensure_asciiindentNN)rO   zSequence[StrPath]r   
str | Noner   zMapping[str, str] | NonerX   rY   )packaging.metadatar   r   TemporaryDirectoryr   r&   r   rx   metadata_pathmetadataparse_emailreadr6   jsondumps)r   r   r   r   r   r   r|   	packagingr   r   tempdirmetadata_filevalid_metadata_s                 r1   _build_metadatar   1  s     + 	wPY	
##%GGLL..w7D	
 %..::=;M;M;OP	
 	&	
 


>a@ I	
 	
 	&%	
 	
s:   C/:C(,CCC/
CC
C,	(C//
C=c                     " S S[         R                  5      n [         R                  n[        [         R                  SSR                  5       US9n[        R                  S:  a
  [        USS9nU" 5       nUR                  S	[        S
[        R                  " 5       SS9  UR                  S5      nUR                  SSS[         R                  SS9  UR                  SSSS[        R                   SSR!                  [        R"                  5       S3S9  UR%                  5       nUR                  SSSU SSS 9  UR                  S!S"SS#SS$S 9  UR                  S%5      nUR                  S&S'[        S([        R&                   S)3S*S+9  UR                  S,S-S.S/S0S1S29  UR                  S3S4S.S/S5S6S29  UR                  S7S8S9S:9  UR%                  5       nUR                  S;S<S=S>S?S@SA9  UR                  SBSCSDSESF9  UR                  SG5      nUR%                  5       n	U	R                  SH[(        R*                  SISJ9  U	R                  SKSLS8SMS:9  UR                  SNSOS8SPS:9  U$ )Qz
Construct the main parser.
c                  h   ^  \ rS rSr  S         SU 4S jjjr S         SS jjrSrU =r$ )	(main_parser.<locals>.NegativeCountActioniY  c                (   > [         TU ]  UUSUUS9  g )Nr   )option_stringsdestnargsr    help)super__init__)selfr   r   r    r   	__class__s        r1   r   1main_parser.<locals>.NegativeCountAction.__init__Z  s&     G-  r0   c           	     ^    [        X R                  [        X R                  S5      S-
  5        g )Nr   r   )setattrr   getattr)r   parser	namespacevaluesoption_strings        r1   __call__1main_parser.<locals>.NegativeCountAction.__call__i  s"     Iyy')YY*JQ*NOr0   r/   r   )
r   Sequence[str]r   r=   r    r   r   r   rX   rY   r   )
r   argparse.ArgumentParserr   objectr   zstr | Sequence[Any] | Noner   r   rX   rY   )__name__
__module____qualname____firstlineno__r   r   __static_attributes____classcell__)r   s   @r1   NegativeCountActionr   Y  s    
  #	)	 	 		
 	 	 	( )-	P+	P 	P /		P
 &	P 	P 	Pr0   r  Fa:      A simple, correct Python build frontend.

    By default, a source distribution (sdist) is built from the project root
    and a binary distribution (wheel) is built from the sdist.
    If this is undesirable, you can pass `--sdist` and/or `--wheel`
    to build distributions independently of each other.
    )add_helpdescriptionformatter_class)      T)suggest_on_errorr   ?z<source directory (defaults to the current working directory))typer   r    r   zglobal optionsz-hz--helpr   zshow this help message and exit)actionr    r   z	--versionz-Vversionzbuild z (,))r
  r  z--quietz-qrP   r   zreduce verbosity)r   r
  r    r   z	--verbosez-vcountzincrease verbosityzbuild optionsz--outdirz-oz&output directory (defaults to {srcdir}z3dist).  Cannot be used together with ``--metadata``PATH)r	  r   metavarz--sdistz-sr   append_constr   z;build a source distribution (disables the default behavior))r   r
  constr   z--wheelz-wr   z-build a wheel (disables the default behavior)z
--metadata
store_truezjprint out a wheel's metadata in JSON format. Cannot be used in conjunction with ``--sdist`` or ``--wheel``)r
  r   z--config-settingz-Cr   r   zsettings to pass to the backend.  Multiple settings can be provided. Settings beginning with a hyphen will erroneously be interpreted as options to build if separated by a space; use ``--config-setting=--my-setting -C--my-other-setting`` insteadzKEY[=VALUE])r   r
  r   r  z--config-jsonconfig_jsonzsettings to pass to the backend as a JSON object. This is an alternative to ``--config-setting`` that allows complex nested structures. Cannot be used together with ``--config-setting``JSON_STRING)r   r   r  zinstallation optionsz--installerz1Python package installer to use (defaults to pip))choicesr   z--no-isolationz-nzdisable building the project in an isolated virtual environment. Build dependencies must be installed separately when this option is usedz--skip-dependency-checkz-xz2do not check that build dependencies are installed)argparseActionRawDescriptionHelpFormatterr   ArgumentParserrstripr,   version_infoadd_argumentr=   r&   getcwdadd_argument_groupSUPPRESSr   __version__rx   __path__add_mutually_exclusive_groupsep_env
INSTALLERS)
r  r  make_parserr   global_groupverbosity_exclusive_groupbuild_groupconfig_exclusive_groupinstall_groupenv_exclusive_groups
             r1   main_parserr.  T  s   
Phoo P2 ::O 	 (K 7"kDA]F
		K   ,,-=>L!!.   **+2chhu~~.F-GqI	   !- I I K**" +  **! +  ++O<K7x?rs   J   <   y  
 )EEG''Y  ( 	 ''<  (  --.DEM'DDF$$@ % 
 $$S	 %  !A	   Mr0   c                    [         [        [        4   " 5       nU  HS  nUR                  S5      u  p4nX1;  a  XQU'   M"  [	        X   [
        5      (       d  X   /X'   X   R                  U5        MU     U$ )N=)dictr=   r   rr   r   listr   )raw_config_settingsr   argsettingr   values         r1   _parse_config_settingsr7    st    38n&O"MM#.E)',G$o6==,;,D+E($++E2 # r0   c                ,   [        5       nU(       a  Xl        UR                  U 5      n[        UR                  S9  [
        [        [        4   " 5       nUR                  (       aB   [        R                  " UR                  5      n[        U[
        5      (       d  [        S5        O&UR                  (       a  [        UR                  5      nUR                   c*  ["        R$                  R'                  UR(                  S5      OUR                   nUR*                  (       a#  UR,                  (       a  UR/                  S5        OZUR*                  (       a  [1        [2        S/S9nO9UR,                  (       a  [1        [4        UR,                  S9nO[1        [6        S/S9n[9        5          W" UR(                  UUUR:                  (       + UR<                  UR>                  S	9n[@        R                  S
:  aR  U(       aK  [C        U V	s/ s H(  n	SRD                  " U	40 [F        RI                  5       D6PM*     sn	5      n
[K        SU
5        SSS5        g! [        R                   a  n[        SU 35         SnAGNSnAff = fs  sn	f ! , (       d  f       g= f)z
Parse the CLI arguments and invoke the build process.

:param cli_args: CLI arguments
:param prog: Program name to show in help text
)rP   zN--config-json must contain a JSON object (dict), not a list or primitive valuezInvalid JSON in --config-json: Ndistz/--metadata: not allowed with --sdist or --wheelr   )r   )r   r   r   r|   rK   z!{underline}{}{reset}{bold}{green}z){bold}{green}Successfully built {}{reset})&r.  prog
parse_argsrj   rP   r1  r=   r   r  r   loadsr   rn   JSONDecodeErrorr   r7  r   r&   r   rx   r   r   r   errorr   r   r   r   r   no_isolationr   r|   r   r   r7   r   r8   r;   )cli_argsr:  r   argsr   r   r   r   r   artifactartifact_lists              r1   mainrD    s    ]FX&D(38n&O 	:"jj)9)9:Oot44gh
 
		01E1EF 37++2ERWW\\$++v.4;;F}}++FG	yA			T5G5GH/yI		KK++++"&"<"<nn
 >>RE2glmgl[c4;;HVVglmM ?O 
	' ## 	:4QC899	:< n 
	s8   &A I (AJ/J 
4JI=$I88I= J
Jc                 <    [        [        R                  SS  5        g )Nr   )rD  r,   argvr/   r0   r1   
entrypointrG  A  s    !"r0   __main__zpython -m buildrD  r.  )rX   rY   )r   r   N)r9   r=   r:   r=   r4   TextIO | NonerX   rY   r   )r>   zWarning | strr?   ztype[Warning]r@   r=   rA   intr4   rI  rB   r   rX   rY   )rX   z_ctx.Logger)rP   rJ  rX   rY   )r   )r:   r=   rm   rJ  rX   r	   )ry   r   rX   r=   r   )r   boolr   r   r   r   r   ConfigSettings | Noner   rK  r|   _env.Installerr~   zSubprocessRunner | NonerX   zIterator[ProjectBuilder])r   rK  r   r   r   r   r   r   r   rL  r   rK  r|   rM  rX   r=   )rX   zIterator[None])r   r   rX   r=   )NTFpip)r   r   r   r   r   zSequence[Distribution]r   rL  r   rK  r   rK  r|   rM  rX   	list[str])rX   r   )r3  rO  rX   zdict[str, Any])r@  r   r:  r   rX   rY   )F
__future__r   r  
contextlibcontextvarsr   r&   rc   rZ   rN   r,   r   r]   r   r(   collections.abcr   r   r   	functoolsr   typingr   r	   r
   r   r   r   r   r   r   r%  _exceptionsr   r   r   _typesr   r   r   r   r   _COLORSr1  fromkeysr+   
ContextVarr   r2   r;   rC   r_   rj   rn   rz   contextmanagerr   r   r   r   r   r   r   r.  r7  rD  rG  r   rF  __all__r/   r0   r1   <module>r]     sX   #     	    
     7 7  ( (   "  R R K K #  ]]7B'
 
 
 G
<C === = 	=
 = = 
=.""K  '+&&& & +	&
  & & $& & &RDDD D 	D
 +D  D D 	D*  8

" .2"' % * +	
     < .2"' %* * *  **  +	* 
 *   *  *  * b .2"' %    *  +	 
         FaH 6Pr z!"() r0   