Ë
    ˜šãjK  ã                   ó¢   — d Z ddlZddlZddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ ddlmZ ddlZ ej                  d	«      Z G d
„ de«      Zy)zRdistutils.command.build_scripts

Implements the Distutils 'build_scripts' command.é    N)ÚST_MODE)Ú	sysconfig)ÚCommand)Únewer)Úconvert_path)Úlogs   ^#!.*python[0-9.]*([ 	].*)?$c                   ó<   — e Zd ZdZg d¢ZdgZd„ Zd„ Zd„ Zd„ Z	d„ Z
y	)
Úbuild_scriptsz("build" scripts (copy and fixup #! line)))z
build-dir=Údzdirectory to "build" (copy) to)ÚforceÚfz1forcibly build everything (ignore file timestamps)zexecutable=Úez*specify final destination interpreter pathr   c                 óJ   — d | _         d | _        d | _        d | _        d | _        y ©N)Ú	build_dirÚscriptsr   Ú
executableÚoutfiles©Úselfs    úv/var/www/html/python-recuperauto-other/env/lib/python3.12/site-packages/setuptools/_distutils/command/build_scripts.pyÚinitialize_optionsz build_scripts.initialize_options   s%   € ØˆŒØˆŒØˆŒ
ØˆŒØˆ�ó    c                 ób   — | j                  dddd«       | j                  j                  | _        y )NÚbuild)r
   r   )r   r   )r   r   )Úset_undefined_optionsÚdistributionr   r   s    r   Úfinalize_optionszbuild_scripts.finalize_options%   s1   € Ø×"Ñ" 7Ø#AØ#5Ø#?ô	Að ×(Ñ(×0Ñ0ˆ�r   c                 ó   — | j                   S r   )r   r   s    r   Úget_source_fileszbuild_scripts.get_source_files,   s   € Ø�|‰|Ðr   c                 ó>   — | j                   sy | j                  «        y r   )r   Úcopy_scriptsr   s    r   Úrunzbuild_scripts.run/   s   € Ø�|Š|ØØ×ÑÕr   c           	      ó
  — | j                  | j                  «       g }g }| j                  D �]¾  }d}t        |«      }t        j
                  j                  | j                  t        j
                  j                  |«      «      }|j                  |«       | j                  s#t        ||«      st        j                  d|«       Œ˜	 t        |d«      }t        j                  |j                   «      \  }}|j#                  d«       |j!                  «       }	|	s| j%                  d|z  «       Œÿt&        j)                  |	«      }
|
rd}|
j+                  d«      xs d}	 |�rYt        j0                  d
|| j                  «       |j                  |«       | j.                  �st2        j4                  s| j6                  }n^t        j
                  j                  t3        j8                  d«      dt3        j8                  d«      ›t3        j8                  d«      ›�«      }t	        j:                  |«      }d|z   z   dz   }	 |j=                  d«       	 |j=                  «       t        |d«      5 }|jE                  |«       |jG                  |jI                  «       «       d	d	d	«       |s�Œx|jK                  «        �ŒŠ|r|jK                  «        |j                  |«       | jM                  ||«       �ŒÁ t        jN                  dk(  r…|D ]€  }| j.                  rt        j0                  d|«       Œ&t	        jP                  |«      tR           dz  }|dz  dz  }||k7  sŒSt        j0                  d|||«       t	        jT                  ||«       Œ‚ ||fS # t,        $ r | j.                  s‚ d	}Y �ŒKw xY w# t>        $ r tA        djC                  |«      «      ‚w xY w# t>        $ r tA        djC                  |«      «      ‚w xY w# 1 sw Y   �ŒbxY w)a"  Copy each script listed in 'self.scripts'; if it's marked as a
        Python script in the Unix way (first line matches 'first_line_re',
        ie. starts with "\#!" and contains "python"), then adjust the first
        line to refer to the current Python interpreter as we copy.
        Fznot copying %s (up-to-date)Úrbr   z%s is an empty file (skipping)Té   r   Nzcopying and adjusting %s -> %sÚBINDIRÚpythonÚVERSIONÚEXEs   #!ó   
