CasperSecurity

Current Path : /lib/python3.10/distutils/command/__pycache__/
Upload File :
Current File : //lib/python3.10/distutils/command/__pycache__/build_scripts.cpython-310.pyc

o

��bcX�@s�dZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZddlZe�d	�ZGd
d�de�ZGdd
�d
ee
�ZdS)zRdistutils.command.build_scripts

Implements the Distutils 'build_scripts' command.�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�6/usr/lib/python3.10/distutils/command/build_scripts.py�initialize_optionss

z build_scripts.initialize_optionscCs|�dddd�|jj|_dS)N�build)r	r)rr)rr)�set_undefined_options�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	s6t
||�s6t�d|�q
zt
|d�}WntyL|jsH�d}Yn,wt�|j�\}}|�d�|��}	|	sh|�d|�q
t�|	�}
|
rxd}|
�d�pwd	}|�r
t�d
||j�|�|�|j�stjs�|j}ntj�t�d�dt�d
�t�d�f�}t�|�}d||d}
z|
�d�Wnty�t d�!|
���wz|
�|�Wnty�t d�!|
|���wt
|d��}|�"|
�|�#|�$��Wd�n1s�wY|�r	|�%�q
|�r|�%�|�|�|�&||�q
tj'dk�rW|D]1}|j�r3t�d|��q%t�(|�t)d@}|dBd@}||k�rUt�d|||�t�*||��q%||fS)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.
        Fznot copying %s (up-to-date)�rbNrz%s is an empty file (skipping)T��zcopying and adjusting %s -> %s�BINDIRz
python%s%s�VERSION�EXEs#!�
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)+�mkpathrrr�os�path�join�basename�appendrrr�debug�open�OSError�dry_run�tokenize�detect_encoding�readline�seek�warn�
first_line_re�match�group�infor�python_buildr�get_config_var�fsencode�decode�UnicodeDecodeError�
ValueError�format�write�
writelines�	readlines�close�	copy_file�name�statr�chmod)rr�
updated_files�script�adjust�outfiler�encoding�lines�
first_liner8�post_interpr�shebang�outf�file�oldmode�newmoderrrr5s�
�

�

��
����
��

��zbuild_scripts.copy_scriptsN)�__name__�
__module__�__qualname__�description�user_options�boolean_optionsrrrrrrrrrr	sr	c@seZdZdd�ZdS)�build_scripts_2to3cCs&t�|�\}}|js|�|�||fSr)r	rr1�run_2to3)rrrJrrrr�s
zbuild_scripts_2to3.copy_scriptsN)rWrXrYrrrrrr]�sr])�__doc__r)�rerHr�	distutilsr�distutils.corer�distutils.dep_utilr�distutils.utilrrrr2�compiler7r	r]rrrr�<module>s

Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY