+
     h  c                   s    R t ^ RI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 ^RIHt ^RIHt ]P$                  ! R	4      t ]t ! R
 R]4      tR# )zRdistutils.command.build_scripts

Implements the Distutils 'build_scripts' command.N)	sysconfig)log)ST_MODE)ClassVar)newer)Command)convert_pathz^#!.*python[0-9.]*([ 	].*)?$c                   s~   a  ] tR t^t o Rt. ROtR.tR tR tR t	R t
R tR tR	 tR
 t]R 4       tV 3R ltRtV tR# )build_scriptsz("build" scripts (copy and fixup #! line)forcec                s>    R V n         R V n        R V n        R V n        R # N)	build_dirscriptsr   
executableself   &P/usr/lib/python3.14/site-packages/setuptools/_distutils/command/build_scripts.pyinitialize_optionsZ build_scripts.initialize_options%   s    
    c                sd    V P                  R RRR4       V P                  P                  V n        R# )ZbuildN)r   r
   )r   r   )r   r   )Zset_undefined_optionsZdistributionr   r   r   r   finalize_optionsZbuild_scripts.finalize_options+   s1    ""*(		
 ((00r   c                s    V P                   # r	   )r   r   r   r   get_source_filesZbuild_scripts.get_source_files4   s    ||r   c                sN    V P                   '       g   R # V P                  4        R # r	   )r   copy_scriptsr   r   r   runZbuild_scripts.run7   s    |||r   c                s    V P                  V P                  4       . p. pV P                   F  pV P                  W1V4       K  	  V P	                  V4       W3# )a  
Copy each script listed in ``self.scripts``.

If a script is marked as a Python script (first line matches
'shebang_pattern', i.e. starts with ``#!`` and contains
"python"), then adjust in the copy the first line to refer to
the current Python interpreter.
)Zmkpathr
   r   _copy_script_change_modes)r   outfilesupdated_filesscripts   &   r   r   Zbuild_scripts.copy_scripts<   sU     	DNN#llFf> # 	8$&&r   c           	     s    R p\        V4      p\        P                  P                  V P                  \        P                  P                  V4      4      pVP                  V4       V P                  '       g+   \        W4      '       g   \        P                  ! RV4       R #  \        P                  ! V4      pVP                  4       pV'       g   V P                  V R24       R # \        P!                  V4      pVP                  V4       V'       Ed   \        P&                  ! RWP                  4       V P$                  '       Eg6   \(        P*                  '       g   V P,                  pMl\        P                  P                  \(        P.                  ! R4      RP1                  \(        P.                  ! R4      \(        P.                  ! R4      4      4      pVP3                  ^4      ;'       g    Rp	R	V,           V	,           R
,           p
V P5                  WP6                  4       \        VRVP6                  R7      ;_uu_ 4       pVP9                  V
4       VP;                  VP=                  4       4       R R R 4       V'       d   VP?                  4        R # R # V'       d   VP?                  4        V PA                  W4       R #   \"         d    T P$                  '       g   h R p ELi ; i  + '       g   i     L~; i)Nznot copying %s (up-to-date)z is an empty file (skipping)zcopying and adjusting %s -> %sZBINDIRz
python{}{}ZVERSIONZEXEZ z#!Z
Zw)encoding)!r   osZpathZjoinr
   ZbasenameZappendr   r   r   ZdebugtokenizeZopenZreadlineZwarnshebang_patternZmatchZOSErrordry_runinfor    Zpython_buildr   Zget_config_varformatZgroup_validate_shebangr   ZwriteZ
writelinesZ	readlinesZcloseZ	copy_file)r   r   r   r   Zshebang_matchZoutfilefZ
first_liner   Zpost_interpshebangZoutfs   &&&&        r   r   Zbuild_scripts._copy_scriptO   s   f%'',,t~~rww/?/?/GH zzz%"8"8II3V<	>f%A J		VH$@AB+11*=MW%=HH5v~~N<<< ---!%J!#!00:$++%44Y?%44U;"J ,11!4::+k9D@&&w

;'3<<JJw'OOAKKM2 = 	  	NN6+K  	<<<A	: =<s$   #K 1K-K*#K*)K*-K=	c                sh    \         P                  R 8w  d   R# V F  pV P                  V4       K  	  R# )ZposixN)r   Zname_change_mode)r   r   files   && r   r   Zbuild_scripts._change_modes   s)    77gDd# r   c                s8   V P                   '       d   \        P                  ! R V4       R# \        P                  ! V4      \
        ,          R,          pVR,          R,          pW28w  d1   \        P                  ! RWV4       \        P                  ! W4       R# R# )zchanging mode of %sNi  im  z!changing mode of %s from %o to %o)r    r   r!   r   statr   Zchmod)r   r'   ZoldmodeZnewmodes   &&  r   r&   Zbuild_scripts._change_mode   sj    <<<HH*D1''$-(61U?f,HH8$QHHT# r   c                s     V P                  R 4        T P                  T4       R#   \         d    \        RT : R24      hi ; i  \         d    \        RT : RT R24      hi ; i)zutf-8zThe shebang (z) is not encodable to utf-8z+) is not encodable to the script encoding (Z)N)ZencodeZUnicodeEncodeErrorZ
ValueError)r%   r   s   &&r   r#   Zbuild_scripts._validate_shebang   s    	UNN7#	NN8$ " 	U}WK7RSTT	U " 	{ +++3*A7 	s   ' A AA%c                s   < V ^8  d   Qh/ S[ S[S[S[S[S[3,          ,          ,          ;R&   S[ S[S[,          ,          ;R&   # )i   user_optionsboolean_options)r   ZlistZtupleZstr)r"   __classdict__s   "r   Z__annotate__Zbuild_scripts.__annotate__   s?      4c3m 456   d3i(4 r   )r
   r   r   r   N))z
build-dir=Zdzdirectory to "build" (copy) to)r   r$   z1forcibly build everything (ignore file timestamps)zexecutable=Zez*specify final destination interpreter path)Z__name__Z
__module__Z__qualname__Z__firstlineno__Zdescriptionr)   r*   r   r   r   r   r   r   r   r&   Zstaticmethodr#   Z__annotate_func__Z__static_attributes__Z__classdictcell__)r+   s   @r   r   r      s_     >K:L -49O1
'&3,j$	$  {  r   r   )Z__doc__r   Zrer   Z	distutilsr    Zdistutils._logr   r(   r   Ztypingr   Z	_modifiedr   Zcorer   Zutilr   Zcompiler   Zfirst_line_rer   ) r   r   <module>r,      sS   5 
 	        **<=
  QG Qr   