+
    
i                         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                   ~   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                >    R V n         R V n        R V n        R V n        R # N)	build_dirscriptsr   
executableselfs   &M/usr/lib/python3/dist-packages/setuptools/_distutils/command/build_scripts.pyinitialize_options build_scripts.initialize_options%   s    
    c                d    V P                  R RRR4       V P                  P                  V n        R# )buildN)r
   r   )r   r   )r   r   )set_undefined_optionsdistributionr   r   s   &r   finalize_optionsbuild_scripts.finalize_options+   s1    ""*(		
 ((00r   c                    V P                   # r   )r   r   s   &r   get_source_filesbuild_scripts.get_source_files4   s    ||r   c                N    V P                   '       g   R # V P                  4        R # r   )r   copy_scriptsr   s   &r   runbuild_scripts.run7   s    |||r   c                    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.
)mkpathr   r   _copy_script_change_modes)r   outfilesupdated_filesscripts   &   r   r!   build_scripts.copy_scripts<   sU     	DNN#llFf> # 	8$&&r   c           	         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 -> %sBINDIRz
python{}{}VERSIONEXE z#!
w)encoding)!r   ospathjoinr   basenameappendr   r   r   debugtokenizeopenreadlinewarnshebang_patternmatchOSErrordry_runinfor   python_buildr   get_config_varformatgroup_validate_shebangr3   write
writelines	readlinesclose	copy_file)r   r*   r(   r)   shebang_matchoutfilef
first_liner   post_interpshebangoutfs   &&&&        r   r&   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                h    \         P                  R 8w  d   R# V F  pV P                  V4       K  	  R# )posixN)r4   name_change_mode)r   r(   files   && r   r'   build_scripts._change_modes   s)    77gDd# r   c                8   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)rA   r   rB   r4   statr   chmod)r   rY   oldmodenewmodes   &&  r   rX   build_scripts._change_mode   sj    <<<HH*D1''$-(61U?f,HH8$QHHT# r   c                     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 ()N)encodeUnicodeEncodeError
ValueError)rR   r3   s   &&r   rG   build_scripts._validate_shebang   s    	UNN7#	NN8$ " 	U}WK7RSTT	U " 	{ +++3*A7 	s   ' A AA%c                   < V ^8  d   Qh/ S[ S[S[S[S[S[3,          ,          ,          ;R&   S[ S[S[,          ,          ;R&   # )   user_optionsboolean_options)r   listtuplestr)rE   __classdict__s   "r   __annotate__build_scripts.__annotate__   s?      4c3m 456   d3i(4 r   )r   r   r   r   N))z
build-dir=dzdirectory to "build" (copy) to)r   rO   z1forcibly build everything (ignore file timestamps)zexecutable=ez*specify final destination interpreter path)__name__
__module____qualname____firstlineno__descriptionri   rj   r   r   r   r"   r!   r&   r'   rX   staticmethodrG   __annotate_func____static_attributes____classdictcell__)rn   s   @r   r
   r
      s_     >K:L -49O1
'&3,j$	$  {  r   r
   )__doc__r4   rer:   	distutilsr   distutils._logr   r\   r   typingr   	_modifiedr   corer   utilr   compiler>   first_line_rer
    r   r   <module>r      sS   5 
 	        **<=
  QG Qr   