zutf-8z.The shebang ({!r}) is not decodable from utf-8zAThe shebang ({!r}) is not decodable from the script encoding ({})ÚwbÚposixzchanging mode of %siÿ  im  z!changing mode of %s from %o to %o)+Úmkpathr   r   r   ÚosÚpathÚjoinÚbasenameÚappendr   r   r   ÚdebugÚopenÚtokenizeÚdetect_encodingÚreadlineÚseekÚwarnÚfirst_line_reÚmatchÚgroupÚOSErrorÚdry_runÚinfor   Úpython_buildr   Úget_config_varÚfsencodeÚdecodeÚUnicodeDecodeErrorÚ
ValueErrorÚformatÚwriteÚ
writelinesÚ	readlinesÚcloseÚ	copy_fileÚnameÚstatr   Úchmod)r   r   Úupdated_filesÚscriptÚadjustÚoutfiler   ÚencodingÚlinesÚ
first_liner<   Úpost_interpr   ÚshebangÚoutfÚfileÚoldmodeÚnewmodes                     r   r"   zbuild_scripts.copy_scripts5   sj  € ð 	�‰�D—N‘NÔ#ØˆØˆØ—l‘ló L	0ˆFØˆFÜ! &Ó)ˆFÜ—g‘g—l‘l 4§>¡>´2·7±7×3CÑ3CÀFÓ3KÓLˆGØ�O‰O˜GÔ$à—:’:¤e¨F°GÔ&<Ü—	‘	Ð7¸Ô@Øð
8Ü˜ Ó&�ô #+×":Ñ":¸1¿:¹:Ó"F‘�˜%Ø—‘�q”	ØŸZ™Z›\�
Ù!Ø—I‘IÐ>ÀÑGÔHØä%×+Ñ+¨JÓ7�ÙØ!�FØ"'§+¡+¨a£.Ò"7°C‘KâÜ—‘Ð9¸6ØŸ™ô)à×$Ñ$ WÔ-Ø—|“|Ü$×1Ò1Ø%)§_¡_™
ä%'§W¡W§\¡\Ü%×4Ñ4°XÔ>Ü+4×+CÑ+CÀIÔ+NÜ+4×+CÑ+CÀEÔ+JðLó&M˜
ô "$§¡¨ZÓ!8�JØ# jÑ0°;Ñ>ÀÑF�Gð:ØŸ™ wÔ/ð8ØŸ™ xÔ0ô ˜g tÓ,ð 7°ØŸ
™
 7Ô+ØŸ™¨¯©«Ô6÷7ó Ø—G‘G–IáØ—G‘G”IØ×$Ñ$ WÔ-Ø—‘˜v wÖ/ðYL	0ô\ �7‰7�gÒØ ò 	0�Ø—<’<Ü—H‘HÐ2°DÕ9ä Ÿg™g d›m¬GÑ4°vÑ=�GØ&¨™°&Ñ8�GØ 'Ó)ÜŸ™Ð!DØ!% w°ô9äŸ™  wÕ/ð	0ð ˜Ð&Ð&øôW ò Ø—|’|ØØ“ðûôL .ò :Ü(ð)ß)/©°«ó:ð :ð:ûô .ò 8Ü(ð<ç#™V G¨XÓ6ó8ð 8ð8ú÷
7ñ 7ús6   ÃN
È8N)É
OÉ'1O8Î
N&Î%N&Î)$OÏ%O5Ï8P	N)Ú__name__Ú
__module__Ú__qualname__ÚdescriptionÚuser_optionsÚboolean_optionsr   r   r    r#   r"   © r   r   r
   r
      s1   „ à>€Kò
€Lð �i€Oòò1òòóc'r   r
   )Ú__doc__r/   ÚrerN   r   Ú	distutilsr   Údistutils.corer   Údistutils.dep_utilr   Údistutils.utilr   r   r6   Úcompiler;   r
   rc   r   r   ú<module>rk      sE   ðñ5÷ Ý Ý Ý "Ý $Ý 'Ý Û ð �—
‘
Ð;Ó<€ôG'�Gõ G'r   