HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/distutils/command/__pycache__/build_scripts.cpython-310.opt-2.pyc
o

�iX�@s�	ddlZddlZddlmZddlmZddlmZddlm	Z	ddl
mZmZddlm
Z
ddlZe�d�ZGd	d
�d
e�ZGdd�dee�ZdS)
�N)�ST_MODE)�	sysconfig)�Command)�newer)�convert_path�	Mixin2to3)�logs^#!.*python[0-9.]*([ 	].*)?$c@sFeZdZdZgd�ZdgZdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dS)�
build_scriptsz("build" scripts (copy and fixup #! line)))z
build-dir=�dzdirectory to "build" (copy) to)�force�fz1forcibly build everything (ignore file timestamps)zexecutable=�ez*specify final destination interpreter pathrcCs"d|_d|_d|_d|_d|_dS�N)�	build_dir�scriptsr�
executable�outfiles��self�r�</usr/local/lib/python3.10/distutils/command/build_scripts.py�initialize_optionss

z build_scripts.initialize_optionscCs|�dddd�|jj|_dS)NZbuild)r	r)rr)rr)Zset_undefined_optionsZdistributionrrrrr�finalize_options%s�zbuild_scripts.finalize_optionscCs|jSr)rrrrr�get_source_files,szbuild_scripts.get_source_filescCs|jsdS|��dSr)r�copy_scriptsrrrr�run/szbuild_scripts.runc	Cs�	|�|j�g}g}|jD�]}d}t|�}tj�|jtj�|��}|�|�|j	s7t
||�s7t�d|�qzt
|d�}WntyM|jsI�d}Yn,wt�|j�\}}|�d�|��}	|	si|�d|�qt�|	�}
|
ryd}|
�d�pxd}|�rt�d	||j�|�|�|j�stjs�|j}ntj�t�d
�dt�d�t�d
�f�}t�|�}d||d}
z|
�d�Wnty�t d�!|
���wz|
�|�Wnty�t d�!|
|���wt
|d��}|�"|
�|�#|�$��Wd�n1s�wY|�r
|�%�q|�r|�%�|�|�|�&||�qtj'dk�rX|D]1}|j�r4t�d|��q&t�(|�t)d@}|dBd@}||k�rVt�d|||�t�*||��q&||fS)NFznot copying %s (up-to-date)�rbrz%s is an empty file (skipping)T��zcopying and adjusting %s -> %sZBINDIRz
python%s%s�VERSIONZEXEs#!�
zutf-8z.The shebang ({!r}) is not decodable from utf-8zAThe shebang ({!r}) is not decodable from the script encoding ({})�wb�posixzchanging mode of %si�imz!changing mode of %s from %o to %o)+Zmkpathrrr�os�path�join�basename�appendrrr�debug�open�OSError�dry_run�tokenize�detect_encoding�readline�seek�warn�
first_line_re�match�group�inforZpython_buildrZget_config_var�fsencode�decode�UnicodeDecodeError�
ValueError�format�write�
writelines�	readlines�closeZ	copy_file�name�statr�chmod)rr�
updated_filesZscriptZadjustZoutfiler�encoding�linesZ
first_liner2Zpost_interprZshebangZoutf�fileZoldmodeZnewmoderrrr5s�
�

�

��
����
��

��zbuild_scripts.copy_scriptsN)�__name__�
__module__�__qualname__�descriptionZuser_optionsZboolean_optionsrrrrrrrrrr	sr	c@seZdZdd�ZdS)�build_scripts_2to3cCs&t�|�\}}|js|�|�||fSr)r	rr+Zrun_2to3)rrrArrrr�s
zbuild_scripts_2to3.copy_scriptsN)rErFrGrrrrrrI�srI)r#�rer?rZ	distutilsrZdistutils.corerZdistutils.dep_utilrZdistutils.utilrrrr,�compiler1r	rIrrrr�<module>s